aboutsummaryrefslogtreecommitdiff
path: root/tests/pkill.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pkill.test')
-rwxr-xr-xtests/pkill.test10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/pkill.test b/tests/pkill.test
index 0bea32ab..3f20d260 100755
--- a/tests/pkill.test
+++ b/tests/pkill.test
@@ -92,10 +92,16 @@ testing "-P parent_prodId pattern" "pkill -P $proc_p yes && sleep 1 &&
killall yes >/dev/null 2>&1
yes >/dev/null &
-proc=$!
-proc_parent=`cat /proc/${proc}/stat | awk '{ print $4 }'`
sleep 1
testing "-9 pattern" "pkill -9 yes && sleep 1 &&
(pgrep yes || echo 'yes')" "yes\n" "" ""
killall yes >/dev/null 2>&1
+yes >/dev/null &
+sleep 1
+testing "return success" "pkill yes && echo success" "success\n" "" ""
+killall yes >/dev/null 2>&1
+
+testing "return failure" "pkill almost-certainly-not || echo failure" \
+ "failure\n" "" ""
+