]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: test for just-fixed tail --pid bug
authorJim Meyering <meyering@redhat.com>
Thu, 30 Jul 2009 08:27:51 +0000 (10:27 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 30 Jul 2009 08:27:51 +0000 (10:27 +0200)
* tests/tail-2/pid: Ensure tail exits successfully when PID dies.

tests/tail-2/pid

index 9d33e4f2f0b7a5844c50a8e4af16b40bbffc8686..446c6dbe38557ead27f99399513dab755b980188 100755 (executable)
@@ -65,4 +65,9 @@ if test -n "$state"; then
   kill $pid
 fi
 
+# 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
+
 Exit $fail