diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-11-09 18:50:21 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-11-10 12:52:50 +0000 |
commit | 41a4c714e49e26f290e0c2e27a61d9086e633b52 (patch) | |
tree | fec580665d88706d3cd5d98e3cedffcf48ef1d1a /tests/misc/timeout-group.sh | |
parent | eafaa2e88f7af16756142a31ab63d032b31395e3 (diff) | |
download | coreutils-41a4c714e49e26f290e0c2e27a61d9086e633b52.tar.xz |
tests: cleanup trapping of signal names
A side effect of this cleanup is we no longer
depend on our own kill command being built.
* init.cfg (require_trap_signame_): A new function to verify
that the shell supports specifying traps by signal name.
(require_kill_group_): A new function to ensure the shell
supports sending a signal to a group.
* tests/du/move-dir-while-traversing.sh: Ensure trap supports
signal names.
* tests/misc/stty-invalid.sh: Likewise.
* tests/misc/stty-pairs.sh: Likewise.
* tests/misc/stty-row-col.sh: Likewise.
* tests/misc/stty.sh: Likewise.
* tests/misc/sort-compress.sh: Likewise. Also simplify trap call.
* tests/install/trap.sh: Likewise.
* tests/misc/timeout.sh: Likewise.
* tests/dd/stats.sh: Likewise. Also use default kill command.
* tests/misc/timeout-group.sh: Likewise.
Diffstat (limited to 'tests/misc/timeout-group.sh')
-rwxr-xr-x | tests/misc/timeout-group.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/misc/timeout-group.sh b/tests/misc/timeout-group.sh index d47f0dc83..029048f40 100755 --- a/tests/misc/timeout-group.sh +++ b/tests/misc/timeout-group.sh @@ -18,6 +18,8 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ timeout +require_trap_signame_ +require_kill_group_ # construct a program group hierarchy as follows: # timeout-group - foreground group @@ -66,8 +68,7 @@ setsid ./group.sh & pid=$! # Wait 6.3s for timeout.cmd to start retry_delay_ check_timeout_cmd_running .1 6 || fail=1 # Simulate a Ctrl-C to the group to test timely exit -# Note dash doesn't support signalling groups (a leading -) -env kill -INT -- -$pid +kill -INT -- -$pid wait test -e int.received || fail=1 |