diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-17 12:47:22 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-17 12:52:55 -0700 |
commit | 7e576fc40357fa9c5d702b2435aca88884d906f1 (patch) | |
tree | 51797345ae3e0cd7ac6f762ce62c090a469a0c1c /tests/misc | |
parent | 240a63375697be8f3ff0fb97aea35ef2fecf1f4d (diff) | |
download | coreutils-7e576fc40357fa9c5d702b2435aca88884d906f1.tar.xz |
timeout: add regression test (Bug#9098)
* tests/misc/timeout: Check that 'timeout' is not confused when
starting off with a child.
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/timeout | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/misc/timeout b/tests/misc/timeout index 7506e7cf9..04465e116 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 |