From: Collin Funk Date: Mon, 17 Nov 2025 05:23:18 +0000 (-0800) Subject: tests: check that mknod, mkfifo, and mkdir handle comma-separated modes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f695854d3e6e1d15f5619faa8e57bec58126300;p=thirdparty%2Fcoreutils.git tests: check that mknod, mkfifo, and mkdir handle comma-separated modes * tests/misc/mknod.sh: Test that mknod, mkfifo, and mkdir parse comma-separated mode strings. --- diff --git a/tests/misc/mknod.sh b/tests/misc/mknod.sh index 24ba8f1ebd..28453791ef 100755 --- a/tests/misc/mknod.sh +++ b/tests/misc/mknod.sh @@ -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