[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: |
Thu, 29 Dec 2022 09:56:29 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
Jaft <jaft.r@outlook.com> writes:
> On Tuesday, December 27, 2022 at 11:49:31 AM CST, Maxim Cournoyer
> <maxim.cournoyer@gmail.com> wrote:
>> 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).
>
> Thanks a ton for the pointer, Maxim.
>
> Unfortunately, I still seem to be getting the same result. At first, I tried
> a simple approach of ~(execlp "tini" "--" "python" "setup.py" "test")~; I
> think it wound up still requiring the =dbus= package, to run.
>
> That failing, I decided to try something closer to what =mutter= was doing
> with
[...]
>> (match (primitive-fork)
>> (0 ;child process
>> (set-child-subreaper!)
>> ;; XXX: Tini provides proper PID1-like signal
>>handling that
>> ;; reaps zombie processes, necessary for the
>> ;; 'test_shutdown_subprocesses' test to pass.
>>
>> ;; TODO: Complete
>>https://issues.guix.gnu.org/30948.
>> ;; (execlp "tini" "--" "python" "setup.py"
>>"test")
>> (execlp "tini" "--"
>> "dbus-run-session" "--"
>> "xvfb-run" "-a" "-s" (getenv
>>"XVFB_SERVER_ARGS")
>> "python" "setup.py" "test"))
>> (pid
>> (match (waitpid pid)
>> ((_ . status)
>> (unless (zero? status)
>> (error "`pytest' exited with status"
>> status))))))))))))
>
> I know some bits there are definitely not relevant; I figured I could clean
> it up, after, if things worked but I'm still getting the exact same errors.
>
> Just to make sure /I'm/ not doing something incorrectly, is this within what
> you meant? Or did I do anything that's obviously not correct, in this setup?
The important bits are the fork, the (set-child-subreaper!) in the
child process (forked) and the (execlp "tini" "--" your-test-commands).
If this doesn't improve things, the problem may be elsewhere.
--
Thanks,
Maxim