Commit graph

321 commits

Author SHA1 Message Date
Ashod Nakashian
3d9b50aeeb loolwsd: unittest runner improvement and logging
Change-Id: I4ddce1775b620e9140366ae7965b37b6cce8689e
Reviewed-on: https://gerrit.libreoffice.org/28958
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-16 12:37:52 +00:00
Ashod Nakashian
b26b52af61 loolwsd: unittest for tile prioritization
Change-Id: Ib5ea6b94d651124106069f8d796b7359c92639a8
Reviewed-on: https://gerrit.libreoffice.org/28957
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-16 12:36:10 +00:00
Ashod Nakashian
d2872846d8 loolwsd: cleanup of unittests and helpers
Change-Id: I03a5cb29b51409f3b8cc51981b522248a29a6ba3
Reviewed-on: https://gerrit.libreoffice.org/28955
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-16 12:31:59 +00:00
Tor Lillqvist
42fdb3b079 Drop always-defaulted 'timeoutMs' parameter to countLoolKitProcesses()
Also, drop the pointless use of POLL_TIMEOUT_MS, we first multiplied by
it and then divided.
2016-09-16 12:52:55 +03:00
Henry Castro
4d6fadfc0b loolwsd: test: simplify each view 2016-09-15 16:00:02 -04:00
Tor Lillqvist
4197bc5881 Don't hide errors behind a bogus default
If TDOC is not defined, this is broken. Defining it as "" in that case
won't fix anything. Use abs_top_srcdir to be less dependent on what
the cwd is when the code runs.
2016-09-15 21:32:35 +03:00
Henry Castro
a97d6f5449 loolwsd: test: graphic view selection 2016-09-15 14:14:49 -04:00
Miklos Vajna
27220aea39 test helpers: avoid unnecessary copies
Change-Id: I014cedcc10078ce03d1f4f3ae9403b6282b7dcac
2016-09-15 10:33:26 +02:00
Henry Castro
e9f3fd4e56 loolwsd: test: cell view cursor 2016-09-08 12:16:51 -04:00
Henry Castro
f751d36c8f loolwsd: test: view cursor visible 2016-09-08 10:27:42 -04:00
Henry Castro
d4d764cee5 loolwsd: test: invalidate view cursor 2016-09-07 12:21:34 -04:00
Ashod Nakashian
16605b9289 Revert "loolwsd: canceltiles re-designed using tilecache instead of queue"
This reverts commit 571ff06906.

Change-Id: Icf9caeafc640b815f64211f240cfdac8e91694a1
Reviewed-on: https://gerrit.libreoffice.org/28595
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 12:37:47 +00:00
Ashod Nakashian
77a693c353 Revert "loolwsd: remove tile queue and simplify tile response"
This reverts commit 59eaacd2f8.

Change-Id: Ieba9bbaaa6406e3e685b46ce12a44a0766127815
Reviewed-on: https://gerrit.libreoffice.org/28594
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 12:37:38 +00:00
Michael Meeks
1dce882fd1 Start of simpler input fuzzer. 2016-09-01 10:11:03 +01:00
Ashod Nakashian
151d1ff955 loolwsd: unittest fixes
Change-Id: I7096b6dabfa59a536809c4e997168c8fce5791f0
Reviewed-on: https://gerrit.libreoffice.org/28578
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 04:09:23 +00:00
Ashod Nakashian
534ab15d2f loolwsd: more aggressive test for unresponsive clients
Change-Id: I9daf81661cf03be2ea38b5bc4d9688039912bd8a
Reviewed-on: https://gerrit.libreoffice.org/28577
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 04:07:53 +00:00
Ashod Nakashian
59eaacd2f8 loolwsd: remove tile queue and simplify tile response
Tile queue was used to process canceltiles commands.
Since those are handled by TileCache, there is no need
for queues and the threads that pump them.

But because these queues were also used to buffer between
WSD internals and clients, such that a slow client wouldn't
block WSD while sending back tiles, it is necessary
to reword that logic.
In subsequent commits that will change as well.

With this change not only do we save a thread per client,
but we also reduce latency of tile, and improve typing
responsiveness, by almost 3x or more! Latencies are
down to ~15ms from almost 50ms.

Change-Id: I9bb5856efed28caea9d4e6f94f77b093779e5241
Reviewed-on: https://gerrit.libreoffice.org/28575
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 03:59:31 +00:00
Ashod Nakashian
571ff06906 loolwsd: canceltiles re-designed using tilecache instead of queue
Change-Id: I4b9ba91ee08bc9dd8d27df275e303f5517d9740c
Reviewed-on: https://gerrit.libreoffice.org/28526
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:44:56 +00:00
Ashod Nakashian
494feedd8d loolwsd: unittest cleanup
Change-Id: I60b8c783b16f37530d208f1fdad029d97996e4cc
Reviewed-on: https://gerrit.libreoffice.org/28523
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:40:25 +00:00
Ashod Nakashian
5158818d82 loolwsd: getDocSize -> parseDocSize
Change-Id: I82ee96d6fde8d8c379547d05d7bbb8213a474a4f
Reviewed-on: https://gerrit.libreoffice.org/28522
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:39:43 +00:00
Ashod Nakashian
42624adf19 loolwsd: fixup unittests
Change-Id: Icf3dea11654cf43a8aa86fadc1f1276d796719c3
Reviewed-on: https://gerrit.libreoffice.org/28518
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:35:55 +00:00
Ashod Nakashian
1e2dd2d61f loolwsd: TileCacheTests cleanup
Change-Id: I6d09ed3216d4e3651f72c0387c8cc6f2a7d5cc90
Reviewed-on: https://gerrit.libreoffice.org/28516
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:34:24 +00:00
Ashod Nakashian
5ffcafa736 loolwsd: CPPUNIT_TEST_NAME can be regex
To run selective tests only, CPPUNIT_TEST_NAME
envar can be defined to hold the test-name,
for example TileCacheTests::testClientPartImpress.

Now it's possible to pass a regex value instead,
for example TileCacheTests::testC.* to run both
TileCacheTests::testClientPartImpress and
TileCacheTests::testClientPartCalc.

Change-Id: I96aa1ce242fd8afaf073527777be50308dce867c
Reviewed-on: https://gerrit.libreoffice.org/28515
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:33:45 +00:00
Henry Castro
cd40f694ab loolwsd: test: optimal column/row width/height 2016-08-30 17:47:59 -04:00
Ashod Nakashian
03921a0769 loolwsd: unittest cleanups
Change-Id: Ic383915012ac1c254960d976cc89d3f7c1a2cb02
Reviewed-on: https://gerrit.libreoffice.org/28440
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-28 18:50:11 +00:00
Ashod Nakashian
5656f84401 loolstress: benchmark statistics are calculated and reported
Statistics include:
Total latency from input to tile.
Tile rendering time.
Tile-cache response time.

The lowest latency for each is reported and the
95th percentile as well.

The rendering and cache-serving power is
calculated as Mega-Pixels per second.

Change-Id: Ib1baede818444c92f553eaf3e6b17dc617c51b0f
Reviewed-on: https://gerrit.libreoffice.org/28310
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 06:00:43 +00:00
Ashod Nakashian
a46d9a55b3 loolwsd: refactor getTileMessage
Move CppUnit assertions into assertTileMessage
to allow for reusing getTileMessage without
dependency on CppUnit.

Change-Id: I35592d440910854dc207db533292efd6f1520c0b
Reviewed-on: https://gerrit.libreoffice.org/28308
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 05:52:30 +00:00
Ashod Nakashian
415796d69a loolwsd: unittest fixes
Change-Id: Ia08135bfaadbf4f59b658f7563ac4d40e6abacac
Reviewed-on: https://gerrit.libreoffice.org/28293
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 05:00:28 +00:00
Ashod Nakashian
b9a2d7fcaf loolwsd: unit-test misbehaving client that connects without loading
Change-Id: I1cef429a9310450c1b317f65475536db5d8a8306
Reviewed-on: https://gerrit.libreoffice.org/28289
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 04:38:19 +00:00
Ashod Nakashian
a805b06874 loolwsd: fix unittest regressions
Change-Id: I502c87a2c6eb3d34c0e137c774c1c77bec8f50d9
Reviewed-on: https://gerrit.libreoffice.org/28144
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 12:12:39 +00:00
Ashod Nakashian
6194b043c0 loolwsd: better UT failure message
Change-Id: Iad269910b1a38f67d87811590ffecefe27ba99cd
Reviewed-on: https://gerrit.libreoffice.org/28116
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:00:20 +00:00
Henry Castro
e41f8581d2 loolwsd: test: column/row re-size 2016-08-13 20:11:24 -04:00
Ashod Nakashian
807b3c2e55 loolstress: support trace file compression
Compression to .gz is supported and is controlled
via the XML configuration.

Change-Id: If26fad2c0b5f3c4ffd93362608644dc917172a41
Reviewed-on: https://gerrit.libreoffice.org/27975
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:57:35 +00:00
Ashod Nakashian
b9b3a41952 loolwsd: compare uncompressed PNG in unittests
Change-Id: I5d8db39a0076bcb83d786b6afff96cd84a1f1360
Reviewed-on: https://gerrit.libreoffice.org/27974
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:56:38 +00:00
Ashod Nakashian
18ab6d28bf loolwsd: refactored png decoding into own function
Change-Id: I8310b3880f2171c26cecbee4cb1780889d38ea31
Reviewed-on: https://gerrit.libreoffice.org/27973
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:55:44 +00:00
Ashod Nakashian
e3427aff34 loolwsd: when TDOC is not defined assume blank
Change-Id: Iaf8ee6a8dff8dc4d602e7622a288a43b3459fb92
Reviewed-on: https://gerrit.libreoffice.org/27956
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:48:12 +00:00
Pranav Kant
b8ef017610 Move JWT auth to inside websocket to prevent CSRF
... instead of setting a httpOnly cookie for admin websocket
endpoint which can be CSRFed.

With this, we remove the httpOnly tag on jwt cookie so that
scripts in admin html pages can access the jwt cookie and
authenticates after opening websocket endpoint. Until
authenticated using 'auth authToken' command, admin will not
respond to any admin command.

Also, adapt admin test these changes
2016-07-29 12:03:14 +05:30
Ashod Nakashian
219143ceda loolwsd: unittest fixes for multiview
Three tests still fail and seem to be regressions
due to multiview. When WSD is not running with
multiview support, these tests pass.

Change-Id: Ice3224d92d10f761cb8827d35c9c0c5dd82ae308
Reviewed-on: https://gerrit.libreoffice.org/27587
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 15:59:29 +00:00
Ashod Nakashian
d56f9a0386 loolwsd: status now includes the view-ID of the client
Change-Id: Iac1cd806ac24ff3956624513946921020d248664
Reviewed-on: https://gerrit.libreoffice.org/27585
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 15:55:09 +00:00
Ashod Nakashian
24da5ce6e0 loolwsd: unittest fix
Change-Id: I371d7480e648cd2b28fb92b2d34db56614b4542f
Reviewed-on: https://gerrit.libreoffice.org/27422
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-22 04:31:40 +00:00
Pranav Kant
f684e505da loolwsd: Restore test for convert-to API
This got accidently removed in
8e266391f1

Change-Id: I3d03b1b75f05f5855397e46a7fccc30c794ca151
2016-07-21 12:54:59 +05:30
Pranav Kant
483dbbc77e Revert "unit-admin: Enable a test"
This doesn't seem quite ready yet. Needs little bit more work
before we enable it again. From logs, it looks like 'rmdoc'
messgage is arriving really late.

This reverts commit e6e9236a6a.
2016-07-18 20:44:00 +05:30
Pranav Kant
e6e9236a6a unit-admin: Enable a test
testRmDocNotify was disabled earlier as it seemed to fail
intermittently. Hopefully, refactoring in
78876b011d2c3da972ef456a6da2cac08cb0d7d6 and
4360d31c9e8a3a099d869a9dfd0e2db8a0c03a52 should fix this one too.

Change-Id: I542ca27fab7eb4dfa8ed4a55a7f2eada63e7b96c
2016-07-18 12:03:27 +05:30
Pranav Kant
732c54313d loolwsd: Get rid of superfluous long list of fonts in test output
They make it difficult and annoying to analyze the test logs.

Change-Id: If970ab8296206e7462fe205a9b40cdf26a1eb37f
2016-07-14 10:59:36 +05:30
Pranav Kant
0f506fcbb0 Some more admin test cleaning
Change-Id: I3cea5b6fefcb7b4e6209c63e6b3e232b9db50a7b
2016-07-14 01:08:46 +05:30
Pranav Kant
4530bfdb0a loolwsd: Fix Admin unit test
Admin notify messages are emitted when websocket connection is
established, not when 'load' message is sent.

And, some minor cleaning.

Change-Id: If52a77c10c3af64dcca8d6c10868b3d46f48c774
2016-07-14 01:08:39 +05:30
Miklos Vajna
990108d243 test: make check insist on a log file for skipped tests 2016-07-11 09:22:47 +02:00
Miklos Vajna
9304c4152d HTTPWSTest: disable failing test on LO >= 5.2 for now 2016-07-11 09:22:47 +02:00
Henry Castro
adf4369237 loolwsd: test: state changed UNO commands 2016-07-10 14:28:28 -04:00
Miklos Vajna
3df68f3869 loolwsd: support CPPUNIT_TEST_NAME, similarly to core.git 2016-07-08 09:04:28 +02:00