]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid false ulimit failure on some systems
authorLudovic Courtès <ludo@gnu.org>
Tue, 28 Mar 2017 03:34:39 +0000 (20:34 -0700)
committerPádraig Brady <P@draigBrady.com>
Tue, 28 Mar 2017 04:23:07 +0000 (21:23 -0700)
* tests/misc/cut-huge-range.sh: On some systems returns_ may
use more memory, so incorporate that in the determination
of the ulimit value to use.  Noticed on ARMv7 with bash-4.4.12,
and x86_64 with bash-4.2.37.
Fixes http://bugs.gnu.org/26253

tests/misc/cut-huge-range.sh

index 6b3c5b6edf5738615b1e34a2c8d3895ca93601bb..55b7b640e12b80ce3ea58c6ee62360eba880c475 100755 (executable)
@@ -20,9 +20,8 @@
 print_ver_ cut
 getlimits_
 
-vm=$(get_min_ulimit_v_ cut -b1 /dev/null) \
+vm=$(get_min_ulimit_v_ returns_ 0 cut -b1 /dev/null) \
   || skip_ "this shell lacks ulimit support"
-vm=$(($vm + 1000)) # avoid spurious failures
 
 # sed script to subtract one from the input.
 # Each input line should consist of a positive decimal number.