]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: fix false failure on systems that can chmod symlinks
authorPádraig Brady <P@draigBrady.com>
Mon, 25 Mar 2024 12:12:19 +0000 (12:12 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 25 Mar 2024 12:12:19 +0000 (12:12 +0000)
* tests/chmod/symlinks.sh: The count of adjusted modes was
one more on systems where symlink modes can be adjusted.
Therefore only include the non symlinks in the count.

tests/chmod/symlinks.sh

index 0bb6be0b16f88bc891611313f0d73c48ca139fe1..0317cc360bc76fb5e6d712cd6f978ad5e835b021 100755 (executable)
@@ -48,10 +48,8 @@ count_755() {
 reset_modes
 # -R (with default -H) does not deref traversed symlinks (only cli args)
 chmod 755 -R a/c || fail=1
-ls -l a/b > out || framework_failure_
-count_755 0
-ls -lR a/c > out || framework_failure_
-count_755 1
+ls -ld a/c a/c/file a/b/file > out || framework_failure_
+count_755 2
 
 reset_modes
 # set a/c a/c/file and a/b/file (through symlink) to 755