help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with DBus Tests Failing for Python Package


From: Maxim Cournoyer
Subject: Re: Help with DBus Tests Failing for Python Package
Date: Tue, 27 Dec 2022 12:49:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hello,

Jaft <jaft.r@outlook.com> writes:

> So I tried a different tactic and, noticing the error said the issue
> was ~dbus-session~ didn't exist, did this, instead:
>
>> (arguments     (list #:phases #~(modify-phases %standard-phases
>>                                   (add-before 'check 'start-xserver
>>                                     (lambda _
>>                                       ;; Tests require a running dbus-daemon.
>>                                       (system "dbus-daemon &")
>>                                       ;; For missing '/etc/machine-id'.
>>                                       (setenv "DBUS_FATAL_WARNINGS" "0"))))))
>> (inputs        (list python python-pygobject))
>> (native-inputs (list xorg-server-for-tests))
>
> This works much better and the 232 tests get run; most, even pass…except 4. 
> The output is thus:
>
>> test_get_object_path (tests.test_proxy.DBusProxyTestCase)
>> Test get_object_path. ... ok
>>
>> ======================================================================
>> FAIL: test_async_calls (tests.test_unix.DBusUnixExampleTestCase)
>> Test DBus async calls with fds.
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/test_unix.py",
>> line 420, in test_async_calls
>>     self._run_test()
>>   File 
>>"/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/lib_dbus.py", line 
>>194, in _run_test
>>     self.assertEqual(client.exitcode, 0, msg)
>> AssertionError: 1 != 0 : _call_hello_async has finished with 1
>>
>> ======================================================================
>> FAIL: test_properties (tests.test_unix.DBusUnixExampleTestCase)
>> Test DBus properties with fds.
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/test_unix.py",
>> line 457, in test_properties
>>     self._run_test()
>>   File 
>>"/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/lib_dbus.py", line 
>>194, in _run_test
>>     self.assertEqual(client.exitcode, 0, msg)
>> AssertionError: 1 != 0 : _set_pipes has finished with 1
>>
>> ======================================================================
>> FAIL: test_signals (tests.test_unix.DBusUnixExampleTestCase)
>> Test DBus signals with fds.
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/test_unix.py",
>> line 481, in test_signals
>>     self._run_test()
>>   File 
>>"/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/lib_dbus.py", line 
>>194, in _run_test
>>     self.assertEqual(client.exitcode, 0, msg)
>> AssertionError: 1 != 0 : _trigger_signal has finished with 1
>>
>> ======================================================================
>> FAIL: test_sync_calls (tests.test_unix.DBusUnixExampleTestCase)
>> Test DBus sync calls with fds.
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/test_unix.py",
>> line 398, in test_sync_calls
>>     self._run_test()
>>   File 
>>"/tmp/guix-build-python-dasbus-1.7.drv-0/dasbus-1.7/tests/lib_dbus.py", line 
>>194, in _run_test
>>     self.assertEqual(client.exitcode, 0, msg)
>> AssertionError: 1 != 0 : _call_hello_sync has finished with 1
>>
>> ----------------------------------------------------------------------
>> Ran 232 tests in 681.414s
>>
>> FAILED (failures=4)
>> Test failed: <unittest.runner.TextTestResult run=232 errors=0 failures=4>
>> error: Test failed: <unittest.runner.TextTestResult run=232 errors=0 
>> failures=4>
>> error: in phase 'check': uncaught exception:
>> %exception #<&invoke-error program: "python" arguments: ("-c"
>> "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize,
>> 'open', open)(__file__);code=f.read().replace('\r\n',
>> '\n');f.close();exec(compile(code, __file__, 'exec'))" "test")
>> exit-status: 1 term-signal: #f stop-signal: #f>

I bet this is because of the expectation of python-dbus on the processes
being reaped by PID 1 instead of staying around as zombies, as currently
happens in the Guix build container (see:
https://issues.guix.gnu.org/30948).

The current workaround currently used in Guix involves the use of tini
and of a forked process... it's not very pretty (see 'guix edit mutter'
for such an example).

Good luck!

-- 
Thanks,
Maxim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]