1
0
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:
Collin Funk
2026-01-24 11:15:10 -08:00
parent 75c671415e
commit ec77664a31
3 changed files with 5 additions and 3 deletions

View File

@@ -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