diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-02-26 09:05:52 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-02-26 09:05:52 +0100 |
commit | 9aa751b08ab03d6396f86c3df77937a19687981b (patch) | |
tree | df06300822ac071de0b913c6168f65cf8ffbe3eb /shell/hush_test | |
parent | 1555895b4af44ce47fe2365aec82e8e67c685f08 (diff) | |
download | busybox-w32-9aa751b08ab03d6396f86c3df77937a19687981b.tar.gz busybox-w32-9aa751b08ab03d6396f86c3df77937a19687981b.tar.bz2 busybox-w32-9aa751b08ab03d6396f86c3df77937a19687981b.zip |
shells: fix exitcode_trapN tests to avoid races
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rwxr-xr-x | shell/hush_test/hush-misc/exitcode_trap2.tests | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/exitcode_trap6.tests | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/shell/hush_test/hush-misc/exitcode_trap2.tests b/shell/hush_test/hush-misc/exitcode_trap2.tests index f259774bf..aff6d5187 100755 --- a/shell/hush_test/hush-misc/exitcode_trap2.tests +++ b/shell/hush_test/hush-misc/exitcode_trap2.tests | |||
@@ -3,7 +3,6 @@ | |||
3 | $THIS_SH -c ' | 3 | $THIS_SH -c ' |
4 | trap "false;exit" term | 4 | trap "false;exit" term |
5 | kill $$ & | 5 | kill $$ & |
6 | (exit 42) | 6 | (sleep 1; exit 42) |
7 | wait | ||
8 | ' | 7 | ' |
9 | echo 42:$? | 8 | echo 42:$? |
diff --git a/shell/hush_test/hush-misc/exitcode_trap6.tests b/shell/hush_test/hush-misc/exitcode_trap6.tests index 15fb99d2d..59a07fc91 100755 --- a/shell/hush_test/hush-misc/exitcode_trap6.tests +++ b/shell/hush_test/hush-misc/exitcode_trap6.tests | |||
@@ -5,7 +5,6 @@ $THIS_SH -c ' | |||
5 | trap "echo INT" int | 5 | trap "echo INT" int |
6 | trap "kill -int $$;exit" term | 6 | trap "kill -int $$;exit" term |
7 | kill $$ & | 7 | kill $$ & |
8 | (exit 42) | 8 | (sleep 1; exit 42) |
9 | wait | ||
10 | ' | 9 | ' |
11 | echo 42:$? | 10 | echo 42:$? |