bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38359: Guix 1.0.1-10.41b4b71 test fails on armhf


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
User-agent: mu4e 1.2.0; emacs 26.3

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]