]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
ls: improve removed-directory test
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 7 Mar 2020 18:29:51 +0000 (10:29 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 7 Mar 2020 18:30:56 +0000 (10:30 -0800)
* tests/ls/removed-directory.sh: Remove host_triplet test.
Skip this test if one cannot remove the working directory.
From a suggestion by Bernhard Voelker (Bug#39929).

tests/ls/removed-directory.sh

index fe8f929a194b0e3b3cab3e33fe1bc69e95da21ac..63b209dee7ca7c5074388b580cf2b63b0b66f141 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
-# If ls is asked to list a removed directory (e.g. the parent process's
-# current working directory that has been removed by another process), it
-# emits an error message.
+# If ls is asked to list a removed directory (e.g., the parent process's
+# current working directory has been removed by another process), it
+# should not emit an error message merely because the directory is removed.
 
 # Copyright (C) 2020 Free Software Foundation, Inc.
 
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
-case $host_triplet in
-  *linux*) ;;
-  *) skip_ 'non linux kernel' ;;
-esac
-
 cwd=$(pwd)
 mkdir d || framework_failure_
 cd d || framework_failure_
-rmdir ../d || framework_failure_
+rmdir ../d || skip_ "can't remove working directory on this platform"
 
 ls >../out 2>../err || fail=1
 cd "$cwd" || framework_failure_