From 10f8edbe170a2c6be1dbed35fd6446ca68303281 Mon Sep 17 00:00:00 2001 From: Zoltan Csizmadia Date: Mon, 12 Oct 2026 08:41:05 -0500 Subject: [PATCH] fix(rootfs): emulation-test no longer fails on a broken pipe from qemu -version docker run ... -version | head -1 closed the pipe while the docker CLI was still writing the second line; under pipefail that failed some runs and passed others (seen on the arm64 job of #532). Capture the output first. --- guest/rootfs/emulation-test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guest/rootfs/emulation-test.sh b/guest/rootfs/emulation-test.sh index 73fed8d..6dfea74 100755 --- a/guest/rootfs/emulation-test.sh +++ b/guest/rootfs/emulation-test.sh @@ -86,7 +86,11 @@ echo "==> host is $ROOTFS_ARCH; this rootfs should be able to emulate $ARCH_EMUL docker import "$tarball" "$image" >/dev/null echo "==> the emulator ships and runs" -docker run --rm "$image" "$QEMU_BIN" -version | head -1 | sed 's/^/ /' +# Capture first, then trim. `| head -1` closes the pipe while the docker CLI is +# still writing the second line of `qemu -version`; under pipefail that is a +# broken-pipe failure on some runs and not others. +qemu_version=$(docker run --rm "$image" "$QEMU_BIN" -version) +echo "$qemu_version" | sed -n '1s/^/ /p' echo "==> and nothing is registered out of the box" # Emulation is opt-in. A rootfs that registered an interpreter by itself would