]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: tail-c.sh: avoid failure on Linux kernels <= 2
authorPádraig Brady <P@draigBrady.com>
Thu, 16 Jan 2025 21:05:34 +0000 (21:05 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 16 Jan 2025 21:05:34 +0000 (21:05 +0000)
tests/tail/tail-c.sh: Exclude older kernels from timeout failure.

tests/tail/tail-c.sh

index 75392df23eb63c94506449da8d1441a4e078e05b..23519918bb9b6e4be174a7554f52157e9ce81a0b 100755 (executable)
@@ -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