From: Pádraig Brady
Date: Thu, 16 Apr 2026 20:27:42 +0000 (+0100) Subject: tests: avoid false failure with hidden /proc on Guix X-Git-Tag: v9.11~13 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=54e9fcb6409c0c264ef5020f55d853ffcd04fe15;p=thirdparty%2Fcoreutils.git tests: avoid false failure with hidden /proc on Guix * tests/stat/stat-mount.sh: Don't try our stat under unshare unless mount(8) exits gracefully. Reported by Bruno Haible. --- diff --git a/tests/stat/stat-mount.sh b/tests/stat/stat-mount.sh index 18b5440435..1a3d219964 100755 --- a/tests/stat/stat-mount.sh +++ b/tests/stat/stat-mount.sh @@ -30,7 +30,10 @@ hide_proc() { unshare -rm $SHELL -c 'mount -t tmpfs tmpfs /proc && "$@"' -- "$@" } if hide_proc true; then - hide_proc stat -c '0%#a' / || fail=1 + hide_proc mount; ret=$? + if test "$ret" = 2; then # Avoid segfaults under unshare on Guix + hide_proc stat -c '0%#a' / || fail=1 + fi fi Exit $fail