coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: avoid false failure on setgid dir


From: Pádraig Brady
Subject: [PATCH] tests: avoid false failure on setgid dir
Date: Wed, 21 Jan 2026 16:07:44 +0000

* tests/misc/mknod.sh: Skip a portion of the test
in the edge case of setgid directories.
---
 tests/misc/mknod.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/misc/mknod.sh b/tests/misc/mknod.sh
index 7e7cab602..001dce8e9 100755
--- a/tests/misc/mknod.sh
+++ b/tests/misc/mknod.sh
@@ -44,8 +44,10 @@ mkfifo --mode='ug+rw,o+r' f5 || fail=1
 mode=$(ls -dgo f5 | cut -b-10)
 test "$mode" = prw-rw-rw- || fail=1
 
-mkdir --mode='ug+rw,o+r' f6 || fail=1
-mode=$(ls -dgo f6 | cut -b-10)
-test "$mode" = drwxrwxrwx || fail=1
+if ! test -g .; then
+  mkdir --mode='ug+rw,o+r' f6 || fail=1
+  mode=$(ls -dgo f6 | cut -b-10)
+  test "$mode" = drwxrwxrwx || fail=1
+fi
 
 Exit $fail
-- 
2.52.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]