mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-15 03:41:57 +02:00
tests: tail-2/pid: use a 3-second timeout, not 1
* tests/tail-2/pid: When using the timeout program to ensuring that tail -s.1 --pid=$PID_T_MAX does not wait forever, use a timeout longer than 1 second. A 1-second timeout could be too short on a very busy system, and result in a timeout, and hence false-positive failure. 2009-09-30 Jim Meyering <meyering@redhat.com>
This commit is contained in:
@@ -42,13 +42,13 @@ for inotify in ---disable-inotify ''; do
|
||||
|
||||
# Ensure that tail --pid=PID exits successfully when PID is dead.
|
||||
# Use an unlikely-to-be-live PID
|
||||
timeout 1 tail -s.1 --pid=$PID_T_MAX -f $inotify /dev/null
|
||||
timeout 3 tail -s.1 --pid=$PID_T_MAX -f $inotify /dev/null
|
||||
ret=$?
|
||||
test $ret = 124 && skip_test_ "pid $PID_T_MAX present"
|
||||
test $ret = 0 || fail=1
|
||||
|
||||
# Ensure fractional sleep parameter is honored with --pid
|
||||
timeout 1 tail -s.1 -f $inotify /dev/null --pid=$PID_T_MAX
|
||||
timeout 3 tail -s.1 -f $inotify /dev/null --pid=$PID_T_MAX
|
||||
test $? = 124 && fail=1
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user