shell/hush_test/hush-misc/sig_exitcode.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| exec 2>&1 |
| |
| $THIS_SH -c 'kill -9 $$' |
shell/hush_test/hush-misc/wait1.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| sleep 2 & sleep 1 & wait $! |
| echo $? |
| jobs |
shell/hush_test/hush-misc/wait2.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| sleep 3 & sleep 2 & sleep 1 |
| wait $! |
| echo $? |
shell/hush_test/hush-misc/wait3.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| sleep 2 & (sleep 1;exit 3) & wait $! |
| echo $? |
| jobs |
shell/hush_test/hush-misc/wait4.tests+3 -0
| @@ -1,2 +1,5 @@ |
| + | # If job control is disabled, skip the test |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| sleep 1 | (sleep 1;exit 3) & wait %1 |
| echo Three:$? |
shell/hush_test/hush-misc/wait5.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| sleep 0 | (sleep 0;exit 3) & |
| sleep 1 |
| echo Zero:$? |
shell/hush_test/hush-misc/wait6.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| # In bash, "wait $!" extracts correct exitcode even if bg task has already exited |
| # It prints 0, then 3: |
| (sleep 0; exit 3) & sleep 1 |
shell/hush_test/hush-signals/catch.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test ("User defined signal 2" text not emitted) |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| # avoid ugly warnings about signals not being caught |
| trap ":" USR1 USR2 |
| |
shell/hush_test/hush-signals/signal1.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| trap "echo got signal" USR1 |
| |
| for try in 1 2 3 4 5; do |
shell/hush_test/hush-signals/signal8.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| "$THIS_SH" -c ' |
| exit_func() { |
| echo "Removing traps" |
shell/hush_test/hush-signals/signal_read2.tests+3 -0
| @@ -1,3 +1,6 @@ |
| + | # If job control is disabled, skip the test ("Hangup" not emitted) |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| $THIS_SH -c ' |
| (sleep 1; kill -HUP $$) & |
| while true; do |
shell/hush_test/hush-signals/subshell.tests+3 -0
| @@ -1,5 +1,8 @@ |
| # Non-empty traps should be reset in subshell |
| |
| + | # If job control is disabled, skip the test ("Terminated" text not emitted) |
| + | test "`type jobs`" = "jobs is a shell builtin" || exit 77 |
| + | |
| # HUP is special in interactive shells |
| trap '' HUP |
| # QUIT is always special |
shell/hush_test/run-all+5 -2
| @@ -67,9 +67,12 @@ do_test() |
| # echo Running test: "$x" |
| echo -n "$1/$x:" |
| ( |
| - | "$THIS_SH" "./$x" 2>&1 | \ |
| - | grep -va "^hush: using fallback suid method$" >"$name.xx" |
| + | "$THIS_SH" "./$x" >"$name.xx" 2>&1 |
| r=$? |
| + | # filter !FEATURE_SUID_CONFIG_QUIET message |
| + | sed -i \ |
| + | -e "/^hush: using fallback suid method$/d" \ |
| + | "$name.xx" |
| # filter C library differences |
| sed -i \ |
| -e "/: invalid option /s:'::g" \ |