This reduces the execution time of some
long-running tests and improves stability.
A full debug build of Core and Online
now finishes on my machine in under 3 minutes,
down from slightly over 4 minutes. A significant
saving when running the tests frequently and
repeatedly.
Change-Id: I66c1b06ec3c9e8ab90a30f3a15c03f8d560ed3c6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Add support for configuring the SSL certificates
when running the test binary as well as setting
up the SSL context.
Also adds the SSL socket headers with proper
compile-time guards for when SSL is disabled.
Change-Id: I99992639a66a64871f8ff8a2b2105279ead63ca1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
size_t in C and in C++ are not necessarily the same
type. The C++ size_t is in the std namespace. Since
we do include many C headers, and indeed some C++
runtime headers do define size_t for backwards
compatibility, it's easy to mix and match the two
types.
Also, 'using std::size_t;' isn't a great practice,
so removed.
This is not exhaustive, just some low-hanging cases.
Change-Id: I85a36b6fd1acd204274b1869de9bcb94c8b3cf13
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We now log the test assertion failure and exception (if any) details
with file and line number to assist in faster troubleshooting.
Change-Id: I3217458f30383cd24f3cbbe15431f2b9151744d4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
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>
removed use of Poco::StringTokenizer from the test directory using LOOLProtocol::tokenize and std::vecor<std::string>
Change-Id: I20fc2e0ef0d0d8fc959fee7972aa095f2581c181
Reviewed-on: https://gerrit.libreoffice.org/82565
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
No longer is it necessary to run with --verbose
in case we need --debugrun.
Also, by default the log level is now warning instead
of error, which should hopefully be more useful in
troubleshooting issues (or at least to force us
better categorize log messages).
Change-Id: Iad4279ecf3bf77780adcd786d4f46d9c964f302d
Reviewed-on: https://gerrit.libreoffice.org/79351
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Now the wsd docbroker thread and its peer kit
thread are trivial to match, since they are called
docbroker_xxx and kitbroker_xxx (where xxx is the
instance ID) respectively.
Also, label spare kit instances as kit_spare_xxx
to differentiate from ones with actual documents,
where xxx is a running counter to differentiate
spare instances from one another.
Now we are able to easily see (and count) the number
of spare kit instances, and match wsd and kit threads
handling a given document.
Unit-test logic updated to reflect the new thread
naming scheme.
Change-Id: I154dc8f200fbe0e65f3f5984e6dad2cef1b52e22
Reviewed-on: https://gerrit.libreoffice.org/79328
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
==18134==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x514db8 in operator new(unsigned long) /git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_new_delete.cc:105
#1 0x9f836c in runClientTests(bool, bool) /git/libreoffice/online-san/test/test.cpp:113:28
#2 0x9f7975 in main /git/libreoffice/online-san/test/test.cpp:77:12
Change-Id: Ib93625e2a77e37733b9bb052dd73ec3333bc2a71
Normally we use getgrp() to find out which lool* processes are ours when
running 'make check', to support running multiple of these in parallel.
However, in case you try to debug a failure, it's handy to start loolwsd
manually and invoke ./test manually in two different shells.
So add a switch which allows this: the result is that the failing test
doesn't fail early in an uninteresting way (complaining that it can't
find any loolkit processes) but fails the same way as during 'make
check'.
Let's call this --debugrun, since core has similar
gb_UITest_DEBUGRUN/gb_JunitTest_DEBUGRUN switches, which also allow
connecting to an already running "main" process.
Change-Id: Ic7e29eb143ae70f199ef3a09ec9d6b6f8ee0650d
Avoids tests crashing with obscure memory errors re-allocating the
string buffer; and hopefully cleans up the output too.
Change-Id: I3e38680c15129e84f0c7dd8cada3b505cf08ad34