]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: check that mknod, mkfifo, and mkdir handle comma-separated modes
authorCollin Funk <collin.funk1@gmail.com>
Mon, 17 Nov 2025 05:23:18 +0000 (21:23 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Tue, 18 Nov 2025 03:17:08 +0000 (19:17 -0800)
* tests/misc/mknod.sh: Test that mknod, mkfifo, and mkdir parse
comma-separated mode strings.

tests/misc/mknod.sh

index 24ba8f1ebda87cb1e8ffe0c62c402912d3ab2a71..28453791ef4884a53fb09f2d12f2857b08290d4c 100755 (executable)
@@ -36,4 +36,16 @@ mkdir -m 734 f3   || fail=1
 mode=$(ls -dgo f3|cut -b-10)
 test $mode = drwx-wxr-- || test $mode = drwx-wsr-- || fail=1
 
+mknod --mode='ug+rw,o+r' f4 p || fail=1
+mode=$(ls -dgo f4 | cut -b-10)
+test "$mode" = prw-rw-rw- || fail=1
+
+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
+
 Exit $fail