summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/sort-compress.sh4
-rwxr-xr-xtests/misc/stty-invalid.sh2
-rwxr-xr-xtests/misc/stty-pairs.sh2
-rwxr-xr-xtests/misc/stty-row-col.sh2
-rwxr-xr-xtests/misc/stty.sh2
-rwxr-xr-xtests/misc/timeout-group.sh5
-rwxr-xr-xtests/misc/timeout.sh4
7 files changed, 15 insertions, 6 deletions
diff --git a/tests/misc/sort-compress.sh b/tests/misc/sort-compress.sh
index 584110e12..7cb5df835 100755
--- a/tests/misc/sort-compress.sh
+++ b/tests/misc/sort-compress.sh
@@ -18,6 +18,7 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ sort
+require_trap_signame_
seq -w 2000 > exp || framework_failure_
tac exp > in || framework_failure_
@@ -38,8 +39,7 @@ chmod +x gzip
# Ensure 'sort' is immune to parent's SIGCHLD handler
# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh.
(
- # ash doesn't support "trap '' CHLD"; it knows only signal numbers.
- sig=$(env kill -l CHLD 2>/dev/null) && trap '' $sig
+ trap '' CHLD
# This should force the use of child processes for "compression"
PATH=.:$PATH exec sort -S 1k --compress-program=gzip in > /dev/null
diff --git a/tests/misc/stty-invalid.sh b/tests/misc/stty-invalid.sh
index 881146f65..49c208622 100755
--- a/tests/misc/stty-invalid.sh
+++ b/tests/misc/stty-invalid.sh
@@ -19,6 +19,8 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ stty
require_controlling_input_terminal_
+require_trap_signame_
+
trap '' TTOU # Ignore SIGTTOU
diff --git a/tests/misc/stty-pairs.sh b/tests/misc/stty-pairs.sh
index 129c22f0f..0494343d7 100755
--- a/tests/misc/stty-pairs.sh
+++ b/tests/misc/stty-pairs.sh
@@ -23,6 +23,8 @@ expensive_
# Make sure there's a tty on stdin.
require_controlling_input_terminal_
+require_trap_signame_
+
trap '' TTOU # Ignore SIGTTOU
# Get the reversible settings from stty.c.
diff --git a/tests/misc/stty-row-col.sh b/tests/misc/stty-row-col.sh
index 0616812ee..8c18df661 100755
--- a/tests/misc/stty-row-col.sh
+++ b/tests/misc/stty-row-col.sh
@@ -32,6 +32,8 @@ export LC_ALL
print_ver_ stty
require_controlling_input_terminal_
+require_trap_signame_
+
trap '' TTOU # Ignore SIGTTOU
# Versions of GNU stty from shellutils-1.9.2c and earlier failed
diff --git a/tests/misc/stty.sh b/tests/misc/stty.sh
index 5e39b72e5..217891a1a 100755
--- a/tests/misc/stty.sh
+++ b/tests/misc/stty.sh
@@ -21,6 +21,8 @@
print_ver_ stty
require_controlling_input_terminal_
+require_trap_signame_
+
trap '' TTOU # Ignore SIGTTOU
# Get the reversible settings from stty.c.
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
diff --git a/tests/misc/timeout.sh b/tests/misc/timeout.sh
index 3cebd3302..ec77d61e8 100755
--- a/tests/misc/timeout.sh
+++ b/tests/misc/timeout.sh
@@ -18,6 +18,7 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ timeout
+require_trap_signame_
# no timeout
timeout 10 true || fail=1
@@ -50,8 +51,7 @@ test $? = 124 && fail=1
# Ensure 'timeout' is immune to parent's SIGCHLD handler
# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh.
(
- # ash doesn't support "trap '' CHLD"; it knows only signal numbers.
- sig=$(env kill -l CHLD 2>/dev/null) && trap '' $sig
+ trap '' CHLD
exec timeout 10 true
) || fail=1