summaryrefslogtreecommitdiff
path: root/tests/dd
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-10-08 03:41:07 +0100
committerPádraig Brady <P@draigBrady.com>2015-10-08 03:54:02 +0100
commitc1dba59a79249f8e9f546fd3453da32a17ccaeb1 (patch)
tree4b8c9065e6fc47ca93e2ad273752f0c35f5c2f57 /tests/dd
parentce501787d45273ecea560a6a0c3fed1e415b88eb (diff)
downloadcoreutils-c1dba59a79249f8e9f546fd3453da32a17ccaeb1.tar.xz
tests: adjust recent changes to virtual memory limits
* tests/dd/no-allocate.sh: Account for timeout(1) when determining the required mem, as timeout has additional shared libs. This avoids the need for the hardcoded 4M addition to the limit. * tests/misc/head-c.sh: Increase the base limit, to account for the fact that head(1) will allocate some additional mem in this case. * tests/misc/cut-huge-range.sh: Remove mention of specific limits. * tests/misc/printf-surprise.sh: Likewise. Reported by Dmitry V. Levin
Diffstat (limited to 'tests/dd')
-rwxr-xr-xtests/dd/no-allocate.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/dd/no-allocate.sh b/tests/dd/no-allocate.sh
index d122e3544..f6ce00391 100755
--- a/tests/dd/no-allocate.sh
+++ b/tests/dd/no-allocate.sh
@@ -21,9 +21,9 @@ print_ver_ dd
# Determine basic amount of memory needed.
echo . > f || framework_failure_
-vm=$(get_min_ulimit_v_ dd if=f of=f2 status=none) \
+vm=$(get_min_ulimit_v_ timeout 10 dd if=f of=f2 status=none) \
|| skip_ "this shell lacks ulimit support"
-rm -f f || framework_failure_
+rm f f2 || framework_failure_
# count and skip are zero, we don't need to allocate memory
(ulimit -v $vm && dd bs=30M count=0) || fail=1
@@ -43,8 +43,8 @@ check_dd_seek_alloc() {
timeout 10 dd count=1 if=/dev/zero of=tape&
# Allocate buffer and read from the "tape"
- (ulimit -v $(($vm+4000)) \
- && timeout 10 dd $dd_buf=30M $dd_op=1 count=0 $dd_file=tape)
+ (ulimit -v $vm \
+ && timeout 10 dd $dd_buf=30M $dd_op=1 count=0 $dd_file=tape)
local ret=$?
# Be defensive in case the tape reader is blocked for some reason