]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid false failure on setgid dir
authorPádraig Brady <P@draigBrady.com>
Wed, 21 Jan 2026 16:06:51 +0000 (16:06 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 21 Jan 2026 16:06:51 +0000 (16:06 +0000)
* tests/misc/mknod.sh: Skip a portion of the test
in the edge case of setgid directories.

tests/misc/mknod.sh

index 7e7cab602a39a23cc3c019597a2dfd3688299b5b..001dce8e91b1cc1b636d9b6906b81dac2ccc5802 100755 (executable)
@@ -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