On 16/04/2026 16:23, Bruno Haible wrote:
On Guix 1.4 (x86_64), there is one test failure:FAIL: tests/stat/stat-mount $ mount | grep proc none on /proc type proc (rw,relatime) $ unshare -rm /bin/sh -c 'mount -t tmpfs tmpfs /proc && true' -- true $ echo $? 0 $ unshare -rm /bin/sh -c 'mount -t tmpfs tmpfs /proc && mount' -- mount Segmentation fault (core dumped) (The 'mount' program dumped core.) $ unshare -rm /bin/sh -c 'mount -t tmpfs tmpfs /proc && src/stat -c 0%#a /' -- src/stat -c 0%#a / Segmentation fault (core dumped) (The 'stat' program dumped core.)
Thanks for the extra testing on this one. I suppose we can avoid the check unless mount(8) exits gracefully. Done in the attached. cheers, Padraig
From 54e9fcb6409c0c264ef5020f55d853ffcd04fe15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]> Date: Thu, 16 Apr 2026 21:27:42 +0100 Subject: [PATCH] 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. --- tests/stat/stat-mount.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/stat/stat-mount.sh b/tests/stat/stat-mount.sh index 18b544043..1a3d21996 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 -- 2.53.0
