tests: tail-2/pid: use a 3-second timeout, not 1
authorJim Meyering <meyering@redhat.com>
Wed, 30 Sep 2009 21:28:13 +0000 (23:28 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 30 Sep 2009 21:28:13 +0000 (23:28 +0200)
* 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>

tests/tail-2/pid

index aaf2e01..90f1684 100755 (executable)
@@ -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