Commit graph

444 commits

Author SHA1 Message Date
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
Michael Meeks
e844b89d6c test: simplify the timeout logic.
Change-Id: I0c253629b983f2813237536e6e2c6d04d5b97dd1
2020-01-21 15:07:54 +00:00
Michael Meeks
8f91659ae0 test: dung out redundant LOOL_TEST_CLIENT_PORT.
And cleanup other related oddities.

Change-Id: I2d179a2ece6a8553e10e406ad4e5da08a2ff58e5
2020-01-21 15:07:54 +00:00
Michael Meeks
9dfac6dab1 test: switch to parallel tests based on Unit framework.
Increase a few timeouts, bin old-style standalone unit tests,
fix a number of bugs.

Change-Id: Ia3d59466ecb9a9443807ba3445d04dd5f77e3dba
2020-01-21 15:07:54 +00:00
Michael Meeks
0599db3576 copyFile: de-poco-ize and handle EINTR and short writes.
Change-Id: I2046881c786a9f31f45c53f282de9ddd9a9cebcf
2020-01-21 15:07:54 +00:00
Miklos Vajna
e2fa8c43a1 Convert some of the integration-http-server tests to new-style ones
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I164b97be0bc487a02d4b2a872b9c0e40791056cd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86951
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-17 09:16:41 +01:00
Miklos Vajna
d10bbef749 Convert the WS error tests to a new-style one
So that they are in-process, which means it's easier to debug when they fail.

Change-Id: Icb3d7a7d0ffa7371eb3056b5de7144137c0acb8a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86463
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-09 08:59:09 +01:00
Miklos Vajna
743edbc9e8 Convert some closing tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I5abaf6a5be4e21167fb1248c8c23dbc3b94c4303
Reviewed-on: https://gerrit.libreoffice.org/85573
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-20 09:46:47 +01:00
Miklos Vajna
9680084f6b Convert some insert/delete tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I4938d00337dead52345036f7b186f5a759f26b82
Reviewed-on: https://gerrit.libreoffice.org/85427
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-18 22:18:08 +01:00
Miklos Vajna
d0fee8c6ad These can be made const
Change-Id: I952a7566176bda727f8c2e9618d41bfb7bb1240f
Reviewed-on: https://gerrit.libreoffice.org/85197
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-16 09:24:08 +01:00
Michael Meeks
f95cc10438 A new convert-to unit test, hopefully taking longer to load.
Change-Id: I8d8291e272a175ab3c846b692bb34b185b2b8278
Reviewed-on: https://gerrit.libreoffice.org/85008
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-12 08:57:28 +01:00
Miklos Vajna
b580a1eaf2 wsd: fix a typo
And disable a test that passes for me locally but fails on Jenkins.

Change-Id: Ifcdcedbac259247d784ce66185f95bfbe634381f
Reviewed-on: https://gerrit.libreoffice.org/84603
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-06 12:12:43 +01:00
Miklos Vajna
b5f78fe73d Convert some Calc tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Also, in UnitLoad, give up on trying to avoid the sleep after
disconnecting, it seems the old condition was not reliable.

Change-Id: I972a3319887a70eeea2585104ed1e762830ca505
2019-12-06 08:51:51 +01:00
Miklos Vajna
5bf3fc86be test: fix UnitLoad::testConnectNoLoad()
Depending on timing, this failed with the following error:

wsd-14400-14411 [ docbroker_001 ] WRN  Will not load document marked to destroy. DocKey: [/tmp/connectNoLoad_27c61e41_hello.odt].| wsd/DocumentBroker.cpp:520

Make sure we don't try to load the same document again when the cleanup
for the previous session is not done yet.

Change-Id: I354999fa934df665b48dca314d2b77ab95c84ec0
2019-12-05 08:48:32 +01:00
Miklos Vajna
fe04d685db Convert cursor tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I0fb1e798875c479e0aeb5f709ef630def5349126
2019-12-02 09:11:39 +01:00
Miklos Vajna
24c914dda1 test: fix unit-http
There were two problems here:

- there are much more headers than the one stated in "start", and as the
name implies, that's only the start of the headers, so assert it's a
matching prefix instead of full match

- the second case got the condition wrong, assert states what is the
assumption, does not check for an error state

With these, this test passes again.

Change-Id: I39f644849fc4808d73d1f95e2cda57d9465aacbf
2019-11-26 10:51:01 +01:00
Ashod Nakashian
717d3132b2 test: improve unit-tests
Change-Id: I2fd499886616809975d769632b183354d7feb32f
Reviewed-on: https://gerrit.libreoffice.org/83046
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-25 17:05:49 +01:00
Miklos Vajna
4358087be2 test: fix typo, unit-load should invoke code from UnitLoad.cpp
Change-Id: I47354f1d68075bc12a2e96832aeaa5f49ecb1d9a
2019-11-25 15:00:44 +01:00
Miklos Vajna
2ce1a7f61c test: clean up not needed memset()
Use std::vector instead of a C array, where the elements are initialized
with zero values by default.

Change-Id: I3c69b588e2a2c3deba052eae35da87a3d085491e
2019-11-25 08:28:12 +01:00
Corentin Noël
62ed202e2d Fix issues with size_t and ssize_t on 32bits machines
Change-Id: I3859e12e234b0fec6b94736cacc7874cd8809476
Reviewed-on: https://gerrit.libreoffice.org/83449
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-22 11:20:57 +01:00
Miklos Vajna
0580f51f85 Convert doc load tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I2dcef46ec76e1f971172d1c29adf09103cfeaa7b
2019-11-22 09:07:33 +01:00
Ashod Nakashian
ddb697bfa5 test: validate ExtendedData sent to WOPI
Change-Id: Ib5da41e7f1ca7547ea6ac43daefa4b0259ba4c41
Reviewed-on: https://gerrit.libreoffice.org/83045
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-22 01:51:34 +01:00
Pranam Lashkari
7349cc1f32 additional URI support added for some broken Implementation
"/hosting/discovery/"  added in addition to "/hosting/discovery"

Change-Id: I33f7fda9981d8d4e95ca5d69d3d6b3da1e4b0eeb
Reviewed-on: https://gerrit.libreoffice.org/83169
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-19 14:51:17 +01:00
Miklos Vajna
703eb28a97 Convert "uno command" tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I79eaa8014deda25ae31b0ad5ff38a8023ef0ae3e
2019-11-18 08:56:41 +01:00
Ashod Nakashian
1ae9ce8ad2 test: thread-safe common shared test data
This protects against memory corruptions,
and a cascade of issues, such as the following:

 Attaching to process 56245
 [New LWP 56246]
 [New LWP 56252]
 [New LWP 56253]
 [New LWP 56254]
 [New LWP 56362]
 [New LWP 56364]
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
 0x00007fda228f7d2d in __GI___pthread_timedjoin_ex (threadid=140574279595776, thread_return=0x0, abstime=0x0, block=<optimized out>) at pthread_join_common.c:89
 89	pthread_join_common.c: No such file or directory.

 Thread 7 (Thread 0x7fda197fa700 (LWP 56364)):
 #0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
 #1  0x00007fda228f9023 in __GI___pthread_mutex_lock (mutex=0x55e9937567e0 <SigHandlerTrap>) at ../nptl/pthread_mutex_lock.c:78
 #2  0x000055e9934cd4fe in __gthread_mutex_lock (__mutex=0x55e9937567e0 <SigHandlerTrap>) at /usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:748
 #3  std::mutex::lock (this=0x55e9937567e0 <SigHandlerTrap>) at /usr/include/c++/7/bits/std_mutex.h:103
 #4  std::unique_lock<std::mutex>::lock (this=<synthetic pointer>) at /usr/include/c++/7/bits/std_mutex.h:267
 #5  std::unique_lock<std::mutex>::unique_lock (__m=..., this=<synthetic pointer>) at /usr/include/c++/7/bits/std_mutex.h:197
 #6  SigUtil::handleFatalSignal (signal=11) at common/SigUtil.cpp:214
 #7  <signal handler called>
 #8  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_capacity (this=<optimized out>, __capacity=0) at /usr/include/c++/7/bits/basic_string.h:200
 #9  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string (__str=..., this=<optimized out>) at /usr/include/c++/7/bits/basic_string.h:542
 #10 std::_Construct<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (
     __p=<optimized out>) at /usr/include/c++/7/bits/stl_construct.h:75
 #11 std::__uninitialized_copy<false>::__uninit_copy<std::move_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*> (__result=0x7fd9f40017b0, __last=..., __first=...) at /usr/include/c++/7/bits/stl_uninitialized.h:83
 #12 std::uninitialized_copy<std::move_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*> (__result=<optimized out>, __last=..., __first=...) at /usr/include/c++/7/bits/stl_uninitialized.h:134
 #13 std::__uninitialized_copy_a<std::move_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (__result=<optimized out>, __last=..., __first=...)
     at /usr/include/c++/7/bits/stl_uninitialized.h:289
 #14 std::__uninitialized_move_if_noexcept_a<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > (__alloc=..., __result=<optimized out>, __last=0x55e995662850,
     __first=<optimized out>) at /usr/include/c++/7/bits/stl_uninitialized.h:312
 #15 std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_realloc_insert<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&> (
     this=this@entry=0x55e9937566f0 <FileUtil::getTempFilePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::fileDeleter>,
     __position=<error: Cannot access memory at address 0x3735003238323a>, __args#0="/tmp/loadTorture_viewcursor.odp_725a6013_viewcursor.odp") at /usr/include/c++/7/bits/vector.tcc:424
 #16 0x000055e9934aa829 in std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::push_back (__x="/tmp/loadTorture_viewcursor.odp_725a6013_viewcursor.odp",
     this=0x55e9937566f0 <FileUtil::getTempFilePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::fileDeleter>) at /usr/include/c++/7/bits/stl_vector.h:948
 #17 (anonymous namespace)::FileDeleter::registerForDeletion (file="/tmp/loadTorture_viewcursor.odp_725a6013_viewcursor.odp",
     this=0x55e9937566f0 <FileUtil::getTempFilePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::fileDeleter>) at common/FileUtil.cpp:69
 #18 FileUtil::getTempFilePath (srcDir=..., srcFilename=..., dstFilenamePrefix=...) at common/FileUtil.cpp:97
 #19 0x00007fda216b51c9 in helpers::getDocumentPathAndURL (docFilename="viewcursor.odp", documentPath="", documentURL="", prefix="loadTorture_viewcursor.odp_") at ./helpers.hpp:151
 #20 0x00007fda216ad007 in UnitLoadTorture::loadTorture (this=<optimized out>, testname="loadTorture_viewcursor.odp ", docName="viewcursor.odp", thread_count=thread_count@entry=3,
     max_jitter_ms=<optimized out>, max_jitter_ms@entry=75) at UnitLoadTorture.cpp:41
 #21 0x00007fda216ad7dd in UnitLoadTorture::<lambda()>::operator() (__closure=0x55e994dbc758) at UnitLoadTorture.cpp:186
 #22 std::__invoke_impl<void, UnitLoadTorture::testLoadTorture()::<lambda()> > (__f=...) at /usr/include/c++/7/bits/invoke.h:60
 #23 std::__invoke<UnitLoadTorture::testLoadTorture()::<lambda()> > (__fn=...) at /usr/include/c++/7/bits/invoke.h:95
 #24 std:🧵:_Invoker<std::tuple<UnitLoadTorture::testLoadTorture()::<lambda()> > >::_M_invoke<0> (this=0x55e994dbc758) at /usr/include/c++/7/thread:234
 #25 std:🧵:_Invoker<std::tuple<UnitLoadTorture::testLoadTorture()::<lambda()> > >::operator() (this=0x55e994dbc758) at /usr/include/c++/7/thread:243
 #26 std:🧵:_State_impl<std:🧵:_Invoker<std::tuple<UnitLoadTorture::testLoadTorture()::<lambda()> > > >::_M_run(void) (this=0x55e994dbc750) at /usr/include/c++/7/thread:186
 #27 0x00007fda22de366f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 #28 0x00007fda228f66db in start_thread (arg=0x7fda197fa700) at pthread_create.c:463
 #29 0x00007fda2261f88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

 Thread 6 (Thread 0x7fd9fffff700 (LWP 56362)):
  #0  __lll_lock_wait_private () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
 #1  0x00007fda225952db in __GI___libc_malloc (bytes=bytes@entry=3635) at malloc.c:3063
 #2  0x00007fda2262f364 in __backtrace_symbols (array=array@entry=0x7fd9ffffc540, size=size@entry=26) at backtracesyms.c:69
 #3  0x000055e9934cc439 in SigUtil::dumpBacktrace () at common/SigUtil.cpp:253
 #4  0x000055e9934cd5ae in SigUtil::handleFatalSignal (signal=6) at common/SigUtil.cpp:236
 #5  <signal handler called>
 #6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
 #7  0x00007fda2253e801 in __GI_abort () at abort.c:79
 #8  0x00007fda22587897 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fda226b4b9a "%s
") at ../sysdeps/posix/libc_fatal.c:181
 #9  0x00007fda2258e90a in malloc_printerr (str=str@entry=0x7fda226b2e0e "malloc(): memory corruption") at malloc.c:5350
 #10 0x00007fda22592994 in _int_malloc (av=av@entry=0x7fda00000020, bytes=bytes@entry=32) at malloc.c:3738
 #11 0x00007fda225952ed in __GI___libc_malloc (bytes=32) at malloc.c:3065
 #12 0x00007fda22db9258 in operator new(unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 #13 0x00007fda244adaae in __gnu_cxx::new_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::allocate (this=0x7fd9ffffe740, __n=1)
     at /usr/include/c++/5/ext/new_allocator.h:104
 #14 0x00007fda244ad300 in __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::allocate (__a=..., __n=1)
     at /usr/include/c++/5/ext/alloc_traits.h:182
 #15 0x00007fda244ac858 in std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_allocate (this=0x7fd9ffffe740, __n=1) at /usr/include/c++/5/bits/stl_vector.h:170
 #16 0x00007fda244ab7c7 in std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_insert_aux (this=0x7fd9ffffe740, __position=non-dereferenceable iterator for std::vector, __x="home") at /usr/include/c++/5/bits/vector.tcc:353
 #17 0x00007fda244aada2 in std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::push_back (this=0x7fd9ffffe740, __x="home") at /usr/include/c++/5/bits/stl_vector.h:925
 #18 0x00007fda2350ddcb in Poco::Path::pushDirectory (this=0x7fd9ffffe6c0, dir="home") at src/Path.cpp:471
 #19 0x00007fda2350ea27 in Poco::Path::parseUnix (this=0x7fd9ffffe6c0, path="/home/ash/prj/lo/online/test/") at src/Path.cpp:671
 #20 0x00007fda2350cd6b in Poco::Path::assign (this=0x7fd9ffffe6c0, path="/home/ash/prj/lo/online/test/") at src/Path.cpp:182
 #21 0x00007fda2350c1be in Poco::Path::Path (this=0x7fd9ffffe6c0, path="/home/ash/prj/lo/online/test/") at src/Path.cpp:54
 #22 0x00007fda2350d33a in Poco::Path::makeAbsolute (this=0x7fd9ffffe8f0) at src/Path.cpp:318
 #23 0x00007fda216b52ca in helpers::getDocumentPathAndURL (docFilename="setclientpart.ods", documentPath="/tmp/loadTorture_setclientpart.ods_ae70d2e_setclientpart.ods", documentURL="",
     prefix="loadTorture_setclientpart.ods_") at ./helpers.hpp:153
 #24 0x00007fda216ad007 in UnitLoadTorture::loadTorture (this=<optimized out>, testname="loadTorture_setclientpart.ods ", docName="setclientpart.ods", thread_count=thread_count@entry=3,
     max_jitter_ms=<optimized out>, max_jitter_ms@entry=75) at UnitLoadTorture.cpp:41
 #25 0x00007fda216ad7dd in UnitLoadTorture::<lambda()>::operator() (__closure=0x55e994cffe18) at UnitLoadTorture.cpp:186
 #26 std::__invoke_impl<void, UnitLoadTorture::testLoadTorture()::<lambda()> > (__f=...) at /usr/include/c++/7/bits/invoke.h:60
 #27 std::__invoke<UnitLoadTorture::testLoadTorture()::<lambda()> > (__fn=...) at /usr/include/c++/7/bits/invoke.h:95
 #28 std:🧵:_Invoker<std::tuple<UnitLoadTorture::testLoadTorture()::<lambda()> > >::_M_invoke<0> (this=0x55e994cffe18) at /usr/include/c++/7/thread:234
 #29 std:🧵:_Invoker<std::tuple<UnitLoadTorture::testLoadTorture()::<lambda()> > >::operator() (this=0x55e994cffe18) at /usr/include/c++/7/thread:243
 #30 std:🧵:_State_impl<std:🧵:_Invoker<std::tuple<UnitLoadTorture::testLoadTorture()::<lambda()> > > >::_M_run(void) (this=0x55e994cffe10) at /usr/include/c++/7/thread:186
 #31 0x00007fda22de366f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 #32 0x00007fda228f66db in start_thread (arg=0x7fd9fffff700) at pthread_create.c:463
 #33 0x00007fda2261f88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Change-Id: Ib60954e49e692082e686cb3fdc5fc9d5cfbc83c9
Reviewed-on: https://gerrit.libreoffice.org/83047
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-18 06:47:20 +01:00
Jan Holesovsky
cd81d78ccc Add a 'how to debug' to the whitebox unit tests.
Change-Id: I373ae9e7268b108eedcae2805b0c1681845542cb
Reviewed-on: https://gerrit.libreoffice.org/82651
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-14 10:07:17 +01:00
Miklos Vajna
ee61bc6fb8 Convert "client session" tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: Ia95b077b46538788c0bbc7cafebfd9019512d2ab
2019-11-14 08:40:59 +01:00
Andras Timar
fd93e11934 build fix after 'killpoco: removed StringTokenizer'
Change-Id: I2f1cb0da199a8dca1cf300955f133f45b8d7ba3b
2019-11-13 22:16:59 +01:00
Jan Holesovsky
3496b07e7e Cosmetic change in a memset invocation.
For an array, memset(array, ...) and memset(&array, ...) do the same
thing - but given that there has to be the sizeof(array), the former
is probably more readable / obvious here.

Change-Id: I7e329cb1dcabb564e26857b0c7d9f88431bb4ede
Reviewed-on: https://gerrit.libreoffice.org/82601
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-13 15:12:50 +01:00
Pranam Lashkari
d7bc9ff2e4 killpoco: removed StringTokenizer from test directory
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>
2019-11-13 09:20:25 +01:00
Miklos Vajna
4e43c5bbaf test: remove duplicate HTTPWSTest::testPaste()
This was originally moved in commit
b97789eb76 (Convert paste testcase to a
new-style one, 2019-10-18), then
194db8ed45 (test: improve stability of a
number of tests, 2019-10-12) restored a duplicate of this, probably due
to a mismerge.

Change-Id: Ie76266ddb85c58bb2370640025b91af980656908
2019-11-13 09:03:09 +01:00
Pranam Lashkari
8fb94e1827 StringTokenizer replaced with tokenize in file TileCacheTsts.cpp
Change-Id: I1024329bf518795b819f19f497af70d2266ec7da
Reviewed-on: https://gerrit.libreoffice.org/82543
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-12 17:50:17 +01:00
Miklos Vajna
3cf185a576 Convert "each view" tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: Ia16009f6047acdba531a7bfc50419dfb8ad0ca29
2019-11-12 08:47:47 +01:00
Miklos Vajna
6e3d8005eb Fix HTTPWSTest::testExcelLoad() to pass again
Assuming that the test has to be adapted, and it's not like it caught
real badness.

Change-Id: Id0e6bc134aefdeb46d281ae6b2a5fbc9ae70e8a4
Reviewed-on: https://gerrit.libreoffice.org/82414
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-11 08:54:56 +01:00
mert
e09b5f4226 Added Unit Test for new Watermarking feature
Change-Id: Id30015731d7ea562bfeb63fc70ffc6813945e492
Reviewed-on: https://gerrit.libreoffice.org/81674
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-10 23:42:47 +01:00
Jan Holesovsky
d906c78198 killpoco: Remove POCO from Protocol.cpp + related StringTokenizer usage.
Change-Id: I9d93c03dde110a4e88f7ec86e5934916596a27c1
Reviewed-on: https://gerrit.libreoffice.org/82301
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-08 22:20:58 +01:00
Jan Holesovsky
5b5e29b430 killpoco: Don't use POCO for app exit values.
Change-Id: I2948ac45a7b4243f7afde08d5245530fdbf9a070
Reviewed-on: https://gerrit.libreoffice.org/82125
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-11-07 12:23:47 +01:00
Miklos Vajna
cd75e2c5f4 Convert render shape tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I4acbfaa32f6c771d860c0ff2782024b176690ee5
2019-11-04 08:34:44 +01:00
Miklos Vajna
3ba17824e3 Fix TileCacheTests::testUnresponsiveClient()
This started to reliably fail for me recently.

I think the problem was that deleteAll() also listened for incoming
messages, so while waiting for textselection:, perhaps it processed (and
ignored) invalidatetiles:.

As a consequence, once deleteAll() returned and testUnresponsiveClient()
started to wait for invalidatetiles:, the test may or may not failed,
depending on the order of messages.

Fix the problem by just dispatching the SelectAll and Delete commands,
then waiting for invalidatetiles:.

Change-Id: I33f096e7dcb7f9daf1968dcb50d8a5f53824f5bd
2019-10-31 09:39:45 +01:00
Michael Meeks
74c4cf1161 Fix mis-merge around testLargePaste.
Change-Id: I2a24219a54a9b454ef5c5de558046a9bcc993873
2019-10-29 09:36:25 +00:00
Ashod Nakashian
0106ab24f6 test: improve TileCacheTests::testUnresponsiveClient
Change-Id: Ib08c4675c9477cb925b5d42545cdc2cdae780fbe
Reviewed-on: https://gerrit.libreoffice.org/81579
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-10-29 02:40:34 +01:00
Ashod Nakashian
d038ceb118 test: Improve iso8601ToTimestamp and tests
Using double caused all sorts of rounding issues,
especially with random unit-test failures.
Luckily, we don't need doubles and can do everything
with integers.

Also added a new function to print time_point as
iso8601 string, for logging and convenience.

Change-Id: I1c2040c02d1143282dbde0dadef32613b77c330d
Reviewed-on: https://gerrit.libreoffice.org/81578
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-10-29 02:39:34 +01:00
Ashod Nakashian
c82760f103 test: improve TileCache tests
This fixes up some minor issues, improves stability
and logging of tests.

Reviewed-on: https://gerrit.libreoffice.org/81259
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit a6e2dff35a4f1234066c66cb64f7e3bcd034ed58)

Change-Id: I906922c1c74427a53f9017f7be73c1f85ecf4cd7
Reviewed-on: https://gerrit.libreoffice.org/81575
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-10-29 02:32:54 +01:00