all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thiago Jung Bauermann <bauermann@kolabnow.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	Kyle Meyer <kyle@kyleam.com>, zimoun <zimon.toutoune@gmail.com>,
	Arun Isaac <arunisaac@systemreboot.net>,
	guix-devel@gnu.org
Subject: Re: Updating mumi on berlin
Date: Sat, 04 Jun 2022 19:36:47 -0300	[thread overview]
Message-ID: <87v8tgrqtk.fsf@kolabnow.com> (raw)
In-Reply-To: <878rr2cy13.fsf@gnu.org>


Hello Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

> Thiago Jung Bauermann <bauermann@kolabnow.com> skribis:
>
>> I tried the latter a couple of weeks ago and it didn't work either,
>> though it's highly likely that I did something wrong in my Scheme code.
>> I also didn't use the 1-second timer hack so perhaps that was it.
>>
>> I just tested this (adapted from the mutter package) and it worked:
>>
>> @@ -4137,6 +4142,26 @@ (define-public public-inbox
>>               ;; the builder.
>>               (substitute* "t/httpd-unix.t"
>>                 (("^SKIP: \\{") "SKIP: { skip('Guix');"))))
>> +         (replace 'check
>> +           (lambda* (#:key target
>> +                     (tests? (not target)) (test-flags '())
>> +                     #:allow-other-keys)
>> +             (if tests?
>> +                 (match (primitive-fork)
>> +                   (0                     ;child process
>> +                    (set-child-subreaper!)
>> +                    ;; Use tini so that signals are properly handled and
>> +                    ;; doubly-forked processes get reaped; otherwise,
>> +                    ;; lei-daemon is kept as a zombie and the testsuite
>> +                    ;; fails thinking that it didn't quit as it should.
>> +                    (apply execlp "tini" "--"
>> +                           "make" "check" test-flags))
>
> How does a basic SIGCHLD handler fare?
>
>   (sigaction SIGCHLD
>     (lambda _ (false-if-exception (waitpid WAIT_ANY WNOHANG))))

I finally had a chance to try this, but it didn't work. I didn't try the
changes suggested by Maxime though.

Here's the full ‘check’ phase I tried:

--8<---------------cut here---------------start------------->8---
(replace 'check
  (lambda* (#:key target
            (tests? (not target)) (test-flags '())
            #:allow-other-keys)
    (if tests?
        (match (primitive-fork)
          (0                     ;child process
            (set-child-subreaper!)

            ;; lei tests build UNIX domain sockets in the temporary
            ;; directory, but the path of those sockets can be at most
            ;; 108 chars and Guix' default value for the variables
            ;; below already use 47 chars. Use the shortest temporary
            ;; path possible to avoid hitting the limit.
            (setenv "TEMP" "/tmp")
            (setenv "TEMPDIR" "/tmp")
            (setenv "TMP" "/tmp")
            (setenv "TMPDIR" "/tmp")

            (sigaction SIGCHLD
              (lambda _ (false-if-exception (waitpid WAIT_ANY WNOHANG))))
            (exit (status:exit-val
                    (apply system* "make" "check" test-flags))))
          (pid
            (match (waitpid pid)
              ((_ . status)
                (unless (zero? status)
                  (error "`make check' exited with status" status))))))
        (format #t "test suite not run~%"))))
--8<---------------cut here---------------end--------------->8---

-- 
Thanks
Thiago


  parent reply	other threads:[~2022-06-04 22:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22  5:38 Updating mumi on berlin Arun Isaac
2022-04-27  6:27 ` zimoun
2022-04-27 11:14   ` Arun Isaac
2022-05-02 10:33     ` zimoun
2022-05-03 17:33       ` Arun Isaac
2022-05-03 20:42       ` Thiago Jung Bauermann
2022-05-04  8:00         ` zimoun
2022-05-05  1:49           ` Kyle Meyer
2022-05-05  3:13             ` Thiago Jung Bauermann
2022-05-05 14:45               ` Maxim Cournoyer
2022-05-06  3:16                 ` Thiago Jung Bauermann
2022-05-07 22:20                 ` Ludovic Courtès
2022-05-08  1:00                   ` Thiago Jung Bauermann
2022-05-15 20:59                     ` Ludovic Courtès
2022-05-16  8:27                       ` Maxime Devos
2022-06-04 22:36                       ` Thiago Jung Bauermann [this message]
2022-05-05  8:37             ` zimoun
2022-05-06  2:24               ` public-inbox v1.7 update (was: Updating mumi on berlin) Kyle Meyer
2022-05-06  7:37                 ` zimoun
2022-05-08  4:41                   ` Kyle Meyer
2022-05-09 13:58                     ` zimoun
2022-05-06  3:22               ` Updating mumi on berlin Thiago Jung Bauermann
2022-05-06  7:48                 ` zimoun
2022-05-15 22:05                   ` Thiago Jung Bauermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8tgrqtk.fsf@kolabnow.com \
    --to=bauermann@kolabnow.com \
    --cc=arunisaac@systemreboot.net \
    --cc=guix-devel@gnu.org \
    --cc=kyle@kyleam.com \
    --cc=ludo@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.