From: Pádraig Brady Date: Wed, 7 Jan 2026 22:50:07 +0000 (+0000) Subject: tests: chmod: fix false failure in recent test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a388638851aff251ff7c56388eb11eb4fea7b81;p=thirdparty%2Fcoreutils.git tests: chmod: fix false failure in recent test * tests/chmod/partial-fail.sh: Test readablility of mode 0 files independently, to avoid false failure, e.g., when run as root. Reported by Bruno Haible. --- diff --git a/tests/chmod/partial-fail.sh b/tests/chmod/partial-fail.sh index 97892d2570..104da95128 100755 --- a/tests/chmod/partial-fail.sh +++ b/tests/chmod/partial-fail.sh @@ -21,6 +21,11 @@ print_ver_ chmod touch file || framework_failure_ returns_ 1 chmod 0 missing_file file || fail=1 -test -r file && fail=1 + +touch unreadable || framework_failure_ +chmod 0 unreadable || framework_failure_ +if ! test -r unreadable; then + test -r file && fail=1 +fi Exit $fail