]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: tail/overlay-headers.sh: protect against hang
authorPádraig Brady <P@draigBrady.com>
Thu, 18 Sep 2025 18:04:57 +0000 (19:04 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 18 Sep 2025 18:04:57 +0000 (19:04 +0100)
* tests/tail/overlay-headers.sh: Protect tail invocation with timeout,
and extend the possible running period to 60 seconds like other tests.
Reported by Brudno Haible on T2SDE Linux/alpha

tests/tail/overlay-headers.sh

index 448251b225d60631d6ee19a366683d93d6027fa8..7b61cbcf86d629eb2de37e7f25a7fca363039b2a 100755 (executable)
@@ -50,9 +50,9 @@ echo start > file1 || framework_failure_
 echo start > file2 || framework_failure_
 
 # Use this as a way to gracefully terminate tail
-env sleep 20 & sleep=$!
+env sleep 60 & sleep=$!
 
-tail $fastpoll --pid=$sleep -f file1 file2 > out & pid=$!
+timeout 60 tail $fastpoll --pid=$sleep -f file1 file2 > out & pid=$!
 
 kill -0 $pid || fail=1