]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: wc: protect against a hang on GNU/Hurd
authorCollin Funk <collin.funk1@gmail.com>
Fri, 7 Nov 2025 00:52:03 +0000 (16:52 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Fri, 7 Nov 2025 00:52:03 +0000 (16:52 -0800)
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

index 1622962c5d490e79288f9cecf52f6d8eb4e0a25c..e62840c2ccda8195b660b9d065d54205da1fde08 100755 (executable)
@@ -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 \