aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-12-13 11:47:08 -0800
committerRob Landley <rob@landley.net>2017-12-19 14:49:25 -0600
commit9356adb28dd8d541a67270e202c7bf6f5a67fc82 (patch)
tree89fa4d02ed5205084d8a69f9de37bcd89f330041 /tests
parentbf1f0e357b6b1e7bd677ca41fc04ae3c5c5e6e70 (diff)
downloadtoybox-9356adb28dd8d541a67270e202c7bf6f5a67fc82.tar.gz
killall should kill scripts too.
Found running LTP file system tests on Android. Bug: http://b/70627145
Diffstat (limited to 'tests')
-rw-r--r--tests/killall.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/killall.test b/tests/killall.test
new file mode 100644
index 00000000..100ac7ca
--- /dev/null
+++ b/tests/killall.test
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+[ -f testing.sh ] && . testing.sh
+
+#testing "name" "command" "result" "infile" "stdin"
+
+echo "#!/bin/sh
+yes > /dev/null" > toybox.killall.test.script
+chmod a+x toybox.killall.test.script
+
+./toybox.killall.test.script &
+testing "script" "killall toybox.killall.test.script && echo killed ; pgrep -l toybox.killall.test.script || echo really" "killed\nreally\n" "" ""
+
+rm -f toybox.killall.test.script