On 16/01/2025 20:19, Paul Eggert wrote:
On 2025-01-16 11:50, Bruno Haible via GNU coreutils Bug Reports wrote:
    $ src/timeout --verbose 1 src/tail -c 4096 /dev/urandom
    timeout: sending signal TERM to command 'src/tail'
    $ echo $?
    124

Wikipedia[1] says that CentOS versions through CentOS 8 have reached
end-of-life and are no longer supported, so I doubt whether it's worth
our time to debug this merely for them. The oldest CentOSish version
still supported is CentOS Stream 9[2].

[1]: https://en.wikipedia.org/wiki/CentOS#End-of-support_schedule
[2]: https://en.wikipedia.org/wiki/CentOS_Stream#Release_history

Right. Behavior of `tail -c /dev/pseudo` is quite system dependent really,
so that test is quite brittle as is. We already allow for Solaris
specific behavior in the test, so I propose we at least adjust the test
to skip failures on older kernels, as in the attached.

cheers,
Pádraig
From 700690ebc35e2afdee06100d83427c45b6e87a4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
Date: Thu, 16 Jan 2025 21:05:34 +0000
Subject: [PATCH] tests: tail-c.sh: avoid failure on Linux kernels <= 2

tests/tail/tail-c.sh: Exclude older kernels from timeout failure.
---
 tests/tail/tail-c.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/tail/tail-c.sh b/tests/tail/tail-c.sh
index 75392df23..23519918b 100755
--- a/tests/tail/tail-c.sh
+++ b/tests/tail/tail-c.sh
@@ -48,7 +48,15 @@ if test -r /dev/urandom; then
       0) ;;
       # Solaris 11 allows negative seek but then gives EINVAL on read
       1) grep 'Invalid argument' err || fail=1;;
-      *) fail=1;;
+      *)
+        case $host_triplet in
+          *linux-gnu*)
+            case "$(uname -r)" in
+              [12].*) ;;  # Older Linux versions timeout
+              *) fail=1 ;;
+            esac ;;
+          *) fail=1 ;;
+        esac ;;
   esac
 fi
 
-- 
2.47.1

Reply via email to