shells: fix exitcode_trapN tests to avoid races

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/shell/ash_test/ash-misc/exitcode_trap2.tests b/shell/ash_test/ash-misc/exitcode_trap2.tests
index f259774..aff6d51 100755
--- a/shell/ash_test/ash-misc/exitcode_trap2.tests
+++ b/shell/ash_test/ash-misc/exitcode_trap2.tests
@@ -3,7 +3,6 @@
 $THIS_SH -c '
  trap "false;exit" term
  kill $$ &
- (exit 42)
- wait
+ (sleep 1; exit 42)
 '
 echo 42:$?
diff --git a/shell/ash_test/ash-misc/exitcode_trap6.tests b/shell/ash_test/ash-misc/exitcode_trap6.tests
index 15fb99d..59a07fc 100755
--- a/shell/ash_test/ash-misc/exitcode_trap6.tests
+++ b/shell/ash_test/ash-misc/exitcode_trap6.tests
@@ -5,7 +5,6 @@
  trap "echo INT" int
  trap "kill -int $$;exit" term
  kill $$ &
- (exit 42)
- wait
+ (sleep 1; exit 42)
 '
 echo 42:$?
diff --git a/shell/hush_test/hush-misc/exitcode_trap2.tests b/shell/hush_test/hush-misc/exitcode_trap2.tests
index f259774..aff6d51 100755
--- a/shell/hush_test/hush-misc/exitcode_trap2.tests
+++ b/shell/hush_test/hush-misc/exitcode_trap2.tests
@@ -3,7 +3,6 @@
 $THIS_SH -c '
  trap "false;exit" term
  kill $$ &
- (exit 42)
- wait
+ (sleep 1; exit 42)
 '
 echo 42:$?
diff --git a/shell/hush_test/hush-misc/exitcode_trap6.tests b/shell/hush_test/hush-misc/exitcode_trap6.tests
index 15fb99d..59a07fc 100755
--- a/shell/hush_test/hush-misc/exitcode_trap6.tests
+++ b/shell/hush_test/hush-misc/exitcode_trap6.tests
@@ -5,7 +5,6 @@
  trap "echo INT" int
  trap "kill -int $$;exit" term
  kill $$ &
- (exit 42)
- wait
+ (sleep 1; exit 42)
 '
 echo 42:$?