Kaydet (Commit) 2dd99dd1 authored tarafından Peter Foley's avatar Peter Foley Kaydeden (comit) Michael Stahl

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: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 094f9f48
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment