From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Othacehe Subject: bug#38359: Guix 1.0.1-10.41b4b71 test fails on armhf Date: Tue, 10 Dec 2019 11:00:26 +0100 Message-ID: <874ky8sdol.fsf@gmail.com> References: <87a78ktbqm.fsf@gmail.com> <87zhgisycj.fsf@gmail.com> <877e3elumn.fsf@gmail.com> <871rtdctrs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36974) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iecKH-0002L3-Ql for bug-guix@gnu.org; Tue, 10 Dec 2019 05:01:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iecKF-0002FA-RT for bug-guix@gnu.org; Tue, 10 Dec 2019 05:01:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48985) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iecKE-0002Ex-SD for bug-guix@gnu.org; Tue, 10 Dec 2019 05:01:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iecKE-0001G9-QV for bug-guix@gnu.org; Tue, 10 Dec 2019 05:01:02 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-reply-to: <871rtdctrs.fsf@gnu.org> 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 38359-done@debbugs.gnu.org Hola! > 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? Nice trick, I didn't think of forking process to fool qemu-user ;) Pushed a fix with your snippet as 0b5ad0e756a34d5e3ed1f37c3d4083a330fa33f5. Thanks, Mathieu