Split long-running CppunitTest_sc_opencl_test in two

At least the unrelated
<https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/132372/> was killed
after 20 minutes of no stdout/-err activity, with CppunitTest_sc_opencl_test
still running.  From its captured state, it looks like it was indeed still
making progress rather than being stuck:  During
ScOpenCLTest::testLogicalFormulaXor, the main thread was waiting at
ScFormulaCell::InterpretFormulaGroupThreading ->
comphelper::ThreadPool::waitUntilDone, while four
comphelper::ThreadPool::ThreadWorker threads were each at

> #4  0x00007f70652f9234 in __gnu_debug::_Safe_iterator_base::_M_detach() () at /lib64/libstdc++.so.6
> #5  0x00007f7048d3e8e5 in __gnu_debug::_Safe_iterator_base::~_Safe_iterator_base() (this=0x7f703daa9f20) at /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/debug/safe_base.h:100
> #6  0x00007f7048d5d709 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<mdds::mtv::base_element_block* const*, std::__cxx1998::vector<mdds::mtv::base_element_block*, std::allocator<mdds::mtv::base_element_block*> > >, std::__debug::vector<mdds::mtv::base_element_block*, std::allocator<mdds::mtv::base_element_block*> > >::~_Safe_iterator() (this=0x7f703daa9f18) at /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/debug/safe_iterator.h:86
> #7  0x00007f7048d5d6cd in mdds::mtv::soa::detail::iterator_updater<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::const_iterator_trait>::grouped_iterator_type::~grouped_iterator_type() (this=0x7f703daa9ec8) at workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/./iterator.hpp:74
> #8  0x00007f7048d5d69d in mdds::mtv::soa::detail::iterator_updater<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::const_iterator_trait>::~iterator_updater() (this=0x7f703daa9e98) at workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/./iterator.hpp:55
> #9  0x00007f7048d5d665 in mdds::mtv::soa::detail::const_iterator_base<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::const_iterator_trait, mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::iterator_trait> >::~const_iterator_base() (this=0x7f703daa9e98) at workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/./iterator.hpp:309
> #10 0x00007f704900b9bd in ScValueIterator::GetThis(double&, FormulaError&) (this=0x7f703daaa078, rValue=@0x7f703daaa1f8: -18.819375178914722, rErr=@0x7f703daaa1f6: NONE) at sc/source/core/data/dociter.cxx:141
> #11 0x00007f704900c652 in ScValueIterator::GetNext(double&, FormulaError&) (this=0x7f703daaa078, rValue=@0x7f703daaa1f8: -18.819375178914722, rErr=@0x7f703daaa1f6: NONE) at sc/source/core/data/dociter.cxx:297
> #12 0x00007f70496c3619 in ScInterpreter::ScXor() (this=0x48b93a0) at sc/source/core/tool/interpr1.cxx:1525

with three of them apparently waiting in pthread_mutex_lock but one in
pthread_mutex_unlock (and thus presumably making progress).  It looks like with
a debug-mode libstdc++ these worker threads can easily compete for these
listdc++-internal debug-mode mutices.  And execution of --enable-dbgutil
CppunitTest_sc_opencl_test on my Linux laptop under load easily took 35 minutes,
so it looks plausible that that unit test was just too big.

While splitting it in two (arbitrarily taking the first and second half of the
CPPUNIT_TEST list), use the opportunity to drop the redundant "_test" from the
two new target names CppunitTest_sc_opencl-1 and CppunitTest_sc_opencl-2.

Change-Id: I9b8f148db667ff9bbf1aacdcaf150e5cb9b8ae87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146252
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2023-01-27 13:19:25 +01:00
parent a6b64d0284
commit 98f9b51d58
6 changed files with 2373 additions and 2185 deletions

View file

@ -7,22 +7,22 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CppunitTest_CppunitTest,sc_opencl_test))
$(eval $(call gb_CppunitTest_CppunitTest,sc_opencl-1))
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sc_opencl_test))
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sc_opencl-1))
$(eval $(call gb_CppunitTest_add_exception_objects,sc_opencl_test, \
sc/qa/unit/opencl-test \
$(eval $(call gb_CppunitTest_add_exception_objects,sc_opencl-1, \
sc/qa/unit/opencl-test-1 \
))
$(eval $(call gb_CppunitTest_use_externals,sc_opencl_test, \
$(eval $(call gb_CppunitTest_use_externals,sc_opencl-1, \
boost_headers \
$(call gb_Helper_optional,OPENCL,clew) \
mdds_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_use_libraries,sc_opencl_test, \
$(eval $(call gb_CppunitTest_use_libraries,sc_opencl-1, \
basegfx \
comphelper \
cppu \
@ -57,24 +57,24 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_opencl_test, \
xo \
))
$(eval $(call gb_CppunitTest_set_include,sc_opencl_test,\
$(eval $(call gb_CppunitTest_set_include,sc_opencl-1,\
-I$(SRCDIR)/sc/source/ui/inc \
-I$(SRCDIR)/sc/source/core/inc \
-I$(SRCDIR)/sc/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_api,sc_opencl_test,\
$(eval $(call gb_CppunitTest_use_api,sc_opencl-1,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_opencl_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_opencl_test))
$(eval $(call gb_CppunitTest_use_ure,sc_opencl-1))
$(eval $(call gb_CppunitTest_use_vcl,sc_opencl-1))
$(eval $(call gb_CppunitTest_use_rdb,sc_opencl_test,services))
$(eval $(call gb_CppunitTest_use_rdb,sc_opencl-1,services))
$(eval $(call gb_CppunitTest_use_configuration,sc_opencl_test))
$(eval $(call gb_CppunitTest_use_configuration,sc_opencl-1))
# vim: set noet sw=4 ts=4:

View file

@ -0,0 +1,80 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CppunitTest_CppunitTest,sc_opencl-2))
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sc_opencl-2))
$(eval $(call gb_CppunitTest_add_exception_objects,sc_opencl-2, \
sc/qa/unit/opencl-test-2 \
))
$(eval $(call gb_CppunitTest_use_externals,sc_opencl-2, \
boost_headers \
$(call gb_Helper_optional,OPENCL,clew) \
mdds_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_use_libraries,sc_opencl-2, \
basegfx \
comphelper \
cppu \
cppuhelper \
drawinglayer \
drawinglayercore \
editeng \
for \
forui \
i18nlangtag \
msfilter \
oox \
sal \
salhelper \
sax \
sc \
scqahelper \
sfx \
sot \
subsequenttest \
svl \
svt \
svx \
svxcore \
test \
tk \
tl \
ucbhelper \
unotest \
utl \
vcl \
xo \
))
$(eval $(call gb_CppunitTest_set_include,sc_opencl-2,\
-I$(SRCDIR)/sc/source/ui/inc \
-I$(SRCDIR)/sc/source/core/inc \
-I$(SRCDIR)/sc/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_api,sc_opencl-2,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_opencl-2))
$(eval $(call gb_CppunitTest_use_vcl,sc_opencl-2))
$(eval $(call gb_CppunitTest_use_rdb,sc_opencl-2,services))
$(eval $(call gb_CppunitTest_use_configuration,sc_opencl-2))
# vim: set noet sw=4 ts=4:

View file

@ -202,7 +202,8 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_modelobj \
CppunitTest_sc_namedrangeobj \
CppunitTest_sc_namedrangesobj \
CppunitTest_sc_opencl_test \
CppunitTest_sc_opencl-1 \
CppunitTest_sc_opencl-2 \
CppunitTest_sc_outlineobj \
CppunitTest_sc_recentfunctionsobj \
CppunitTest_sc_recordchanges \

File diff suppressed because it is too large Load diff

2153
sc/qa/unit/opencl-test-2.cxx Normal file

File diff suppressed because it is too large Load diff

View file

@ -8014,7 +8014,8 @@ sc/qa/unit/helper/sorthelper.hxx
sc/qa/unit/helper/xpath.cxx
sc/qa/unit/helper/xpath.hxx
sc/qa/unit/mark_test.cxx
sc/qa/unit/opencl-test.cxx
sc/qa/unit/opencl-test-1.cxx
sc/qa/unit/opencl-test-2.cxx
sc/qa/unit/screenshots/screenshots.cxx
sc/qa/unit/tiledrendering/tiledrendering.cxx
sc/qa/unit/ucalc.cxx