tests: mkfifo: ensure a -m value starting with '-' is accepted

Reported at https://github.com/uutils/coreutils/issues/16000

* tests/misc/mknod.sh: Add test case.

Link: https://github.com/coreutils/coreutils/pull/422
This commit is contained in:
Sylvestre Ledru authored and Pádraig Brady committed 2026-11-07 12:35:10 +00:00
1 parent c310a8f0e5
commit e2d537ace6
1 file changed
+4
+4
View File
@@ -44,6 +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
# A -m value starting with '-' is accepted.
mkfifo -m -1 f7 || fail=1
test -p f7 || fail=1
if ! test -g .; then
mkdir --mode='ug+rw,o+r' f6 || fail=1
mode=$(ls -dgo f6 | cut -b-10)