mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-21 03:12:48 +02:00
tests: avoid failures if 'ulimit -n' cannot set file descriptor limits
This fixes test failures seen on Haiku. * tests/ls/recursive.sh: Run 'ls' even if ulimit fails. * tests/split/r-chunk.sh: Run 'split' even if ulimit fails. * tests/sort/sort-merge-fdlimit.sh: Skip test if 'ulimit -n' cannot set file descriptor limits. Reported by Bruno Haible.
This commit is contained in:
@@ -58,7 +58,7 @@ compare exp out || fail=1
|
||||
# Ensure we fall back to appending to a file at a time
|
||||
# if we hit the limit for the number of open files.
|
||||
rm x*
|
||||
(ulimit -n 20 && yes | head -n90 | split -n r/30 ) || fail=1
|
||||
(ulimit -n 20; yes | head -n90 | split -n r/30 ) || fail=1
|
||||
test "$(stat -c %s x* | uniq -c | sed 's/^ *//; s/ /x/')" = "30x6" || fail=1
|
||||
|
||||
Exit $fail
|
||||
|
||||
Reference in New Issue
Block a user