aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/killall.test12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/killall.test b/tests/killall.test
index 7e171d46..8302a574 100644
--- a/tests/killall.test
+++ b/tests/killall.test
@@ -11,10 +11,14 @@ done" > toybox.killall.test.script
chmod a+x toybox.killall.test.script
cp toybox.killall.test.script toybox.test
-./toybox.test &
-testing "short name" "killall toybox.test && echo killed ; pgrep -l toybox.test || echo really" "killed\nreally\n" "" ""
+tst=toybox.test
+./$tst &
+testing "short name" "killall $tst && echo killed ; sleep 0.1 ; \
+ pgrep -l $tst || echo really" "killed\nreally\n" "" ""
-./toybox.killall.test.script &
-testing "long name" "killall toybox.killall.test.script && echo killed ; pgrep -l toybox.killall.test.script || echo really" "killed\nreally\n" "" ""
+tst=toybox.killall.test.script
+./$tst &
+testing "long name" "killall $tst && echo killed ; sleep 0.1 ; \
+ pgrep -l $tst || echo really" "killed\nreally\n" "" ""
rm -f toybox.killall.test.script toybox.test