summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/cut-huge-range.sh2
-rwxr-xr-xtests/misc/head-c.sh2
-rwxr-xr-xtests/misc/printf-surprise.sh3
3 files changed, 3 insertions, 4 deletions
diff --git a/tests/misc/cut-huge-range.sh b/tests/misc/cut-huge-range.sh
index 4df2fc066..633ca8572 100755
--- a/tests/misc/cut-huge-range.sh
+++ b/tests/misc/cut-huge-range.sh
@@ -50,7 +50,7 @@ subtract_one='
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. With a 20MB limit on VM, the following would fail.
+# a 256MiB bit vector.
(ulimit -v $vm && : | cut -b$CUT_MAX- > err 2>&1) || fail=1
# Up to and including coreutils-8.21, cut would allocate possibly needed
diff --git a/tests/misc/head-c.sh b/tests/misc/head-c.sh
index ab821ac61..0c63e3a90 100755
--- a/tests/misc/head-c.sh
+++ b/tests/misc/head-c.sh
@@ -42,7 +42,7 @@ esac
# Only allocate memory as needed.
# Coreutils <= 8.21 would allocate memory up front
# based on the value passed to -c
-(ulimit -v $vm && head --bytes=-$SSIZE_MAX < /dev/null) || fail=1
+(ulimit -v $(($vm+1000)) && head --bytes=-$SSIZE_MAX < /dev/null) || fail=1
# Make sure it works on funny files in /proc and /sys.
diff --git a/tests/misc/printf-surprise.sh b/tests/misc/printf-surprise.sh
index 8480693fc..f098bc13d 100755
--- a/tests/misc/printf-surprise.sh
+++ b/tests/misc/printf-surprise.sh
@@ -59,8 +59,7 @@ cleanup_() { kill $pid 2>/dev/null && wait $pid; }
head -c 10 fifo > out & pid=$!
-# Choosing the virtual memory limit, 11000 is enough, but 10000 is too
-# little and provokes a "memory exhausted" diagnostic on FreeBSD 9.0-p3.
+# Trigger large mem allocation failure
( ulimit -v $vm && env $prog %20000000f 0 2>err-msg > fifo )
exit=$?