Henry Castro
6c31bd8bca
loolwsd: log, rename to ClientSession
2016-05-17 18:33:37 -04:00
Ashod Nakashian
76991dd325
loolwsd: disable editlock in multiview
...
Change-Id: I4df2d8a321e160ce226c2e22aa754cd6e5b2c755
Reviewed-on: https://gerrit.libreoffice.org/25063
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 13:57:36 +00:00
Ashod Nakashian
b41f0a6ea3
loolwsd: ChildProcessSession -> ChildSession
...
Change-Id: I24f001cb4d17d1ddc5cbd4f48134ec4eb8777afb
Reviewed-on: https://gerrit.libreoffice.org/25062
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 13:56:45 +00:00
Ashod Nakashian
7ce6e67731
loolwsd: ChildProcessSession.{cpp,hpp} -> ChildSession.{cpp,hpp}
...
Change-Id: Ic0c7f0992c9024d8fb8478b41205394372094af8
Reviewed-on: https://gerrit.libreoffice.org/25061
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 13:56:21 +00:00
Ashod Nakashian
7f767e7cf6
loolwsd: MasterProcessSession splitting: removed MasterProcessSession
...
Change-Id: If132e8787f6ed7fa21d235cc355d7a29395b3c4d
Reviewed-on: https://gerrit.libreoffice.org/25049
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:23:07 +00:00
Ashod Nakashian
d1d5cff3e3
loolwsd: MasterProcessSession splitting: moved forwarding and shutdown
...
Change-Id: I3c84d9be328e58263cac9c3b1b501ef91ea30170
Reviewed-on: https://gerrit.libreoffice.org/25048
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:22:41 +00:00
Ashod Nakashian
410123e2aa
loolwsd: MasterProcessSession splitting: moved dispatchChild
...
... and PrisonerSession ctor
Change-Id: I4c3707d71eb308ab739e5c264be1905453f9d719
Reviewed-on: https://gerrit.libreoffice.org/25047
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:22:10 +00:00
Ashod Nakashian
b2881306f1
loolwsd: MasterProcessSession splitting: moved input queue
...
Change-Id: Id1c2b0f76a96ca48905d354c02a96b35ba29fadc
Reviewed-on: https://gerrit.libreoffice.org/25046
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:21:44 +00:00
Ashod Nakashian
1e84102aae
loolwsd: MasterProcessSession splitting: move edit lock
...
Change-Id: I8339f28cb9ed0ed1a5b1f4cf38d6083450cb4fdc
Reviewed-on: https://gerrit.libreoffice.org/25045
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:19:18 +00:00
Ashod Nakashian
8acc293af5
loolwsd: MasterProcessSession splitting: mark document load failure
...
Change-Id: I3167b9ddb985e20ff500962a856a70888abf0684
Reviewed-on: https://gerrit.libreoffice.org/25044
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:18:50 +00:00
Ashod Nakashian
cf26d9191c
loolwsd: MasterProcessSession splitting: member function scope
...
Change-Id: I3fa43f761ccc93d52badff346941de2a8cd9de03
Reviewed-on: https://gerrit.libreoffice.org/25043
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:18:17 +00:00
Ashod Nakashian
7b0da5ceae
loolwsd: MasterProcessSession splitting: moved ClientSession handlers
...
Change-Id: I1a660cd17027e1c7290882a301a15b77b3e4940f
Reviewed-on: https://gerrit.libreoffice.org/25042
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:15:59 +00:00
Ashod Nakashian
8af51d0270
loolwsd: MasterProcessSession splitting: moved loadDocument
...
Change-Id: Iaf32014ab5cbceb6ca5d443a85b0d03d6ccd9876
Reviewed-on: https://gerrit.libreoffice.org/25041
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:14:57 +00:00
Ashod Nakashian
2cecb66998
loolwsd: MasterProcessSession splitting: moved message handler
...
Change-Id: Ibc0c4f3f37213461a66fba7fb27a5996d0914776
Reviewed-on: https://gerrit.libreoffice.org/25040
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:14:06 +00:00
Ashod Nakashian
e5f76d46f4
loolwsd: MasterProcessSession splitting: edit lock handlers
...
Change-Id: Id3f961ea8da2689889e0d7810ec222d21132c7c6
Reviewed-on: https://gerrit.libreoffice.org/25039
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:13:41 +00:00
Ashod Nakashian
7c76e4b6bc
loolwsd: MasterProcessSession splitting: using ClientSession
...
Change-Id: I2ee089c04d2e5fbdae91cfc5cada437f5aae8e5b
Reviewed-on: https://gerrit.libreoffice.org/25038
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:13:07 +00:00
Ashod Nakashian
73f0e2a190
loolwsd: MasterProcessSession splitting into ClientSession and PrisonerSession
...
Change-Id: I29bcc5f791acf2313830e21d102e25f2232329d1
Reviewed-on: https://gerrit.libreoffice.org/25037
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-17 03:12:28 +00:00
Ashod Nakashian
d18bca992c
loolwsd: use TileDesc instead of explicit values
...
Change-Id: I56ba6c4e63a495500093e7353477175d40152d11
Reviewed-on: https://gerrit.libreoffice.org/25020
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 23:00:43 +00:00
Ashod Nakashian
2b0347e391
loolwsd: new tile descriptor class to represent tiles
...
Change-Id: I680ea2d698a352bf3f99b37713d68c34d9502ea4
Reviewed-on: https://gerrit.libreoffice.org/25019
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 22:56:48 +00:00
Ashod Nakashian
a11c1b5483
loolwsd: new token parser helper
...
Change-Id: I29af7aefe68c4673e21fe11c2ac469cfc87c1a2c
Reviewed-on: https://gerrit.libreoffice.org/25018
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 22:55:32 +00:00
Ashod Nakashian
cfe414cc8a
loolwsd: simplified duplicate code with utility
...
Change-Id: I2b9d88a78e73065d65b1722d363e8492f80438c9
Reviewed-on: https://gerrit.libreoffice.org/25017
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 22:54:51 +00:00
Ashod Nakashian
a0f16e6eef
loolwsd: shorter lokit process counting interval and log count
...
Change-Id: I88d2dfd04f879d25d9e70d60f362ca47b39e8af9
Reviewed-on: https://gerrit.libreoffice.org/25009
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 14:34:46 +00:00
Ashod Nakashian
1eb239ee67
loolwsd: better editlock test
...
Change-Id: Ia0fa59b3b6b61bd054bd3d25f126884f4e5211b7
Reviewed-on: https://gerrit.libreoffice.org/25008
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 14:34:27 +00:00
Ashod Nakashian
57947dfd4d
loolwsd: timeout tile requests and reissue them
...
Change-Id: I7dee06d905f59d73fdc9aa4e03831c5e5d16b9e3
Reviewed-on: https://gerrit.libreoffice.org/25007
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 14:33:47 +00:00
Ashod Nakashian
249b5350a4
loolwsd: removed editlock kludge in tile processing
...
Change-Id: If2a732fc3feb4e5cc600c98ab096a88beacf62d8
Reviewed-on: https://gerrit.libreoffice.org/25006
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 14:32:58 +00:00
Ashod Nakashian
d636cc1651
loolwsd: don't reset the expected loolkit count in crash test
...
Change-Id: I84da0eca6b7194f30cce94ea6332e17f821160ec
Reviewed-on: https://gerrit.libreoffice.org/25005
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 14:32:06 +00:00
Ashod Nakashian
66549a6872
loolwsd: improve testLargePaste
...
Change-Id: I789effb1b634c6cde04f936e1f1bc3a0a0868a69
Reviewed-on: https://gerrit.libreoffice.org/24991
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:29:59 +00:00
Ashod Nakashian
cf936a6515
loolwsd: remove redundant code and reuse helpers
...
Change-Id: I9bc007bba6acdc3462437fdcd3cfc931f94ddab1
Reviewed-on: https://gerrit.libreoffice.org/24990
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:29:14 +00:00
Ashod Nakashian
8c9fdace59
loolwsd: temporary documents are auto-removed on process exit
...
Change-Id: I8f24de216823ed3535810f93affabd4f2ce89eb6
Reviewed-on: https://gerrit.libreoffice.org/24989
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:28:36 +00:00
Ashod Nakashian
2726797cb7
loolwsd: improved loolkit process count tests
...
Test for kit process counts are ran before and
after each unit-test.
We expect 1 instance, not 0.
Renamed to follow static member rules.
Change-Id: Ibc1eabf10ffdb75ccaabbc9faff895b7fcc48c48
Reviewed-on: https://gerrit.libreoffice.org/24988
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:28:16 +00:00
Ashod Nakashian
75dd470d06
loolwsd: variable initialization
...
Change-Id: I0dbe0853f2b9bc4a4f69c2763a194766c0f6c616
Reviewed-on: https://gerrit.libreoffice.org/24987
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:27:43 +00:00
Ashod Nakashian
3cf2810ac2
loolwsd: improved testEditLock to minimize random failures and maximize checks
...
Change-Id: I8ae03d57c9f0f13ebf75122dc66ccdf5b756917d
Reviewed-on: https://gerrit.libreoffice.org/24969
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-13 12:58:39 +00:00
Ashod Nakashian
0c004f46d0
loolwsd: improved test logging
...
Change-Id: I1f663d9f3eac0d03cda0f4bbbd3c0b9102bec12b
Reviewed-on: https://gerrit.libreoffice.org/24968
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-13 12:57:58 +00:00
Ashod Nakashian
68b8b2af4f
loolwsd: improve temp file creation and delayed delete
...
Change-Id: I174b87f1aceaacee58121bc60edb420004e69c44
Reviewed-on: https://gerrit.libreoffice.org/24967
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-13 12:56:54 +00:00
Ashod Nakashian
13469e45cb
loolwsd: new check_valgrind target to run tests under valgrind
...
Change-Id: I1aa6d2f7435f4398111af09a4e9ddc6e300cf280
Reviewed-on: https://gerrit.libreoffice.org/24966
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-13 12:56:27 +00:00
Ashod Nakashian
925989c2c7
loolwsd: better crash tests
...
Change-Id: I41d6ae0c80d842ffb3a67f6e20376c0b10068ea5
Reviewed-on: https://gerrit.libreoffice.org/24936
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 15:31:25 +00:00
Ashod Nakashian
50b6381ff8
loolwsd: break socket reading on 0 bytes
...
Change-Id: I30af354684b26ea5e7dc494db6601fa6248febb9
Reviewed-on: https://gerrit.libreoffice.org/24935
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 15:26:16 +00:00
Ashod Nakashian
711b59a2bc
loolwsd: initialize logging sooner and log server startup
...
Change-Id: I33ab52069be0b6c0dca5a741857aa86ae58b67cc
Reviewed-on: https://gerrit.libreoffice.org/24934
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 15:25:56 +00:00
Ashod Nakashian
de5f77c00f
loolwsd: better child management
...
Change-Id: I0de190619008834f096517bd1cfafcdc83261f47
Reviewed-on: https://gerrit.libreoffice.org/24933
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 15:24:32 +00:00
Ashod Nakashian
9376156ac3
loolwsd: correct error report while loading
...
Change-Id: I4e5e4dd1318144255294011c70c6d2bbfd74c1d8
Reviewed-on: https://gerrit.libreoffice.org/24932
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 15:23:11 +00:00
Ashod Nakashian
021209e44d
loolwsd: new run_valgrind target to run loolwsd under valgrind
...
Change-Id: Ic1962428bc7ed4c08b7655c41a1d38af6eeddf75
Reviewed-on: https://gerrit.libreoffice.org/24931
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 15:22:57 +00:00
Ashod Nakashian
a35a000da8
loolwsd: proper error handling of document load failure
...
Change-Id: Ide14609b18b5dad9ac4451ab2dbbbe0544c60b47
Reviewed-on: https://gerrit.libreoffice.org/24908
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 01:56:27 +00:00
Henry Castro
797e41ca56
loolwsd: fix wrong condition
2016-05-11 19:46:51 -04:00
Henry Castro
f1c56d198a
loolwsd: test: add test max col and row
2016-05-11 18:48:59 -04:00
Pranav Kant
a1b351d328
Use new DontTerminateEdit param in .uno:Save to be in edit mode
...
Change-Id: I781eba73af668be874ab91881bcb88494b43a2e9
2016-05-11 21:41:01 +05:30
Pranav Kant
7a96c2fff0
Revert "bccu#1776: Restore input mode if we are in one before saving"
...
This reverts commit 5500b09016
.
Change-Id: I54b385dc823d8fc4e5ef9f6d8291c5cb8ca85417
2016-05-11 21:41:01 +05:30
Pranav Kant
58123086b8
Revert "bccu#1776: Fake double click after auto-saving"
...
This reverts commit 55a85ddb33
.
2016-05-11 21:41:01 +05:30
Andras Timar
2fbcbdfa87
loolwsd: enable UI customization by replacing loleaflet.html from config
2016-05-11 16:30:05 +02:00
Pranav Kant
2b01bdc7ad
Document admin console commands and its scope
...
Change-Id: I5504a8350d6383e64e85b46454586c1e5c8eed87
2016-05-11 15:38:40 +05:30
Andras Timar
d63d200a23
Bump version to 2.0.0
2016-05-11 09:55:17 +02:00
Henry Castro
0f444af60d
loolwsd: test: update sending "status" message
2016-05-11 01:22:57 -04:00
Henry Castro
947884e46a
loolwsd: test: update testInactiveClient
2016-05-11 01:12:18 -04:00
Henry Castro
b3f5873d58
loolwsd: test: update loadDoc
...
loadDoc now test the first incoming status message
2016-05-11 01:07:14 -04:00
Henry Castro
4abc68bfb7
loolwsd: test: update loading views
2016-05-11 01:01:18 -04:00
Henry Castro
bd615ee9bc
loolwsd: test: update isDocumentLoaded.
...
When loading a view, it just send the status messages, because
it is already loaded by main view id 0
2016-05-11 00:49:21 -04:00
Henry Castro
c1849e25bb
loolwsd: send "editlock" when "status" was cached
2016-05-11 00:36:36 -04:00
Henry Castro
5ec04d5184
loolwsd: avoid sending double "status" message
2016-05-11 00:29:56 -04:00
Ashod Nakashian
9c2743144e
loolwsd: variable initialization
...
Change-Id: I27c41c8d5c3f4cb555306a0da5a2475f93d5c49f
Reviewed-on: https://gerrit.libreoffice.org/24870
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:54:30 +00:00
Ashod Nakashian
14340097b8
loolwsd: break socket reading loop on error
...
Change-Id: I37ff42a3ccf4b495d0ecec9ea90bd8e12ddc4e8c
Reviewed-on: https://gerrit.libreoffice.org/24869
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:54:08 +00:00
Ashod Nakashian
1d90ed07f0
loolwsd: don't test for version in loleaflet as it's dynamic
...
Change-Id: I2488695d70cf0463b93671e3ca986808843f4447
Reviewed-on: https://gerrit.libreoffice.org/24868
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:53:47 +00:00
Ashod Nakashian
7c7d6c31cc
loolwsd: refactored socket helpers
...
Change-Id: I9f6bca81f830d9a8f1726abbe29d9343bd41d666
Reviewed-on: https://gerrit.libreoffice.org/24867
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:53:28 +00:00
Ashod Nakashian
a4bfca2dd3
loolwsd: uninitialized variables
...
Change-Id: I2144c8f8ae9ad6298ba596faa504880b7c52256a
Reviewed-on: https://gerrit.libreoffice.org/24866
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:52:59 +00:00
Andras Timar
cc2aa1b5f8
document logging settings
2016-05-10 23:17:47 +02:00
Pranav Kant
55a85ddb33
bccu#1776: Fake double click after auto-saving
...
... just so that if we have the cursor before auto-saving, we
have it after save too (calc).
Change-Id: I3e6b1e41006c8fd9105d370b62ead4f45e50848c
2016-05-10 19:24:38 +05:30
Andras Timar
35c90fbba6
loolwsd: deb package making hack
2016-05-10 15:00:29 +02:00
Ashod Nakashian
a58ffaef71
loolwsd: always get and remember the doc-type on loading
...
Change-Id: I6ba49ecd8343ff6d08ff437d6dc9d664a4becc1d
Reviewed-on: https://gerrit.libreoffice.org/24849
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 12:59:57 +00:00
Ashod Nakashian
5f7b4762e4
loolwsd: reduce lokit callback logs
...
Change-Id: I984f2e1d405b5f95b83efc9e6959fa3140969f4e
Reviewed-on: https://gerrit.libreoffice.org/24848
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 12:59:23 +00:00
Jan Holesovsky
ea082d6363
Use git hash for the loleaflet location instead of version.
2016-05-10 11:48:41 +02:00
Jan Holesovsky
fa6d8c85f8
Correctly produce the git hash, and fallback to version number.
2016-05-10 11:48:41 +02:00
Jan Holesovsky
1166fff924
Fix non-https build.
2016-05-10 11:48:12 +02:00
Andras Timar
bce124502d
add CPPUNIT back (unconditionally)
2016-05-10 11:47:00 +02:00
Andras Timar
beebec76c8
loolwsd is not buildable with --disable-tests, let's remove this option
2016-05-10 11:12:14 +02:00
Andras Timar
ff693c49b8
Debian packaging
2016-05-10 10:18:37 +02:00
Miklos Vajna
c2fc95ac23
Drop unused using declarations
...
Change-Id: Iee778833781c6f00c1fb0b8fc1975acfe4fb0cd9
2016-05-10 09:14:22 +02:00
Ashod Nakashian
fd1412c03c
loolwsd: test fixes to match latest changes
...
Change-Id: I6e972a8b6b77728885b56f520355ed30aff4b197
Reviewed-on: https://gerrit.libreoffice.org/24820
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 03:58:49 +00:00
Ashod Nakashian
378ce7544a
loolwsd: try to recover when a client doesn't go away while connecting another
...
Change-Id: Id585bfe53c6b60cc7de7fa271739d43876d6e832
Reviewed-on: https://gerrit.libreoffice.org/24815
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 03:47:10 +00:00
Ashod Nakashian
074da45f0a
loolwsd: send both setpart and curpart when activating
...
Change-Id: Ie717c70f34e94b768c5284ac31075e32335bd174
Reviewed-on: https://gerrit.libreoffice.org/24814
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 03:46:30 +00:00
Ashod Nakashian
e2f5f45140
loolwsd: remove mark-to-destory when we no longer have a sole client
...
Change-Id: Ic82176c458165faa1f719d313cc7fe0b4e6eacbb
Reviewed-on: https://gerrit.libreoffice.org/24812
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 03:45:38 +00:00
Ashod Nakashian
ca22a79034
loolwsd: simplify detection of file modification
...
To avoid persisting the same document many times over
we check the jailed file timestamp. This logic
doesn't need to be more complex than simply invalidating
the last timestamp upon issuing .uno:Save and setting
it to the file's actual timestamp upon persisting.
Change-Id: I4afdf8da93fed438d4cbcd6de8dc14d52172ac9c
Reviewed-on: https://gerrit.libreoffice.org/24811
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 03:44:33 +00:00
Pranav Kant
5500b09016
bccu#1776: Restore input mode if we are in one before saving
...
Change-Id: I46d57dce69777fdfe6afb95f9534b170972fe390
2016-05-09 21:59:13 +05:30
Andras Timar
186b397130
add test/countloolkits.hpp to tarball
2016-05-09 12:25:42 +02:00
Andras Timar
b26c8fc0ab
add test/helpers.hpp to tarball
2016-05-09 12:23:46 +02:00
Jan Holesovsky
f041c3ffc0
Scope the lock to avoid warnings.
2016-05-09 11:41:37 +02:00
Jan Holesovsky
7bb1fa2908
'make run' should enable the admin console too.
...
'make run' must _not_ be used for a production environment already anyway due
to the --allowlocalstorage, so allowing the admin console with some trivial
credentials is hopefully OK.
2016-05-09 10:43:37 +02:00
Ashod Nakashian
b58b906f36
loolwsd: fix typo causing infinite recursion
...
Change-Id: I8a5ef2b65d3476a698d7dcf883ac8dc07e287533
Reviewed-on: https://gerrit.libreoffice.org/24788
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:31:55 +00:00
Ashod Nakashian
1ab1511a0e
loolwsd: improved auto-save tests
...
Change-Id: If24b5e4cb585ffc59d31583cb10dfa3e57dc3056
Reviewed-on: https://gerrit.libreoffice.org/24787
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:31:02 +00:00
Ashod Nakashian
4cec994c36
loolwsd: auto-saving improvements
...
When multiple clients disconnect simultaniously
auto-save could fail.
Change-Id: I8a08e23d651674f43d30e8713fa2df0acccead15
Reviewed-on: https://gerrit.libreoffice.org/24786
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:30:32 +00:00
Ashod Nakashian
b06a07f6bc
loolwsd: auto-save checks modified state and logs decision
...
Change-Id: I69d32e8c5ceabd46b635aa6c5bb30ade21101fd0
Reviewed-on: https://gerrit.libreoffice.org/24785
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:29:58 +00:00
Ashod Nakashian
8f5f0ffdb1
loolwsd: don't persist documents again within 10 seconds
...
Change-Id: Ic11ef0bb4cdb85481a504729f2dfe26f5c80ee9c
Reviewed-on: https://gerrit.libreoffice.org/24784
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:26:38 +00:00
Ashod Nakashian
4cba61525c
loolwsd: test notification replay on re-activation
...
Change-Id: I46471a2a3ecce219cf1b922aeebf0fdb02f66614
Reviewed-on: https://gerrit.libreoffice.org/24783
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:26:15 +00:00
Ashod Nakashian
b18246569d
loolwsd: verify the number lokit instance before and after each test
...
Change-Id: Ia38475dc78ef5b4dc116a2d6f9791c7012985b5d
Reviewed-on: https://gerrit.libreoffice.org/24782
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:24:25 +00:00
Ashod Nakashian
b0843ba443
loolwsd: test helpers accept smart pointer WebSocket too
...
Change-Id: I83e62c7ce0daa6e44fb7f163607436640c9b9f08
Reviewed-on: https://gerrit.libreoffice.org/24781
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:22:43 +00:00
Ashod Nakashian
f20a9e94b6
loolwsd: templatize parsing helpers
...
Change-Id: Ia52dbf59bf5f2a816578b75111ee9accdeaaf816
Reviewed-on: https://gerrit.libreoffice.org/24780
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:21:37 +00:00
Tor Lillqvist
ab92acac20
Spelling correction
2016-05-09 07:30:26 +03:00
Ashod Nakashian
702dd48f1f
loolwsd: safer document saving
...
Relying on the filesystem to tell us when the document
was last modified (to decide whether to upload to storage or not,)
proved unreliable.
Now we always upload to storage if there is only one client.
This both minimizes the risk and also avoids the file timestamp
check as a workaround to the problem of re-uploading documents
as many time as there were clients. Since with one client we
can only upload no more than once per save, which is reasonable.
Furthermore, when a client disconnects we auto-save automatically
as a matter of precaution. However, when there are other clients
still connected, we don't wait for the save to complete, rather
we let that job to the very last one.
Change-Id: I94a2e4bddaed30a6c9c0e69f8006667d33c5b8ee
Reviewed-on: https://gerrit.libreoffice.org/24767
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 15:49:41 +00:00
Ashod Nakashian
ce36141662
loolwsd: verify type before parsing part names/codes
...
Change-Id: Ib841167264d756850cb62e20f8a16a3ba147de37
Reviewed-on: https://gerrit.libreoffice.org/24763
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 13:08:53 +00:00
Ashod Nakashian
a820ec382b
loolwsd: remove extra space between 'status: ' and the message
...
Change-Id: I122931f3aba2cf02f382f41531e01cb9f3eb7968
Reviewed-on: https://gerrit.libreoffice.org/24762
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 13:08:35 +00:00
Ashod Nakashian
dd164f905f
loolwsd: no need to send clients current part on invalidation
...
Invalidation messages already contain the part they
are referring to (with the exception of EMPTY).
Sending clients the current part makes it hard
to let clients view different parts of a doc
while an editor types.
It also implies that the part has changed,
which isn't necessarily true. If it is, a
separate curpart notification will be sent.
Change-Id: I49afcebef8994c892ef8be633d3ce3982b031d2b
Reviewed-on: https://gerrit.libreoffice.org/24750
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:39:07 +00:00
Ashod Nakashian
e7d2ed499f
loolwsd: more notifications to replay on re-activating clients
...
Change-Id: Ieb91eee0cb4ff66cd6bea129039f8fe328939888
Reviewed-on: https://gerrit.libreoffice.org/24749
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:37:14 +00:00
Ashod Nakashian
2829febd15
loolwsd: logging improvements
...
Change-Id: I5591e309ac9fbcbd79c816b26e65f51b77018bb2
Reviewed-on: https://gerrit.libreoffice.org/24748
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:36:00 +00:00
Ashod Nakashian
b3acb4001d
loolwsd: add tests to validate Impress page changes
...
Validate the pages before/after insert/delete and
undo/redo operations.
Change-Id: I16aa14f022a8bb0a4b126ea9bc222b788dc7d2dc
Reviewed-on: https://gerrit.libreoffice.org/24747
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:33:27 +00:00
Ashod Nakashian
710134e1be
loolwsd: cleanup Impress InsertDelete test
...
Change-Id: I9dfc5ee36797d0b6a8bff7b5c7e54007c6115bb0
Reviewed-on: https://gerrit.libreoffice.org/24746
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:32:34 +00:00
Ashod Nakashian
d2f4a516a6
loolwsd: spawn ForKit process after initializing server
...
WSD server must be up and listening to incoming
connections before firing up ForKit and spawning
children.
Having the order reversed caused tests to fail
randomly when WSD was slow to listen to incoming
connections from children already initialized.
Change-Id: I4eaf4a658c65da024101efc096c39222ebfa3c00
Reviewed-on: https://gerrit.libreoffice.org/24745
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:31:44 +00:00
Ashod Nakashian
1a896de0a7
loolwsd: getStatus and status formatting cleanup
...
Change-Id: Ifd842d7ded1be1f4c89d8371790f19a3909c9729
Reviewed-on: https://gerrit.libreoffice.org/24744
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:28:18 +00:00
Ashod Nakashian
f02deef936
loolwsd: proper logging in Prefork Unit and other cleanups
...
Change-Id: I23017d3d34edb3608cfe8bc0b5c5eaa340231033
Reviewed-on: https://gerrit.libreoffice.org/24743
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:27:09 +00:00
Ashod Nakashian
641038ef47
loolwsd: noisy failure when test can't collect stats
...
Change-Id: I6a1693954d84d175478b08f3a49e07e9447e1517
Reviewed-on: https://gerrit.libreoffice.org/24742
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:26:36 +00:00
Ashod Nakashian
5c47a42fea
loolwsd: handle socket errors in Prefork Unit
...
Change-Id: Idc5a2ea776e0b8f0cde43526d690468e1969e611
Reviewed-on: https://gerrit.libreoffice.org/24741
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:26:00 +00:00
Ashod Nakashian
21bf2ff129
loolwsd: give children time to settle after forking before checking
...
Change-Id: If29d564f16a29f94791c28f5cb03be2ebf7219f3
Reviewed-on: https://gerrit.libreoffice.org/24740
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:24:51 +00:00
Ashod Nakashian
6f39c0f282
loolwsd: state the child PID which has no DocumentBroker
...
Change-Id: Ifa679ac67cc0a1d12bba4a44f24831e7a291d97d
Reviewed-on: https://gerrit.libreoffice.org/24739
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:21:41 +00:00
Ashod Nakashian
4369cb1ff3
loolwsd: UnitPrefork times out while waiting on child to respond
...
This prevents deadlocking in case of test failure.
Change-Id: I3026311e9a67543a26acb0316546e6b5aacf61dc
Reviewed-on: https://gerrit.libreoffice.org/24738
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:18:36 +00:00
Ashod Nakashian
9e7b086587
loolwsd: refactored new child addition
...
Change-Id: I5f554dd0c2d37be3f90059bc8a943cbbe7ac094b
Reviewed-on: https://gerrit.libreoffice.org/24737
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:17:06 +00:00
Ashod Nakashian
8e480d7ac1
loolwsd: use paintPartTile and remove workarounds
...
Change-Id: Ice59004a23919c7a77a00782f7210a83bc1464e7
Reviewed-on: https://gerrit.libreoffice.org/24703
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-06 15:06:37 +00:00
Pranav Kant
27497ba4dc
loolwsd: Fix tile previews for viewing sessions
...
Also, don't let these tile previews change part of the document
permanently. This is a temporary solution till we have some
better API from LOKit to deal with such a situation.
Change-Id: I8dfefd2b7ad8cf3e7a57afb95b57994ef0bb3b6c
2016-05-06 16:20:27 +05:30
Pranav Kant
1f990d3fc2
loolwsd: Fix incorrect position of id=, editlock= params
...
editlock= is always the last parameter. This fixes the slide
previews in impress documents for editing session.
Change-Id: I3531c7f52e09e655524fa0afd6fe66da504b5d70
2016-05-06 14:44:03 +05:30
Henry Castro
e03d4f7b77
loolwsd: fix -Werror=shadow
2016-05-05 14:53:34 -04:00
Ashod Nakashian
1643938a8e
loolwsd: support the tile id param when broadcasting tiles to subscribers
...
Obviously this is dangerous, since the id is not part of the
subscription key (the filename) so different clients could
have different ids on the same part, but in practice I
expect this not to happen. Though that clearly depends on
how clients use the id.
Change-Id: I52a0b043c9b5e5ad1111b692e4216cc9ffec5b2b
Reviewed-on: https://gerrit.libreoffice.org/24680
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-05 14:23:22 +00:00
Ashod Nakashian
346a063d0a
loolwsd: fix regression to handling tile command
...
Change-Id: Idedf25f3756ea1e04daf17540b1a57e1e7af8448
Reviewed-on: https://gerrit.libreoffice.org/24679
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-05 14:22:53 +00:00
Ashod Nakashian
83307291ec
Document id argument of tile and tilecombine
...
Change-Id: Ia43ceae31936f68d2bed04b5291a25eeffc637b3
Reviewed-on: https://gerrit.libreoffice.org/24676
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-05 11:37:24 +00:00
Pranav Kant
7734f2557a
loolwsd: Do not allow viewing sessions to change parts
...
bccu#1433, bccu#1757 related.
Piggyback editlock information to tile messages so that kit can
use that information to allow changing parts only for messages
with editlock.
... and decline tile render request for tile messages without editlock
information
Change-Id: I9cedb870cd977741375665cb258d04c818481a14
2016-05-05 14:28:03 +05:30
Ashod Nakashian
909c996a6d
bccu#1774: poor API never fails to frustrate
...
The tile and tilecombine messages apparently have optional
appendages at their rear ends. Not one, but two (at least).
While the first (timestamp) seems to be truely optional
(in the sense that leaving it out doesn't break anything,)
the same can't be said of the second (id).
For Impress slides this id is used to identify the slide
to which the tile belongs. Or rather the slide being
rendered, as it seems meaningful only for the slide
thumbnails.
Previously the complete arguments of tile were copied
verbatim from the input to the output (i.e. back to the
client) and so any extra payload was also echoed back.
But when id is missing (when expected) loleaflet not
only fails to show these tiles (understandably,) but
it also fails to show the scrollbar for said slide
thumbnails altogether!
With the new logic to move the tile communication to
the child socket instead of the clients, the arguments
are parsed and then serialized back in the response.
So all fields must be explicitly known in advance.
This change is necessary because tilecombine is broken
to tile commands and so both share common code. This
means that echoing back the request verbatim will
break loleaflet since tilecombine arguments (which
is a list) is not a valid response (which has the
format of tile). So the internal representation
has to be something neutral/common.
The fix is to parse the timestamp and id only when
provided and to echo back the id only in that case.
Change-Id: Ic97cf0de4083d412a4b3543e8b9a8713ac27a27c
Reviewed-on: https://gerrit.libreoffice.org/24669
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-05 02:41:59 +00:00
Ashod Nakashian
cd8d48e6bb
loolwsd: tile logs
...
Change-Id: Id5c8b688c36038dc6f02ad95ad1c43412dcd2c31
Reviewed-on: https://gerrit.libreoffice.org/24668
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-05 02:34:13 +00:00
Ashod Nakashian
fedb3f520a
loolwsd: factored out common tile message
...
Change-Id: I39600821e3c9c40f3a63343b167cddb3e42b7072
Reviewed-on: https://gerrit.libreoffice.org/24667
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-05 02:33:52 +00:00
Henry Castro
4d52c200c5
loolwsd: test: add testSlideShow
2016-05-04 16:19:47 -04:00
Henry Castro
ae80052e80
loolwsd: add mime type svg
2016-05-04 16:17:29 -04:00
Andras Timar
627cbb73de
admincreds' argument is not directory
2016-05-04 20:33:13 +02:00
Ashod Nakashian
25c550ff8e
loolwsd: test that slow/hung clients don't block others
...
Change-Id: I16697ab3afd1d209a77d48506604ec7babc1bfff
Reviewed-on: https://gerrit.libreoffice.org/24655
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 12:38:09 +00:00
Jan Holesovsky
68ed15628d
Another place that hardcodes the URI.
2016-05-04 13:56:39 +02:00
Jan Holesovsky
f40167cd6e
Initialize the _url correctly.
2016-05-04 13:39:32 +02:00
Jan Holesovsky
191ee00f2c
Run the tests on ports that do not conflict with a 'normal' loolwsd.
...
For the moment, it will allow running 'make check' that does not conflict with
an already running loolwsd (eg. from 'make run'). Later we can consider
running more tests in parallel.
2016-05-04 13:39:32 +02:00
Jan Holesovsky
f6f4681556
Use a separate client port for running the tests.
...
So that they can run in parallel to a 'production' loolwsd (like one from
'make run' or so) in the future; for the moment it is not possible, as the
MASTER_PORT is hardcoded.
2016-05-04 13:39:32 +02:00
Jan Holesovsky
4935bf14b4
LOOL_TEST_CLIENT_PORT env. var for overriding the client port in the tests.
...
And some further reduction of #ifdef ENABLE_SSL's...
2016-05-04 13:39:32 +02:00
Miklos Vajna
29f11ccab9
loolwsd: fix -Werror,-Wunused-function
...
Change-Id: Ifc58722337bdc62952082ddfb11ce90cd6fc21c2
2016-05-04 13:38:04 +02:00
Ashod Nakashian
92c068541a
loolwsd: -Werror=shadow
...
Change-Id: Ifc3c065fd7b6d20f8bad5f5a6a1b48c47bc8f1e0
Reviewed-on: https://gerrit.libreoffice.org/24649
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 11:19:38 +00:00
Ashod Nakashian
82333e06fa
loolwsd: add explanation as to why code is commented out
...
Change-Id: I3478d6c84cd960c4a7317ee5adc75db8c13aeaef
Reviewed-on: https://gerrit.libreoffice.org/24647
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:56:41 +00:00
Ashod Nakashian
bc58536113
loolwsd: new tiles unittest
...
Change-Id: Id63f1ae03c1d33dec666c43d64042838df10c29d
Reviewed-on: https://gerrit.libreoffice.org/24646
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:38:27 +00:00
Ashod Nakashian
2b02caa0b5
loolwsd: getResponseMessage that can return large binary payloads
...
Change-Id: Ie2cd3db5abdf00a04a6970825359095608fdb660
Reviewed-on: https://gerrit.libreoffice.org/24645
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:37:59 +00:00
Ashod Nakashian
a760c71ed6
loolwsd: tests should print progress and errors to cerr
...
Change-Id: I07341ef26de877b01f6dff0d8df81be4e1b4bed2
Reviewed-on: https://gerrit.libreoffice.org/24644
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:37:42 +00:00
Ashod Nakashian
25a8b71dbb
loolwsd: hoist invariant message out of loop
...
Change-Id: I9319518a4bbba9c24ba5c0132d89ad6a793247e8
Reviewed-on: https://gerrit.libreoffice.org/24643
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:37:24 +00:00
Ashod Nakashian
cdb5f9c2da
loolwsd: moved tile tests to TileCacheTests.cpp
...
Change-Id: I6bc681772104615b79bbe3a21ccaead01abde4dd
Reviewed-on: https://gerrit.libreoffice.org/24642
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:37:10 +00:00
Ashod Nakashian
df67c4a31c
loolwsd: move tilecombine handling into lokit
...
Change-Id: I32854769c5260444b0e97c112a141028f1cda179
Reviewed-on: https://gerrit.libreoffice.org/24641
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:36:38 +00:00
Ashod Nakashian
a240f2666f
loolwsd: tile traffic is now completely centralized
...
WSD's DocumentBroker and Kit's Document now handle
the communication of tiles as well as all aspects
of rendering, caching, unifying requests and
distributing results etc.
Change-Id: Ie22fbaaae26b91185ee348ec7077f30430eec0f6
Reviewed-on: https://gerrit.libreoffice.org/24640
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:36:01 +00:00
Ashod Nakashian
ff0d4a3a91
Revert "Revert "loolwsd: establish communication with...
...
...child from DocumentBroker""
Restore the communication with child from DocumentBroker.
This reverts commit 20ab6e8ae7
.
Change-Id: I248bededff7074d8fb482b2cdd172048f80c02b2
Reviewed-on: https://gerrit.libreoffice.org/24639
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:33:48 +00:00
Ashod Nakashian
ac4f9857ea
loolwsd: getAbbreviatedMessage adds no brackets
...
Change-Id: Ic26feda6fa8e9e93548624f9d6b6fd84f085eb19
Reviewed-on: https://gerrit.libreoffice.org/24638
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:33:21 +00:00
Ashod Nakashian
8b18038718
loolwsd: prespawnChildren should be forgiving when lock is not available
...
Change-Id: Id84aa873113f7d3d575ad10504582d93eff51baa
Reviewed-on: https://gerrit.libreoffice.org/24637
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:33:06 +00:00
Ashod Nakashian
3b693ac735
loolwsd: use return value of std::max
...
Change-Id: Ifd4e06c1a646de8d3c2c67166b2e2c57fe2ab761
Reviewed-on: https://gerrit.libreoffice.org/24636
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:32:32 +00:00
Jan Holesovsky
b0af4bb3f9
Disable this test, it's unreliable.
...
For me, it is deadlocking - while we are waiting on the condition variable,
the tear down of the actual LOK / document is not progressing, because it is
waiting on something.
I was unable to get to the bottom of this in a reasonable time, so just
disabled the test for the moment; Ash is working on a similar problem I think,
so let's see if his solution helps here too (or can be applied the same way or
something).
2016-05-04 11:36:09 +02:00
Jan Holesovsky
c3ac6c8287
Better wording.
2016-05-04 11:30:41 +02:00
Andras Timar
dd21e402d4
Bump version to 1.6.4
2016-05-03 23:32:05 +02:00
Jan Holesovsky
030b59a5af
Redirect stdout to the log too.
...
Without this, the unit-prefork gives unpredictable results depending on
whether the entire unit test run output is redirected to another logfile or
not (as then the stdout is inherited, and points to an unexpected place).
Maybe we should just exclude the fd 0, 1, 2 from the testing; but this is good
enough for now.
2016-05-03 14:51:40 +02:00
Pranav Kant
0559b58144
loolwsd: Use SocketProcessor from IoUtil in Admin
...
Change-Id: Ic89f04ee61f58ae13da9205e84d36ec06ed1d7ee
2016-05-03 12:59:02 +05:30
Tor Lillqvist
82f6a9a2ba
Edit typo in comment to make it actually make sense
2016-05-03 09:56:33 +03:00
Tor Lillqvist
bfcf9756f5
Don't assert on PING frames that we send
...
UnitPrefork got what I assume is one of those PING frames that
ChildProcess::isAlive() sends before the actual reply when it sent the
"unit-memdump" message, and did not like it. Uncommenting the line
that outputs the "memory stats" message it expects showed:
Got memory stats 'PING'
Followed by:
Assertion `tokens.count() == 2' failed.
Fix by factoring out the handling of PING frames, PONG frames, and the
pseudo-PONG frames that we send ourselves in reply to PING frames into
a new function IoUtil::receiveFrame(). Use that in a couple of
places. (Probably should use in many more places.)
Getting past this then leads to later cppunit tests again being run,
and their failures then again showing up...
2016-05-03 09:50:38 +03:00
Tor Lillqvist
79968ccefb
Clarify binary vs text frame non-distinction
...
Note that we currently have unit tests that incorrectly (IMHO) require
some frames sent by the server to indeed be 'text' ones from the
WebSocket perspective. That is an unnecessary restriction.
2016-05-03 08:23:06 +03:00
Tor Lillqvist
15e216ff7c
Clarify that single-line don't need a newline terminator
2016-05-03 08:15:06 +03:00
Ashod Nakashian
431bab2824
loolwsd: fix autosave regression
...
Autosave should only save when the user has been idle
for a certain time, or the periodic autosave time elapses.
The document is considered for autosave only when it's modified.
Change-Id: Ia239173ff6636e52c1a2b7e1f6bf9bd6860175ed
Reviewed-on: https://gerrit.libreoffice.org/24602
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-03 03:05:44 +00:00
Ashod Nakashian
68f24e375a
loolwsd: replenish the child reservoir and cleanup dead ones
...
Change-Id: I705ba01ca6254ff61ddd8ebc1248117b9fec7d20
Reviewed-on: https://gerrit.libreoffice.org/24601
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-03 03:05:29 +00:00
Ashod Nakashian
7d03ebdf85
loolwsd: corrections to terminate SocketProcessor
...
Change-Id: I3b08d1b2f734b8736ed35f667c1ca988490c4fa4
Reviewed-on: https://gerrit.libreoffice.org/24600
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-03 00:01:13 +00:00
Ashod Nakashian
6c57e9be4d
loolwsd: helper to assert a lock is already taken
...
Change-Id: Id28f7a39a4d45ea6ad391015364467dc8ded3e66
Reviewed-on: https://gerrit.libreoffice.org/24599
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-03 00:00:13 +00:00
Ashod Nakashian
cf717152a7
loolwsd: bin_PROGRAMS -> noinst_PROGRAMS
...
Change-Id: Idfcfc9d21edafd094aa7c50b300b298e1ddfe6f5
Reviewed-on: https://gerrit.libreoffice.org/24598
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-02 23:54:50 +00:00
Jan Holesovsky
511b6c1039
Reduce #ifdef ENABLE_SSL's.
2016-05-02 18:41:57 +02:00
Jan Holesovsky
e2be97f14a
Centralize the server URI.
2016-05-02 18:25:58 +02:00
Jan Holesovsky
c3cb14d258
Centralize the server URI.
2016-05-02 18:19:08 +02:00
Jan Holesovsky
a27a22b563
Add purpose comments.
2016-05-02 18:03:09 +02:00
Jan Holesovsky
b3dd2f31f9
Update the gdb command to match reality.
2016-05-02 15:03:16 +02:00
Jan Holesovsky
9df5ccc517
Make this unit test running without SSL too.
2016-05-02 15:03:16 +02:00
Andras Timar
faf7f5a167
redirect stderr to /dev/null (some search directories do not exist on all systems)
2016-05-02 13:17:13 +02:00
Jan Holesovsky
20ab6e8ae7
Revert "loolwsd: establish communication with child from DocumentBroker"
...
Unfortunately this causes a deadlock in the unit tests.
This reverts commit 10417c9447
.
2016-05-02 11:49:58 +02:00
Michael Meeks
6b88e97b63
Add unit test hook for libreofficekit.
2016-05-02 05:40:24 +01:00
Ashod Nakashian
10417c9447
loolwsd: establish communication with child from DocumentBroker
...
The WebSocket that each child created with WSD is not used
except to request the child to load the document a client
requests. Beyond this point, it was not utilized for anything.
In fact, there are no handlers in WSD for messages coming
from the child; it is a one-way communication.
That is until now. With the move to unify communication
between WSD and each child, DocumentBroker can now
receive and handle messages from its ChildProcess.
Change-Id: Ie7f030a92db8303cd7087fff2325f136a49bc7fc
Reviewed-on: https://gerrit.libreoffice.org/24581
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-02 02:55:53 +00:00
Ashod Nakashian
c913e8e135
loolwsd: assert when we should be called with lock acquired
...
Change-Id: If784dbbfe6ca687fff181f623e413e9b86d51807
Reviewed-on: https://gerrit.libreoffice.org/24580
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-02 02:53:22 +00:00
Ashod Nakashian
1117be07c4
loolwsd: expose sending binary frame on Sessions
...
Change-Id: I5e81ced0511e44dc5f3445dae42f4354da164b3a
Reviewed-on: https://gerrit.libreoffice.org/24579
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-02 02:53:04 +00:00
Ashod Nakashian
c757253939
loolwsd: getAbbreviatedMessage from std::vector<char>
...
Change-Id: Ib901fb786839d48604a99a0eab0c7dd048e2004d
Reviewed-on: https://gerrit.libreoffice.org/24578
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-02 02:52:46 +00:00
Ashod Nakashian
3dc72cab18
loolwsd: ChildProcess cleanup
...
Change-Id: I1ae4911d3f5d527af86f39ed2723bbceef12cffe
Reviewed-on: https://gerrit.libreoffice.org/24577
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-02 02:52:28 +00:00
Ashod Nakashian
713cf3c067
loolwsd: return static data via static members
...
Change-Id: I083cdc921062ef518c9b39bae219caba6c99ee60
Reviewed-on: https://gerrit.libreoffice.org/24576
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-02 02:52:11 +00:00
Ashod Nakashian
516bad1942
loolwsd: TileCache whitebox tests
...
New unittests to verify TileCache logic on the unit level.
Change-Id: Ia36181e850b349abb88ba5f04f1e5244771bacc6
Reviewed-on: https://gerrit.libreoffice.org/24574
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 17:18:35 +00:00
Ashod Nakashian
b916543eef
loolwsd: tests can be built with running using 'make'
...
Indeed, tests are built when invoking make in loolwsd
directory, thereby helping catch build errors in test
before committing.
Change-Id: I34cffcb5d0aed6485e578cf20f64217bee337d23
Reviewed-on: https://gerrit.libreoffice.org/24573
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 17:17:46 +00:00
Ashod Nakashian
a800d366ba
loolwsd: missing header
...
Change-Id: Ib03f6fa048b0b38c0cba4216c4ca9b60f663f3f4
Reviewed-on: https://gerrit.libreoffice.org/24572
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 17:17:18 +00:00
Ashod Nakashian
461fd40b49
loolwsd: more support for TileCache unittest
...
Change-Id: I7b09fdde8179c855bbb1545f3a2188be1c929d20
Reviewed-on: https://gerrit.libreoffice.org/24571
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 17:17:05 +00:00
Ashod Nakashian
d16f44d7a2
loolwsd: TileCache unittest, hooks, and events
...
Change-Id: Id9e0539d2f920f15b0d0cb8e5924e480ed6d1e87
Reviewed-on: https://gerrit.libreoffice.org/24570
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 17:16:31 +00:00
Ashod Nakashian
b0eed75f05
loolwsd: differntiating Poco and std exceptions in logs adds little value
...
Change-Id: I1c571ef46d58b1f007cba58506a3fbfd460fb0f0
Reviewed-on: https://gerrit.libreoffice.org/24569
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 16:38:50 +00:00
Ashod Nakashian
e311e26641
loolwsd: private better than public
...
Change-Id: Ie4e9abf160a0a9d9c7de8e31358468ce154a30cd
Reviewed-on: https://gerrit.libreoffice.org/24568
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 16:38:31 +00:00
Michael Meeks
012593e375
Unit test cleanups.
2016-04-30 18:15:50 +01:00
Ashod Nakashian
8e31a512b1
loolwsd: fix a race between loading and setting part
...
Change-Id: Ib9a5b3dfe82ff5915208c420b8dc8124d08c5533
Reviewed-on: https://gerrit.libreoffice.org/24529
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:38:35 +00:00
Ashod Nakashian
59b475570d
loolwsd: no need to sleep before running tests
...
Since lokit process counting waits until WSD
is ready (i.e. until it has created lokit processes,)
there is no need to sleep explicitly anymore.
Provided, of course, we always call the lokit
process counter before running any tests, which we
currently do.
Change-Id: Idf7ad925688251f1c81ef8628530714d2dc92d9c
Reviewed-on: https://gerrit.libreoffice.org/24528
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:37:36 +00:00
Ashod Nakashian
fd99834147
loolwsd: always run the lokit process count tests
...
Change-Id: I47365609850c23843624f714d6600f07629461ae
Reviewed-on: https://gerrit.libreoffice.org/24527
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:37:06 +00:00
Ashod Nakashian
5871ef32a9
loolwsd: log the pid in the backtrace
...
Change-Id: Ic0565f266f1ad56d855a76fb42fac8066066fd45
Reviewed-on: https://gerrit.libreoffice.org/24526
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:36:48 +00:00
Ashod Nakashian
bdfda58386
loolwsd: don't autosave when document not loaded
...
Change-Id: I44e9c2ad234ee05348b47415add3933c81fce968
Reviewed-on: https://gerrit.libreoffice.org/24525
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:36:28 +00:00
Ashod Nakashian
fc9df5db91
loolwsd: don't log memory usage if not changed
...
Change-Id: I98c43abb87e2291a304e77d6eb09ea1800545b72
Reviewed-on: https://gerrit.libreoffice.org/24524
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:36:02 +00:00
Ashod Nakashian
67fb02d277
loolwsd: formatting, logging, and comments
...
Change-Id: I0292c39b18d013829d20ef23afcf970eefbe7d42
Reviewed-on: https://gerrit.libreoffice.org/24523
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:35:38 +00:00
Ashod Nakashian
ce64895cee
bccu#1751 deadlock during save
...
While there are two separate callbacks registered
(one with lokit and the other with lokitDocument,)
there is no reason why they should be handled
separately (and indeed differently).
The lokit callback only sends notifications on
status indicator (during loading and saving)
and document password type (if protected).
Due to the different callback handlers
the status indicator was only sent to the
first client, not all (as one expects).
Furthermore, because the lokit callback
was processed on the Core thread, it
was bound to cause performance and
thread-safety issues. Specifically it
deadlocked when another callback was
in flight when a save issued status
indicator callback.
By unifying the callbacks and putting
all callback messages on the message
queue we avoid all of the above and
simplify the code.
Change-Id: I5bd790b6ce88b7939186c1ec1dead7fb6cabf7e0
Reviewed-on: https://gerrit.libreoffice.org/24522
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:34:32 +00:00
Ashod Nakashian
4be73e5934
loolwsd: minor improvement to testing socket flags
...
Change-Id: I87d4d6a22fccef97bf69fce249ec0374db417714
Reviewed-on: https://gerrit.libreoffice.org/24502
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 21:20:11 +00:00
Ashod Nakashian
a007a7c1d4
loolwsd: improved LoKit process counting
...
Change-Id: I514ece4ce7f401a8996bc115ab00ddb7a8bec90d
Reviewed-on: https://gerrit.libreoffice.org/24501
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 21:19:46 +00:00
Jan Holesovsky
2b9295e8d7
countLoolKitProcesses() is more reliable here.
2016-04-29 22:02:21 +02:00
Jan Holesovsky
ce691601dd
Need a longer default timeout for the httpwstest.cpp.
2016-04-29 22:02:21 +02:00
Jan Holesovsky
d906bba7d1
Added a FIXME explanatory comment.
2016-04-29 15:16:59 +02:00
Jan Holesovsky
9f5ca3f0ff
Help the autodoc.
2016-04-29 13:42:01 +02:00
Ashod Nakashian
66392f4121
loolwsd: gitignore looltest
...
Change-Id: Icc90db9e98309db5348bf608662b5f34a1980a7e
Reviewed-on: https://gerrit.libreoffice.org/24492
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 11:31:55 +00:00
Ashod Nakashian
0e4c624f0b
loolwsd: minor improvement to test assertions
...
Change-Id: I40da725919ae775d039217c258ecd28a743b5bc1
Reviewed-on: https://gerrit.libreoffice.org/24484
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:40:13 +00:00
Ashod Nakashian
afa3e7c4ed
loolwsd: log error on failure, not success
...
Change-Id: Iac417c3779f3879697d056b5e402e91902bfd168
Reviewed-on: https://gerrit.libreoffice.org/24483
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:39:49 +00:00
Ashod Nakashian
42a88e2362
loolwsd: fix load test regression
...
Change-Id: Icadd22306f61338698aedb1b6b5d4e02246d9a4e
Reviewed-on: https://gerrit.libreoffice.org/24482
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:39:22 +00:00