From 678281539b6329bf7c238a1193f41fbce9f8d262 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Wed, 15 Jan 2025 22:43:18 +0000 Subject: [PATCH] tests: head: avoid false failure on some systems * tests/head/head-c.sh: Pass a more similar operation to get_min_ulimit_v_, so we get a more appropriate limit. This was seen to be significant with CheriBSD. --- tests/head/head-c.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/head/head-c.sh b/tests/head/head-c.sh index 7500285641..0a9d311acc 100755 --- a/tests/head/head-c.sh +++ b/tests/head/head-c.sh @@ -39,7 +39,7 @@ esac # Only allocate memory as needed. # Coreutils <= 8.21 would allocate memory up front # based on the value passed to -c -vm=$(get_min_ulimit_v_ head -c1 /dev/null) && { +vm=$(get_min_ulimit_v_ head -c-1 /dev/null) && { (ulimit -v $(($vm+8000)) && head --bytes=-$SSIZE_MAX < /dev/null) || fail=1 (ulimit -v $(($vm+8000)) && head --bytes=-${UINTMAX_OFLOW}000 < /dev/null) || fail=1 -- 2.47.3