* tests/stat/stat-mount.sh: Ensure stat -c '%a'
is independent from /proc.
https://github.com/coreutils/coreutils/pull/250
#!/bin/sh
-# Test stat -c%m
+# Test stat interactions with mounts
# Copyright (C) 2010-2026 Free Software Foundation, Inc.
*) fail=1;;
esac
+# Ensure stat works without mounting /proc
+hide_proc() {
+ unshare -rm $SHELL -c 'mount -t tmpfs tmpfs /proc && "$@"' -- "$@"
+}
+if hide_proc true; then
+ hide_proc stat -c '0%#a' / || fail=1
+fi
+
Exit $fail