]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: tests/tail/wait.sh: protect against hang
authorPádraig Brady <P@draigBrady.com>
Thu, 18 Sep 2025 16:47:45 +0000 (17:47 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 18 Sep 2025 16:47:45 +0000 (17:47 +0100)
* tests/tail/wait.sh: This test was seen to hang occasionally
on an Alpine Linux 3.20 system, so protect the tail(1) call
with `timeout 60` as done in similar tests.
Reported by Bruno Haible.

tests/tail/wait.sh

index 7530ef40cc520bdc76ce19a8dc031e39593c9f60..87fe7540fce3ade5f2a4516fe997c1816b13eb11 100755 (executable)
@@ -67,7 +67,7 @@ if test "$HAVE_INOTIFY" && test -z "$mode" && is_local_dir_ .; then
     local delay="$1"
 
     > k && > tail.out && > tail.err || framework_failure_
-    tail $fastpoll -F $mode k >tail.out 2>tail.err & pid=$!
+    timeout 60 tail $fastpoll -F $mode k >tail.out 2>tail.err & pid=$!
     sleep $delay
     mv k l
     sleep $delay