Jim Meyering wrote:
> diff --git a/tests/tail-2/pid b/tests/tail-2/pid
> 
> +# Ensure that tail --pid=PID exits successfully when PID is dead.
> +# Use an unlikely-to-be-live PID: 2^31-1
> +getlimits_
> +tail --pid=$INT_MAX -f /dev/null || fail=1

Probably should use $PID_T_MAX
You could speed up the test with -s.1 also
(after separate fix I'm sending applied).
Also could protect with timeout incase $PID_T_MAX does exist.
So something like:

getlimits_
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

cheers,
Pádraig.

p.s. A lot of these tests could be changed to
using timeout I think. I'll have a look at that
at some stage.


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to