]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: install should ignore umask
authorSylvestre Ledru <sylvestre@debian.org>
Sat, 15 Nov 2025 21:24:04 +0000 (22:24 +0100)
committerPádraig Brady <P@draigBrady.com>
Sat, 15 Nov 2025 23:10:54 +0000 (23:10 +0000)
Identified here:
<https://github.com/uutils/coreutils/pull/9254>

  * tests/install/basic-1.sh: Add the check.

tests/install/basic-1.sh

index b529f2af9ccbaebb8801c8598aac37e24f8e2c9d..741de7aef41c6d772b5f7c4862888f54b2b8c4a8 100755 (executable)
@@ -160,4 +160,12 @@ if ! mkdir sub-ro/d; then
   grep 'cannot create directory' err || { cat err; fail=1; }
 fi
 
+# Test install with --mode=+w (relative mode) ignores umask
+umask 0022 || framework_failure_
+touch file1 || framework_failure_
+ginstall file1 file2 --mode=+w || fail=1
+# Check that file2 has permissions --w--w--w-
+mode=$(ls -l file2|cut -b-10)
+test "$mode" = --w--w--w- || fail=1
+
 Exit $fail