#1073984 Package fails to test with DH compat level 13 (succeeds with 12, though)

#1073984#5
Date:
2024-06-21 06:13:15 UTC
From:
To:
The package fails to test when building with debhelper compat level 13.
The tests run through when building with DH compat level 12.

task-0: cd qservicemanager_ipc/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /<<PKGBUILDDIR>>/tests/auto/serviceframework/qservicemanager_ipc/qservicemanager_ipc.pro 'QMAKE_CFLAGS_RELEASE=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CFLAGS_DEBUG=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_RELEASE=-g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_DEBUG=-g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_LFLAGS_RELEASE=-Wl,-z,relro -Wl,-z,now' 'QMAKE_LFLAGS_DEBUG=-Wl,-z,relro -Wl,-z,now' QMAKE_STRIP=: PREFIX=/usr 'CONFIG+=tests ofono upower udisks' QT_BUILD_PARTS+=tests ) && make -f Makefile check
task-0: make[6]: Entering directory '/<<PKGBUILDDIR>>/tests/auto/serviceframework/qservicemanager_ipc'
task-0: cd client/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /<<PKGBUILDDIR>>/tests/auto/serviceframework/qservicemanager_ipc/client/client.pro 'QMAKE_CFLAGS_RELEASE=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CFLAGS_DEBUG=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_RELEASE=-g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_CXXFLAGS_DEBUG=-g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2' 'QMAKE_LFLAGS_RELEASE=-Wl,-z,relro -Wl,-z,now' 'QMAKE_LFLAGS_DEBUG=-Wl,-z,relro -Wl,-z,now' QMAKE_STRIP=: PREFIX=/usr 'CONFIG+=tests ofono upower udisks' QT_BUILD_PARTS+=tests ) && make -f Makefile check
task-0: make[7]: Entering directory '/<<PKGBUILDDIR>>/tests/auto/serviceframework/qservicemanager_ipc/client'
task-0: '/<<PKGBUILDDIR>>/tests/auto/serviceframework/qservicemanager_ipc/client/target_wrapper.sh'  ./tst_qservicemanager_ipc
task-0: ********* Start testing of tst_QServiceManager_IPC *********
task-0: Config: Using QtTest library 5.15.13, Qt 5.15.13 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 13.2.0), debian unknown
task-0: QWARN  : tst_QServiceManager_IPC::initTestCase() ProxyForService: Cannot connect to remote service "com.nokia.qtmobility.sfw.IPCExampleService" "/com/nokia/qt/ipcunittest/qt_sfw_example_ipc_unittest"
task-0: QWARN  : tst_QServiceManager_IPC::initTestCase() "org.freedesktop.DBus.Error.ServiceUnknown The name com.nokia.qtmobility.sfw.IPCExampleService was not provided by any .service files 4"
task-0: FAIL!  : tst_QServiceManager_IPC::initTestCase() 'miscTest' returned FALSE. ()
task-0:    Loc: [tst_qservicemanager_ipc.cpp(378)]
task-0: PASS   : tst_QServiceManager_IPC::cleanupTestCase()
task-0: Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 5ms
task-0: ********* Finished testing of tst_QServiceManager_IPC *********
make[7]: *** [Makefile:345: check] Error 1
task-0: make[7]: Leaving directory '/<<PKGBUILDDIR>>/tests/auto/serviceframework/qservicemanager_ipc/client'
make[6]: *** [Makefile:396: sub-client-check] Error 2
task-0: make[6]: Leaving directory '/<<PKGBUILDDIR>>/tests/auto/serviceframework/qservicemanager_ipc'
make[5]: *** [Makefile:673: sub-qservicemanager_ipc-check] Error 2
task-0: make[5]: Leaving directory '/<<PKGBUILDDIR>>/tests/auto/serviceframework'
make[4]: *** [Makefile:452: sub-serviceframework-check] Error 2
task-0: make[4]: Leaving directory '/<<PKGBUILDDIR>>/tests/auto'
make[3]: *** [Makefile:396: sub-auto-check] Error 2
task-0: make[3]: Leaving directory '/<<PKGBUILDDIR>>/tests'
make[2]: *** [Makefile:514: sub-tests-check_ordered] Error 2
task-0: make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_test: error: make -j1 check returned exit code 2
task-0: Exited with status 6400
task-0: Shutting down
DBus daemon: Shutdown
make[1]: *** [debian/rules:52: override_dh_auto_test] Error 255
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:24: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-06-21T05:56:58Z

Any help with this is dearly appreciated. Thanks!

Mike

#1073984#10
Date:
2024-06-21 06:59:27 UTC
From:
To:
Hi Mike

(Drive-by remark; not subscribed and will not proactive track this bug)

A possible relevant change for debhelper-compat 13 is:

```
The dh_auto_* helpers now reset the environment variables  HOME  and
common  XDG_* variable. Please see description of the environment
variables in "ENVIRONMENT" for how this is handled. This feature changed
between debhelper 13 and debhelper 13.2.
```

This could be relevant since the test is using D-Bus.  You may want to
check that the tests are starting a D-Bus session specifically for the
tests. I suspect the tests might have worked by chance and happend to
have picked up the host's d-bus session in compat 12.

Best regards,
Niels