From: Paul Eggert Date: Sun, 17 Jul 2011 19:47:22 +0000 (-0700) Subject: timeout: add regression test (Bug#9098) X-Git-Tag: v8.13~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e576fc40357fa9c5d702b2435aca88884d906f1;p=thirdparty%2Fcoreutils.git timeout: add regression test (Bug#9098) * tests/misc/timeout: Check that 'timeout' is not confused when starting off with a child. --- diff --git a/tests/misc/timeout b/tests/misc/timeout index 7506e7cf9e..04465e1168 100755 --- a/tests/misc/timeout +++ b/tests/misc/timeout @@ -51,4 +51,9 @@ test $? = 124 && fail=1 exec timeout 10 true ) || fail=1 +# Don't be confused when starting off with a child (Bug#9098). +out=$(sleep 1 & exec timeout 2 sh -c 'sleep 3; echo foo') +status=$? +test "$out" = "" && test $status = 124 || fail=1 + Exit $fail