]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: fix test hang on case insenitive file systems
authorPádraig Brady <P@draigBrady.com>
Sun, 24 Sep 2017 02:37:13 +0000 (19:37 -0700)
committerPádraig Brady <P@draigBrady.com>
Sun, 24 Sep 2017 19:37:39 +0000 (12:37 -0700)
* tests/split/filter.sh: Due to an invalid 'FILE = zero.in'
construct trying to initialize a FILE variable, it would
instead try to run the FILE command which is present on
macOS 10.13 with APFS.
We also remove a redundant duplicate test clause introduced
during a rebase, and simplify the piped timeout command,
to avoid requiring a subshell and associated quoting.
* THANKS.in: Add the reporter Jack Howarth.
Fixes https://bugs.gnu.org/28506

THANKS.in
tests/split/filter.sh

index 70c00213b81d51504331a1d10d199756e46cc9a0..b5e11f0a461ac61b00a09225b87ad48679cbf24d 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
@@ -264,6 +264,7 @@ Ilya N. Golubev                     gin@mo.msk.ru
 Ingo Saitz                          ingo@debian.org
 Ivan Labath                         labath3@st.fmph.uniba.sk
 Ivo Timmermans                      ivo@debian.org
+Jack Howarth                        howarth.mailing.lists@gmail.com
 Jacky Fong                          jacky.fong@utoronto.ca
 James Antill                        jmanti%essex.ac.uk@seralph21.essex.ac.uk
 James Hunt                          jamesodhunt@hotmail.com
index 96602bdb27ca3aa69b6c8704e27412411259db61..25b90e543388435ee3cb58054d4918a241195a70 100755 (executable)
@@ -19,7 +19,7 @@
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 require_sparse_support_ # for 'truncate --size=$LARGE'
-xz --version || skip_ "xz (better than gzip/bzip2) required"
+xz --version || skip_ 'xz required'
 
 for total_n_lines in 5 3000 20000; do
   seq $total_n_lines > in || framework_failure_
@@ -53,15 +53,17 @@ yes | head -n200K | split -b1G --filter='head -c1 >/dev/null' || fail=1
 
 # Ensure that "endless" input is ignored when all filters finish
 for mode in '' 'r/'; do
-  FILE = '-'
+  in_file='-'
+  in_cmd='yes'
   if test "$mode" = ''; then
-    FILE = 'zero.in'
+    in_file='zero.in'
+    in_cmd='true'
     truncate -s10T "$FILE" || continue
   fi
   for N in 1 2; do
     rm -f x??.n || framework_failure_
-    timeout 10 sh -c \
-      "yes | split --filter='head -c1 >\$FILE.n' -n $mode$N $FILE" || fail=1
+    $in_cmd |
+     timeout 10 split --filter='head -c1 >$FILE.n' -n $mode$N $in_file || fail=1
     # Also ensure we get appropriate output from each filter
     seq 1 $N | tr '0-9' 1 > stat.exp
     stat -c%s x??.n > stat.out || framework_failure_
@@ -75,10 +77,4 @@ for buf in 1000 1000000; do
     "yes | split --filter='head -c1 >/dev/null' -b $buf" || fail=1
 done
 
-# Ensure that "endless" input _is_ processed for unbounded number of filters
-for buf in 1000 1000000; do
-  returns_ 124 timeout .5 sh -c \
-    "yes | split --filter='head -c1 >/dev/null' -b $buf" || fail=1
-done
-
 Exit $fail