diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-08-12 19:46:27 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-08-12 22:03:33 +0100 |
commit | ab274c428dbdb36b87c37b0045e8e6dc3585f04a (patch) | |
tree | 99b0b8210f3c103999a66add57e3498dbea77b0b /tests | |
parent | e32320de66f0587f288803330ea5e09341297153 (diff) | |
download | coreutils-ab274c428dbdb36b87c37b0045e8e6dc3585f04a.tar.xz |
tests: improve one of the tail --pid tests
* tests/tail-2/pid: Speed up the test by specifying a
timeout of 100ms rather than the default 1s. Also
skip the test instead of failing in the unlikely case
were the pid required to be missing pid is present.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tail-2/pid | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/tail-2/pid b/tests/tail-2/pid index b290f012c..86e3d60c0 100755 --- a/tests/tail-2/pid +++ b/tests/tail-2/pid @@ -66,9 +66,12 @@ if test -n "$state"; then fi # Ensure that tail --pid=PID exits successfully when PID is dead. -# Use an unlikely-to-be-live PID: 2^31-1 +# Use an unlikely-to-be-live PID getlimits_ -tail --pid=$INT_MAX -f /dev/null || fail=1 +timeout 1 tail -s.1 --pid=$PID_T_MAX -f /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 /dev/null --pid=$PID_T_MAX |