From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#38359: Guix 1.0.1-10.41b4b71 test fails on armhf Date: Mon, 09 Dec 2019 18:07:19 +0100 Message-ID: <871rtdctrs.fsf@gnu.org> References: <87a78ktbqm.fsf@gmail.com> <87zhgisycj.fsf@gmail.com> <877e3elumn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43641) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieMVv-00006N-RE for bug-guix@gnu.org; Mon, 09 Dec 2019 12:08:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ieMVu-0001dx-Ra for bug-guix@gnu.org; Mon, 09 Dec 2019 12:08:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48387) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ieMVu-0001dW-Na for bug-guix@gnu.org; Mon, 09 Dec 2019 12:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ieMVu-0000ku-IV for bug-guix@gnu.org; Mon, 09 Dec 2019 12:08:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <877e3elumn.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 02 Dec 2019 14:33:36 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Mathieu Othacehe Cc: 38359@debbugs.gnu.org Hi Mathieu, Sorry for the delay! Mathieu Othacehe 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 =E2=80=9Ctransparent=E2=80=9D emulation is no longer tran= sparent=E2=80=A6 > 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=E2=80=99s kinda ugly, but I=E2=80=99d be tempted to go for that second s= olution: detecting in tests/processes.scm that we=E2=80=99re under binfmt_misc and skipping tests. The reason is that while your patch looks great to me, it would break when new =E2=80=9Cguix processes=E2=80=9D is used with an old daemon. Ther= e are other details, like =E2=80=9Cguix/PID=E2=80=9D is not as nice as =E2=80=9Cguix-da= emon PID=E2=80=9D (or similar) for grepping purposes, but =E2=80=9Cguix-daemon PID=E2=80=9D 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-al= l))) (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=E2=80=99.