summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2018-06-03 17:36:23 -0400
committerMichael Stahl <Michael.Stahl@cib.de>2018-07-26 11:33:26 +0200
commit2dd99dd1f27197bb813be7d2e9e89b0a7f647e78 (patch)
treed0800bc0d0253a97dc7341cc2b9b11f92b1ba1c8 /solenv
parent094f9f48b227e9e9cb7218555cfbd8868d9646d7 (diff)
Prevent unittest hangs due to cups password prompt
If cups is configured to require a password prompt, it causes unittests to hang indefinitely. e.g. 0 0x00007fe545a41ccd in __pthread_join (threadid=140622167353088, thread_return=0x0) at pthread_join.c:90 1 0x00007fe53e3aa4bf in psp::CUPSManager::checkPrintersChanged(bool) () from /home/peter/libreoffice/instdir/program/libvcllo.so 2 0x00007fe53e3bcbe0 in SvpSalInstance::GetPrinterQueueInfo(ImplPrnQueueList*) () from /home/peter/libreoffice/instdir/program/libvcllo.so 3 0x00007fe53e27d532 in Printer::ImplGetQueueInfo(rtl::OUString const&, rtl::OUString const*) () from /home/peter/libreoffice/instdir/program/libvcllo.so 4 0x00007fe53e27d739 in Printer::Printer() () from /home/peter/libreoffice/instdir/program/libvcllo.so And in another thread: Password for peter on localhost? 0 0x00007f07f3c3834a in __GI___libc_read (fd=<optimized out>, buf=0x7f07d4a30b0f, nbytes=1) at ../sysdeps/unix/sysv/linux/read.c:26 1 0x00007f07ea7603ab in _cupsGetPassword () from /usr/lib/libcups.so.2 2 0x00007f07ea7231dd in cupsDoAuthentication () from /usr/lib/libcups.so.2 3 0x00007f07ea759266 in cupsSendRequest () from /usr/lib/libcups.so.2 4 0x00007f07ea7596d4 in cupsDoIORequest () from /usr/lib/libcups.so.2 5 0x00007f07ea72650b in _cupsGetDests () from /usr/lib/libcups.so.2 6 0x00007f07ea727403 in ?? () from /usr/lib/libcups.so.2 7 0x00007f07ea7275d1 in cupsGetDests2 () from /usr/lib/libcups.so.2 8 0x00007f07ec090b2d in psp::CUPSManager::runDests() () from /home/peter/libreoffice/instdir/program/libvcllo.so Fix this by exporting SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1 for unittests. Change-Id: I0a3a2e7e9a88f5e6e1a9481cbb134538505381be Reviewed-on: https://gerrit.libreoffice.org/55255 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/CppunitTest.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 930979308b5b..1ac3b210e149 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -23,6 +23,8 @@
export MAX_CONCURRENCY=4
# Disable searching for certificates by default
export MOZILLA_CERTIFICATE_FOLDER=0
+# Avoid hanging if the cups daemon requests a password.
+export SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1
gb_CppunitTest_UNITTESTFAILED ?= $(GBUILDDIR)/platform/unittest-failed-default.sh
gb_CppunitTest_PYTHONDEPS ?= $(call gb_Library_get_target,pyuno_wrapper) $(if $(SYSTEM_PYTHON),,$(call gb_Package_get_target,python3))