Subject: Re: bug#49485: [core-updates] Coreutils test failures on emulated ARMv7/AArch64

From: Ludovic Courtès <[email-masked]>
Date: Sat, 10 Jul 2021 01:37:24 +0200

Ludovic Courtès <[email-masked]> skribis:

> As can be seen in <https://ci.guix.gnu.org/build/657826/log/raw>, the
> Coreutils test suite fails on emulated hardware because argv[0] is an
> absolute file name whereas the test suite expects it to be a basename:

[...]

> -tail: cannot fstat 'standard input'
> -tail: error reading 'standard input'
> -tail: no files remaining
> -tail: -
> +/tmp/guix-build-coreutils-8.32.drv-0/coreutils-8.32/./src/tail: cannot fstat 'standard input'
> +/tmp/guix-build-coreutils-8.32.drv-0/coreutils-8.32/./src/tail: error reading 'standard input'
> +/tmp/guix-build-coreutils-8.32.drv-0/coreutils-8.32/./src/tail: no files remaining
> +/tmp/guix-build-coreutils-8.32.drv-0/coreutils-8.32/./src/tail: -

Reading ‘binfmt-misc.rst’ in the Linux Documentation/ directory, this is
expected: by default, when using binfmt_misc, argv[0] is replaced by the
absolute file name of the executable.

The “P” flag fixes that and QEMU 6.0.0 does the right thing when that
flag is used, so commit 2ea2bca1ddb1e3ba9d843ff7544c22925de7f6d7 adds
the “P” flag by default.

Then I reconfigured the build nodes behind ci.guix with:

  guix time-machine --commit=2ea2bca1ddb1e3ba9d843ff7544c22925de7f6d7 \
    -- deploy berlin-nodes.scm -L modules

followed by:

  for i in $(seq 159 2 185); do ssh [email-masked].$i herd restart qemu-binfmt; done

So normally, builds at ci.guix corresponding to core-updates commit
c823b958256ba1db6cf896400fae218e4261266e and later should be done with
the “P” flag.

Ludo’.