mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-18 01:18:51 +02:00
tests: fix test hang on case insenitive file systems
* 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
This commit is contained 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
|
||||
|
||||
+7
-11
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user