Commit graph

486 commits

Author SHA1 Message Date
Michael Meeks
f9f392ab5c Storage: add as_scheme to allow auto-determination of whether to use SSL.
This is the new default - do as we're told by the client.
The old setting is left to allow users to force SSL if they are
concerned that they may receive unhelpful URLs.

Change-Id: Idea83aacea6826a8f37264e34d49c7550efe6d27
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93179
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-30 14:53:25 +02:00
Pranam Lashkari
b67b335b50 killpoco: Removed Poco::Thread::sleep
Replaced method with std::this_thread::sleep_for

Change-Id: I26e37475d67816e4f1d68d222b1c067107c27b05
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/83200
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-29 10:28:53 +02:00
Andras Timar
33000dfded typo fixes in comments and code
Change-Id: I6f31e050aab701e31064e1abc9429dce0a50c279
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92953
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-26 23:19:52 +02:00
Tor Lillqvist
1525f774d9 tdf#128502: Get rid of the static file-level variable 'document' in Kit.cpp
It is not a problem in the multi-process web-based Online, where the
variable exists separately in each KIT process (which handles exactly
one document). But in a mobile app, when we want to be able to handle
multiple document in the single process, we can't have such variables.

Change-Id: I1d3da48316eb3a8c72ff4957cc3fcba8f6870f16
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92582
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-21 12:15:07 +02:00
Michael Meeks
3e4ac31c7c killpoco: remove WebSocket includes from a couple of places.
Change-Id: I06740cd978bec8e6a74beb8ed9ef8f4f970a2535
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92470
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-18 18:29:04 +02:00
Tor Lillqvist
4eb598711c Use #pragma once
LibreOffice core uses that, too, and we support an even more
restricted set of compilers.

Change-Id: I0d0e2c8608e323eb5ef0f35ee8c46d02ab49a745
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92467
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-18 15:00:18 +02:00
Tor Lillqvist
2c07a36b69 Fix comment
Change-Id: I726f3cd30a9a7d393a414efbaebabdc1807f4ecc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92388
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-17 07:23:58 +02:00
Ashod Nakashian
c2c854b22c wsd: test: print assertion message as well
Change-Id: I26854ed8ad16be53ea91bd728f2090180ff5775d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92382
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-04-16 20:37:11 +02:00
Michael Meeks
a7dc2d1467 kill IoUtil - obsolete & unused.
The switch away from LOOLWebSocket and the use of a websocket
for talking to forkit removes the need for the pipe code.

Change-Id: Ifb0c6c88681289e7a1709d9bc3281532935c7be4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92033
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-10 16:38:25 +02:00
Michael Meeks
5710c86323 Poll - switch to ppoll for closer to microsecond accuracy.
Change-Id: Ib8a2bb6f60302df8631edadbbb8db626894c457c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92000
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-10 10:06:23 +02:00
Michael Meeks
050820f459 Proof: link SSL libraries for --disable-ssl.
Change-Id: I40fa22ba65bb7c838677c00155b51bb1122b6033
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91977
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-04-09 18:41:14 +02:00
Mike Kaganski
a5d194b3c8 Ticks count is signed
Change-Id: I509a9919277a3a2d8342996253413387457a9a27
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91897
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-09 09:27:23 +02:00
Michael Meeks
668007544b Proof: generate our own key, and verify our own signatures.
Change-Id: If805c89a3b6618d6e34e7421b20077c4f0a48cb3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91940
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-08 23:20:55 +02:00
Michael Meeks
d7f55b4bda Proof: verify existing RSA proof.
Change-Id: I26163d0cad3437300bb255b0d7760af6393ceffa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91939
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-08 23:20:35 +02:00
Michael Meeks
f4f7b08d44 Proof: implement CAPI blob test.
Change-Id: Ifa4ddc3c5fa375606eedd932af029e4b30a740de
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91936
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-08 22:19:51 +02:00
Michael Meeks
a2b9fc474a Proof: re-factor - publicise some internals to make testing easier.
Also add dummy, run-every-build test to validate wopi like proofs.

Change-Id: Ic2dc647a8d61693ae87b6523aaa30632979fd5d6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91854
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-08 10:58:49 +02:00
Michael Meeks
795fac61dc test: run unit-copy-paste on its own to make it happier.
Change-Id: Ib6aa1f40ba346381937210e600636e8d904a4713
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91104
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-26 16:15:34 +01:00
Michael Meeks
77576cdb4b Parallelize tests.
Not deleting each other's jails mails all the difference.

For now parallelize in smaller groups; some of the tests are
quite heavy resource-wise.

Change-Id: I04e5cdf66ba20cbd4f9f05b9d630141814eb3801
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90982
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-26 10:49:49 +01:00
Miklos Vajna
a83dd9a160 test: increase load timeout in UnitLoadTorture
This test sometimes failed on me just because the load was aborted due
to the timeout, doubling the limit makes the problem go away.

Change-Id: Ided724d67a513391b86836065d4e627581857a92
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90771
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-20 10:47:59 +01:00
Ashod Nakashian
82560d9657 wsd: test assertion macros
Because the new-style tests are intrustive,
the exception that CppUnit throws on assertion
failures is caught and processed with the
application logic, which is far from ideal,
because it's very difficult to find the
cause of failure.

What we'd like is a way to control what happens
when an test assertion fails, such that we can
properly log/print the failure, and even break
in the debugger.

The new macros allow us to control the behavior
at compile-time and have added flexibility.
For now, they log an assertion failure before
invoking the CPPUNIT macro, and support a
compile-time directive to assert, which is
useful for breaking in the debugger.

Change-Id: If464ba246e3ec747f31496a4215cb73ef735dfaf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87625
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-14 15:45:00 +01:00
Tamás Zolnai
19a7f1d288 test: better fix for UnitWOPISaveAs test
Don't check the full URL, but just test some parts of it.

Change-Id: I5367bf4f41dc26f311e03de7ce06349f744d0b85
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90428
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 17:47:35 +01:00
Ashod Nakashian
d8a9e11ad9 wsd: fix UnitWOPISaveAs test
Change-Id: I63da82da727e2902fdb35ff31b29df8c77976793
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90355
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-03-12 13:19:38 +01:00
Michael Meeks
e924625cc1 re-factor: Socket / WebSocketHandler.
Essentially we want to be able to separate low-level socket code
for eg. TCP vs. UDS, from Protocol handling: eg. WebSocketHandler
and client sessions themselves which handle and send messages
which now implement the simple MessageHandlerInterface.

Some helpful renaming too:

s/SocketHandlerInterface/ProtocolHandlerInterface/

Change-Id: I58092b5e0b5792fda47498fb2c875851eada461d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90138
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-11 16:48:03 +01:00
Miklos Vajna
a7d3efdd4e Introduce StringVector::equals()
Allows comparing tokens with C strings without a heap allocation. Do the
same when comparing two tokens from two different StringVectors.

And use it at all places where operator ==() has an argument, which is a
StringVector::operator []() result.

Change-Id: Id36eff96767ab99b235ecbd12fb14446a3efa869
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90201
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-03-09 09:46:33 +01:00
Michael Meeks
7eea5b85ab Remove unused filterHandleRequest unit test hook.
Change-Id: Id1ff6005e28bf02eb9cad3c1609f9a8079640689
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90155
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-07 14:26:42 +01:00
Miklos Vajna
547f9ea731 Rework StringVector to have a single underlying string
This is meant to reduce lots of small allocations and instead have
pointers into the single string for the various tokens instead.

This has a few requirements, though:

1) It's no longer OK to modify the tokens, changing their length would
invalidate the start/length of other tokens. Rework
DocumentBroker::load() to avoid such mutation.

2) The iterators no longer expose zero-terminated strings, so
Poco::cat() doesn't work anymore: add an own cat() instead and use that
in e.g. ChildSession. The own cat() has the benefit that it won't read
past the end of the array if the begin index is out of bounds to add
more safety.

(This nicely works towards killing Poco usage in general.)

3) If zero-terminated strings for all individual tokens is needed, a
copy has to be made, as done in spawnProcess().

(For all of these requirements, the build fails if there are problems.)

Change-Id: Iea40e4400e630b2d669f5c72aea85cb40edf9a2c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89711
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-02-28 18:31:37 +01:00
Miklos Vajna
b8bd1990aa Rework LOOLProtocol::tokenize() to return a StringVector object
The bulk of this commit just changes std::vector<std::string> to
StringVector when we deal with tokens from a websocket message.

The less boring part of it is the new StringVector class, which is a
wrapper around std::vector<std::string>, and provides the same API,
except that operator[] returns a string, not a string&, and this allows
returning an empty string in case that prevents reading past the end of
the underlying array.

This means in case client code forgets to check size() before invoking
operator[], we don't crash. (See the ~3 previous commits which fixed
such crashes.)

Later the ctor could be changed to take a single underlying string to
avoid lots of tiny allocations, that's not yet done in this commit.

Change-Id: I8a6082143a8ac0b65824f574b32104d7889c184f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89687
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-28 16:07:56 +01:00
Miklos Vajna
bbcfd8fad2 UnitRenderShape: update Writer reference SVG
Now that we don't re-compress PNG images since core.git commit
8fc1b60f62c213a0476f3acc9f89cd5eccbf335d (sw SVG export: try to reuse
original bitmap data for JPG and PNG bitmaps, 2020-02-27).

Change-Id: I869ae0a21f834e6f05bf9b897b15cf3392320cd8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89621
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-27 11:57:07 +01:00
Tamás Zolnai
8265fab93f test: remove redundant shape related C++ test.
This test case is covered by cypress tests. See
shape_properties_spec.js. Those tests will fail if
SVG rendering is broken.

Change-Id: I1a3434f9696c6a323a23ded0b1b2816d74373c7a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89590
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-26 21:38:09 +01:00
Tamás Zolnai
2e3d00130f test: fix random failure of unit-http test.
Sometimes the text content comes with the first recieve,
sometimes we need a second recieve to get that.
Don't fail when we get the content for the first recieve.

Change-Id: I3078995cae3c0cfefdd5f2b8eae8bad4003ec2fd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89347
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-24 15:52:27 +01:00
Ashod Nakashian
c742ca1011 wsd: improve test logging
Logs from test are now more atomic (less interleaving).
And each integration-test (old-style tests running from
new-style tests) will now print clearly when it begins
and when it fails, making it easier to find failures.
Misc other minor cleanups in test logging.

Change-Id: Iff664e42a04d1c6dbf1332b2884c35183ef85e21
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89309
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-02-23 22:04:04 +01:00
Tamás Zolnai
17bef63abd Try to fix parallel build.
We are running make -j2 check with Jenkins now.
Which fails with these unit tests. Let's just
serialize all, so we can test cypress test
parallelization.

Change-Id: Ib1ed21581c88cd86cbd13ef5c6b8b98abaef1da5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89211
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-21 15:48:13 +01:00
Miklos Vajna
d725ecbb56 test, UnitEachView: increase the timeout
I think this is the last case where sanitizers cause enough slowdown
that the test fails due to a timeout. The new limit is 4 minutes, the
test passes for me in 2m20s with sanitizers.

Change-Id: I7fccb593d67908bfaeba8eb8715d00cce48e84fb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88916
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-18 11:32:31 +01:00
Michael Meeks
6bdf561049 Share the Kit environment setup code.
Particularly configuration layers so we can tweak mobile config
easily.

Add core source files from configmgr for breakpointing convenience in
the iOS project. Add loolkitconfig.xcu to the iOS app bundle. Use
${BRAND_BASE_DIR} instead of a compile-time LOOLWSD_CONFIGDIR literal
on iOS (because there is no compile-time constant path to the app
bundle). No "registry" directory directly in the app bundle any longer
on iOS, a corresponding change in core.git moved that stuff to be
under "share", like on other platforms.

Change-Id: I6672efc0505abf27297c4758118a20992b10ceb3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88765
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-17 14:49:06 +01:00
Miklos Vajna
8c9e539586 test: improve timeout handling in getResponseMessage()
Sometimes unit-each-view fails on me in a situation like this:

21:00:13.331257 [ loolwsd ] TRC  debug, testEachView: waiting for message, timeout after 20s| UnitEachView.cpp:66
21:00:20.429615 [ loolwsd ] TRC  debug, testEachView: response is empty, will fail| UnitEachView.cpp:72

I.e. for some reason ws.poll() returns after 7 seconds, even if the
timeout at test/UnitEachView.cpp is clearly 20 seconds.

Fix the problem by trying again in case we got no data -- we'll still
break from the loop on timeout.

Change-Id: I913ecd692f350b9deb38705a0a2d24e8b3c799a0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88846
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-17 10:09:05 +01:00
Miklos Vajna
7214fe1634 Restore "tests: Disable unstable unit test."
This restores commit 5c8a224e2d, which
disabled the unstable testReloadWhileDisconnecting testcase. Later this
was reverted by commit 4fc7bc76db, but
nothing was really done to improve the stability, so go back to disabled
for now. (Till somebody has time to debug & fix the root cause here.)

Change-Id: I26ea40a81cf9e2673f2397221c85e6f9dedc4052
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88669
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-14 09:59:23 +01:00
Miklos Vajna
955f662294 test, unit-each-view: increase timeout
With this, the test passes under sanitizers as well.

Change-Id: I777e177d4f171328744cf83386276752d51700cc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88584
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-13 11:13:32 +01:00
Tamás Zolnai
4fc7bc76db tests: Change the order of cypress-test and other tests.
So we can see how stable the cypress tests are. Now other unit
tests under tests folder are failing randomly, so it's hard to
monitor the cypress tests.

Enable one unstable unit test, which was disabled for the same
reason.

Change-Id: Ib1646de1647c9a2bdb769bbb6b92a5794dd7a598
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88559
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-12 22:46:34 +01:00
Tamás Zolnai
5c8a224e2d tests: Disable unstable unit test.
Half of the Jenkins build fails beacuse of this test.

Error message, we've got during run:
uncaught exception of type std::exception (or derived).
- error: cmd=storage kind=loadfailed

Change-Id: I42bb502a5aac96218b4ca772c1d0def398144797
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88443
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-11 14:56:30 +01:00
Miklos Vajna
8b82efd285 test: increase timeout of UnitClose
This now failed under sanitizers due to a timeout. Make the new limit 2
minutes, sanitizers require 51 seconds for me (so we did not fit into
the 30 seconds default).

Change-Id: Ib8edb002b50e55b605152be5d50574c396964c25
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88424
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-11 10:02:17 +01:00
Michael Meeks
10caa82b0a tdf#130382 - unit test for core fix for text input ordering issue.
Requires the relevant core commit.

Change-Id: I1b89c476ed6900bd0c5d981d125824c4bc2bf6da
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87930
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-10 23:23:04 +01:00
Miklos Vajna
d142508d95 test: increase timeout of UnitLoadTorture
This now failed under sanitizers due to a timeout. Double the limit;
asan typically causes a 2x slowdown.

Change-Id: I943c6f900371ff4c05c760d3d993829d54264941
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87716
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-30 09:49:52 +01:00
Miklos Vajna
ea9c80b588 test: fix ODR-violation in SigUtil
==6642==ERROR: AddressSanitizer: odr-violation (0x0000024db3a0):
  [1] size=4 'SigUtil::SigHandlerTrap::SigHandling' ../common/SigUtil.cpp:113:38
  [2] size=4 'SigUtil::SigHandlerTrap::SigHandling' common/SigUtil.cpp:113:38
These globals were registered at these points:
  [1]:
    #0 0x68d7d8 in __asan_register_globals.part.13 lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x7f4b7eeed83b in asan.module_ctor (online-san/test/../test/.libs/unit-base.so+0x6fd83b)

  [2]:
    #0 0x68d7d8 in __asan_register_globals.part.13 lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x104590e in asan.module_ctor (online-san/loolwsd+0x104590e)

No need to include SigUtil for unit-base (invoked during 'make check'),
it's only needed for unittest_SOURCES (invoked during 'make').

Same for Log::IsShutdown(), 'vtable for Session', 'typeinfo name for
TileQueue', 'JWTAuth::_key', 'vtable for ClientSession',
'UnitBase::Global', 'SocketPoll::DefaultPollTimeoutMs' and
'SslContext::Instance'.

But don't just remove all wsd_sources from the new-style unit tests, as
that would lead to missing symbols:

[ loolwsd ] ERR  Failed to load online-san/test/../test/.libs/unit-base.so: online-san/test/../test/.libs/unit-base.so: undefined symbol: _Z20documentViewCallbackiPKcPv| common/Unit.cpp:40

(Seen during make check's unit-base.)

Change-Id: I305185f6437c5b4887d8e09a592e578a94f2659c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87323
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-24 10:34:00 +01:00
Miklos Vajna
6add8295bf test: remove documentation about no longer working CPPUNIT_TEST_NAME variant
This is not needed, the commandline to run the test is printed on
failure.

Change-Id: Ia4da4344ede4ad8c1627a5560f1bc1264f4203c7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87288
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-24 00:09:34 +01:00
Miklos Vajna
abe076e56d test: restore ability to just run a single unit test
This was removed in commit 0599db3576
(copyFile: de-poco-ize and handle EINTR and short writes., 2020-01-18),
probably by accident.

Change-Id: I36bed5851fbfa0c37a007bedb6f318aaf4d8c64a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87233
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-23 09:19:43 +01:00
Pranam Lashkari
a019c93d90 Resolved: Server crash when link opened in new tab
When trying to open a link normally from help->Online help
nothing happens but the popup is closed.

When trying to open a like forcefully in new tab
from help->online help it crashes the server.

Change-Id: I7e0944ebe521002625a84e155e379ed7e25d2309
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85466
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-22 23:23:51 +01:00
Michael Meeks
f0bfe402fd test: forcibly serialize more
Change-Id: I2fd370c5bdd440e3be2c065f9b834ffa4e7f856b
2020-01-21 15:07:54 +00:00
Michael Meeks
50deb943bd test: simplify and remove obsolete /proc grokking code.
Change-Id: I482c56dd76067019d83196aa305d14703e25bb44
2020-01-21 15:07:54 +00:00
Michael Meeks
9126a641a9 test: switch to using ClientPortNumber to allow parallelism.
Change-Id: Ifef3bce1b217605000300b240ea74df4d264e0df
2020-01-21 15:07:54 +00:00
Michael Meeks
43d0de1234 test: serialize tests for now.
Change-Id: I6309976f324a66a57baf4678e49c0c1e09b9dc48
2020-01-21 15:07:54 +00:00