From e2d537ace6b2e9ffd4ee6ff66610e331218fb052 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 29 Oct 2026 21:30:38 +0100 Subject: [PATCH] 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 --- tests/misc/mknod.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/misc/mknod.sh b/tests/misc/mknod.sh index 001dce8e9..9062672a3 100755 --- a/tests/misc/mknod.sh +++ b/tests/misc/mknod.sh @@ -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)