On 10/09/2026 05:47, Collin Funk wrote:
Bruno Haible via GNU coreutils General Discussion <[email protected]>
writes:
On Solaris 11 OpenIndiana (from 2025) I see 1 test failure:
FAIL: tests/dd/no-allocate
Whereas the coreutils-9.11 prerelease had no test failure on the same machine.
Note that the xmalloc message there is not our xmalloc error message,
which would simply say "memory exhausted". It is also not our allocation
failure message for 'dd', which would be something like this:
$ $(ulimit -v 5000; dd if=/dev/null bs=500M)
dd: memory exhausted by input buffer of size 524288000 bytes (500 MiB)
I assume it happens while loading shard libraries or something like
that.
These are the tests that fail:
# count and skip are zero, we don't need to allocate memory
(ulimit -v $vm && dd bs=30M count=0) || fail=1
(ulimit -v $vm && dd ibs=30M count=0) || fail=1
(ulimit -v $vm && dd obs=30M count=0) || fail=1
Perhaps we can increase the block sizes a bit, and give the ulimit some
wiggle room for platforms that may need to allocate more memory. WDYT?
Yes that make senses. We had a similar issues already in this
test:https://github.com/coreutils/coreutils/commit/df30ce36ehttps://github.com/coreutils/coreutils/commit/0b7d8620f
I'll apply the attached.
cheers,
Padraig
From 43a827028d4b374a802abc4fe665ce134f0f8409 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Thu, 10 Sep 2026 13:04:01 +0100
Subject: [PATCH] tests: dd: avoid false failure due to restricted memory
* tests/dd/no-allocate.sh: Expand memory restriction
(and allocated buffers) by 6MiB, to give more head-room
to the shell.
Reported by Bruno Haible on OpenIndiana (from 2025).
---
tests/dd/no-allocate.sh | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/tests/dd/no-allocate.sh b/tests/dd/no-allocate.sh
index 8d247fb16..a05be907a 100755
--- a/tests/dd/no-allocate.sh
+++ b/tests/dd/no-allocate.sh
@@ -26,22 +26,25 @@ vm=$(get_min_ulimit_v_ timeout 10 dd if=f of=f2 status=none) \
|| skip_ 'shell lacks ulimit, or ASAN enabled'
rm f f2 || framework_failure_
+# Give some head room for subshells etc.
+vm=$(($vm+6000)) || framework_failure_
+
# Ensure dd exits with 1 if memory exhausted
-(ulimit -v $(($vm+6000)) && returns_ 1 \
+(ulimit -v $vm && returns_ 1 \
dd if=/dev/null of=/dev/null bs=$(($SSIZE_MAX-1))) || fail=1
-(ulimit -v $(($vm+6000)) && returns_ 1 \
+(ulimit -v $vm && returns_ 1 \
dd if=/dev/null of=/dev/null bs=$(($SSIZE_MAX-1)) skip=1) || fail=1
# Ensure dd exits with 1 on numeric overflow
-(ulimit -v $(($vm+6000)) && returns_ 1 \
+(ulimit -v $vm && 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+6000)) && returns_ 1 \
+(ulimit -v $vm && 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
-(ulimit -v $vm && dd bs=30M count=0) || fail=1
-(ulimit -v $vm && dd ibs=30M count=0) || fail=1
-(ulimit -v $vm && dd obs=30M count=0) || fail=1
+(ulimit -v $vm && dd bs=36M count=0) || fail=1
+(ulimit -v $vm && dd ibs=36M count=0) || fail=1
+(ulimit -v $vm && dd obs=36M count=0) || fail=1
check_dd_seek_alloc() {
local file="$1"
@@ -56,8 +59,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=36M $dd_op=1 count=0 $dd_file=tape)
local ret=$?
# Be defensive in case the tape reader is blocked for some reason
--
2.55.0