summaryrefslogtreecommitdiff
path: root/tests/misc/csplit-heap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/csplit-heap.sh')
-rwxr-xr-xtests/misc/csplit-heap.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/misc/csplit-heap.sh b/tests/misc/csplit-heap.sh
index 9e51cb15f..0ffe70ad4 100755
--- a/tests/misc/csplit-heap.sh
+++ b/tests/misc/csplit-heap.sh
@@ -19,11 +19,14 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ csplit
-require_ulimit_v_
+# Determine basic amount of memory needed.
+{ echo y; echo n; } > f || framework_failure_
+vm=$(get_min_ulimit_v_ csplit -z f %n%1) \
+ || skip_ "this shell lacks ulimit support"
(
- ulimit -v 20000
- { yes | head -n2500000; echo n; } | csplit -z - %n%1
+ ulimit -v $vm \
+ && { yes | head -n2500000; echo n; } | csplit -z - %n%1
) || fail=1
Exit $fail