bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no feedback on snapshot? coreutils-7.5 coming soon


From: Pádraig Brady
Subject: Re: no feedback on snapshot? coreutils-7.5 coming soon
Date: Wed, 12 Aug 2009 20:22:44 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

While I'm at it here's a patch to
improve that test.

cheers,
Pádraig.
>From c720e160a96b813a7c24c5ac8a9a9a37590f4190 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
Date: Wed, 12 Aug 2009 19:46:27 +0100
Subject: [PATCH] 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
instead of failing in the unlikely case were the pid
required to be missing pid is present, skip the test.
---
 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 b290f01..86e3d60 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
-- 
1.6.2.5


reply via email to

[Prev in Thread] Current Thread [Next in Thread]