On 07/01/2026 18:19, Bruno Haible via GNU coreutils General Discussion wrote:
The new unit test tests/chmod/partial-fail. that was added in commit
71e0be29f140b7aa851346bb801c86036f10676d,
fails on several Linux platforms:
- CentOS 7
- AlmaLinux 9
- Alpine Linux
Were these running as root?
Anyway hopefully the attached addresses this oversight.
thanks,
Padraig
From 160595d0ccc61e3ab049a5062a147f97a0e9c0d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Wed, 7 Jan 2026 22:50:07 +0000
Subject: [PATCH] test: 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.
---
tests/chmod/partial-fail.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/chmod/partial-fail.sh b/tests/chmod/partial-fail.sh
index 97892d257..104da9512 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
--
2.52.0