all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: 38359@debbugs.gnu.org
Subject: bug#38359: Guix 1.0.1-10.41b4b71 test fails on armhf
Date: Mon, 09 Dec 2019 18:07:19 +0100	[thread overview]
Message-ID: <871rtdctrs.fsf@gnu.org> (raw)
In-Reply-To: <877e3elumn.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 02 Dec 2019 14:33:36 +0100")

Hi Mathieu,

Sorry for the delay!

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

>> Mmmh, I get what's going on in tests/processes.scm. It's an issue in
>> (guix scripts processes) where argv0 is checked for "guix-daemon".
>>
>> When using --system my-system, argv0 is "qemu-my-system". So we need to
>> check both argv0 and argv1 for "guix-daemon".
>>
>> I'll propose a patch.

Good catch!  When “transparent” emulation is no longer transparent…

> Here it is. Please tell me what you think. Another solution would be to
> accept that (guix process) is broken when guix-daemon is run via binfmt
> and disable the tests in that case. However, I don't know how to detect
> it properly for the test suite.

It’s kinda ugly, but I’d be tempted to go for that second solution:
detecting in tests/processes.scm that we’re under binfmt_misc and
skipping tests.

The reason is that while your patch looks great to me, it would break
when new “guix processes” is used with an old daemon.  There are other
details, like “guix/PID” is not as nice as “guix-daemon PID” (or
similar) for grepping purposes, but “guix-daemon PID” might hit the
limit on command name length.  Tricky!

As for the detection, this appears to work:

  (define (binfmt-misc?)
    (let ((pid (getpid))
          (cmdline (call-with-input-file "/proc/self/cmdline" get-string-all)))
      (match (primitive-fork)
        (0 (dynamic-wind
             (const #t)
             (lambda ()
               (exit (not (equal? (call-with-input-file (format #f "/proc/~a/cmdline" pid)
                                    get-string-all)
                                  cmdline))))
             (const #t)))
        (x (zero? (pk (cdr (waitpid x))))))))

WDYT?

Thanks,
Ludo’.

  reply	other threads:[~2019-12-09 17:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 11:51 bug#38359: Guix 1.0.1-10.41b4b71 test fails on armhf Mathieu Othacehe
2019-11-25 22:08 ` bug#38359: Mistaken merge Jack Hill
2019-11-26 10:53 ` bug#38359: Guix 1.0.1-10.41b4b71 test fails on armhf Mathieu Othacehe
2019-12-02 13:33   ` Mathieu Othacehe
2019-12-09 17:07     ` Ludovic Courtès [this message]
2019-12-10 10:00       ` Mathieu Othacehe
2019-12-10 13:22         ` Ludovic Courtès
2019-11-27 10:42 ` Mathieu Othacehe

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=871rtdctrs.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=38359@debbugs.gnu.org \
    --cc=m.othacehe@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.