Pádraig Brady <[email protected]> writes:

> For a kernel panic like that it would be best to just skip on hurd.

How is the attached patch?

I know we usually use $host_triplet in tests if needed. But I figured it
was best to copy the check from require_gnu_() in init.cfg.

Collin

>From 8dd89f55d52059e590572ed94a8c9165f92b5354 Mon Sep 17 00:00:00 2001
Message-ID: <8dd89f55d52059e590572ed94a8c9165f92b5354.1762477048.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Thu, 6 Nov 2025 16:52:03 -0800
Subject: [PATCH] tests: wc: protect against a hang on GNU/Hurd

Reported by Bruno Haible in
<https://lists.gnu.org/r/coreutils/2025-11/msg00051.html>.

* tests/wc/wc-total.sh: Skip a test that would exhaust memory on
GNU/Hurd.
---
 tests/wc/wc-total.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/wc/wc-total.sh b/tests/wc/wc-total.sh
index 1622962c5..e62840c2c 100755
--- a/tests/wc/wc-total.sh
+++ b/tests/wc/wc-total.sh
@@ -42,7 +42,8 @@ compare exp out || fail=1
 wc --total=always 2b > out || fail=1
 test "$(wc -l < out)" = 2 || fail=1
 
-if truncate -s 2E big; then
+# Skip this test on GNU/Hurd since it will exhaust memory there.
+if test "$(uname)" != GNU && truncate -s 2E big; then
   if test "$UINTMAX_MAX" = '18446744073709551615'; then
     # Ensure overflow is diagnosed
     returns_ 1 wc --total=only -c big big big big big big big big \
-- 
2.51.1

Reply via email to