diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-12-16 02:07:56 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-12-17 00:25:49 +0000 |
commit | cd6e49ced86a1aa2a03de7f698426311e2767e76 (patch) | |
tree | d9cd896ecbe86ca043035e345dcafd0e459bdb9f /tests/misc/cut-huge-range.sh | |
parent | 896006bf7620c81435fd67cc3765e85a9f480fe7 (diff) | |
download | coreutils-cd6e49ced86a1aa2a03de7f698426311e2767e76.tar.xz |
tests: avoid intermittent ulimit -v failures
* init.cfg (get_min_ulimit_v_): Increase the determined
virtual memory limit for the command by a page size
to avoid alignment issues causing false failures for
subsequent runs.
* tests/misc/cut-huge-range.sh: Be defensive and match
the cut invocations under test, more closely with the
form used to determine the VM memory limit.
This was noticed on i686 linux at:
http://hydra.nixos.org/build/28990456
Diffstat (limited to 'tests/misc/cut-huge-range.sh')
-rwxr-xr-x | tests/misc/cut-huge-range.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/misc/cut-huge-range.sh b/tests/misc/cut-huge-range.sh index 633ca8572..001bcde30 100755 --- a/tests/misc/cut-huge-range.sh +++ b/tests/misc/cut-huge-range.sh @@ -51,15 +51,15 @@ CUT_MAX=$(echo $SIZE_MAX | sed "$subtract_one") # From coreutils-8.10 through 8.20, this would make cut try to allocate # a 256MiB bit vector. -(ulimit -v $vm && : | cut -b$CUT_MAX- > err 2>&1) || fail=1 +(ulimit -v $vm && cut -b$CUT_MAX- /dev/null > err 2>&1) || fail=1 # Up to and including coreutils-8.21, cut would allocate possibly needed # memory upfront. Subsequently extra memory is no longer needed. -(ulimit -v $vm && : | cut -b1-$CUT_MAX >> err 2>&1) || fail=1 +(ulimit -v $vm && cut -b1-$CUT_MAX /dev/null >> err 2>&1) || fail=1 # Explicitly disallow values above CUT_MAX -(ulimit -v $vm && : | returns_ 1 cut -b$SIZE_MAX 2>/dev/null) || fail=1 -(ulimit -v $vm && : | returns_ 1 cut -b$SIZE_OFLOW 2>/dev/null) || fail=1 +(ulimit -v $vm && returns_ 1 cut -b$SIZE_MAX /dev/null 2>/dev/null) || fail=1 +(ulimit -v $vm && returns_ 1 cut -b$SIZE_OFLOW /dev/null 2>/dev/null) || fail=1 compare /dev/null err || fail=1 |