On 16/04/2026 15:59, Bruno Haible wrote:
On Slackware 14, there is one test failure:

FAIL: tests/dd/no-allocate

There were two recently introduced issues with that test.

1. It omitted the getlimits_ call
2. It left the determined ulimit to small to allow for returns_

The attached should address those.

cheers,
Padraig
From 0b7d8620f74db8515ad2d1cb95a945cd407ac6bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Thu, 16 Apr 2026 19:03:13 +0100
Subject: [PATCH] tests: fix false failure due to ulimit usage

* tests/dd/no-allocate.sh: Run getlimits_ to ensure
we have $SSIZE_MAX etc. available.  Also give some buffer
for the configured ulimit to leave space for returns_ to work.
---
 tests/dd/no-allocate.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/dd/no-allocate.sh b/tests/dd/no-allocate.sh
index f5ed903fc..02fdef5ee 100755
--- a/tests/dd/no-allocate.sh
+++ b/tests/dd/no-allocate.sh
@@ -18,6 +18,7 @@
 
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
+getlimits_
 
 # Determine basic amount of memory needed.
 echo . > f || framework_failure_
@@ -26,13 +27,13 @@ vm=$(get_min_ulimit_v_ timeout 10 dd if=f of=f2 status=none) \
 rm f f2 || framework_failure_
 
 # Ensure dd exits with 1 if memory exhausted
-(ulimit -v $vm && returns_ 1 \
+(ulimit -v $(($vm+6000)) && returns_ 1 \
  dd if=/dev/null of=/dev/null bs=$(($SSIZE_MAX-1))) || fail=1
 # Ensure dd exits with 1 on numeric overflow
-(ulimit -v $vm && returns_ 1 \
+(ulimit -v $(($vm+6000)) && returns_ 1 \
  dd if=/dev/null of=/dev/null bs=$SIZE_OFLOW) || fail=1
 # Ensure dd exits with 1 on invalid number
-(ulimit -v $vm && returns_ 1 \
+(ulimit -v $(($vm+6000)) && returns_ 1 \
  dd if=/dev/null of=/dev/null bs=0) || fail=1
 
 # count and skip are zero, we don't need to allocate memory
-- 
2.53.0

Reply via email to