@@ -30,6 +30,12 @@ _test_sync()
_sync_fs $TEST_DIR
}
+# Kill only the processes started by this test.
+_pkill()
+{
+ pkill "$@"
+}
+
# Common execution handling for fsstress invocation.
#
# We need per-test fsstress binaries because of the way fsstress forks and
@@ -69,7 +75,7 @@ _kill_fsstress()
if [ -n "$_FSSTRESS_PID" ]; then
# use SIGPIPE to avoid "Killed" messages from bash
echo "killing $_FSSTRESS_BIN" >> $seqres.full
- pkill -PIPE $_FSSTRESS_BIN >> $seqres.full 2>&1
+ _pkill -PIPE $_FSSTRESS_BIN >> $seqres.full 2>&1
_wait_for_fsstress
return $?
fi
@@ -29,7 +29,7 @@ _begin_fstest auto
# Override the default cleanup function.
_cleanup()
{
- pkill -9 $seq.t_readdir > /dev/null 2>&1
+ _pkill -9 $seq.t_readdir > /dev/null 2>&1
wait
rm -rf $TEST_DIR/tmp
rm -f $tmp.*
@@ -83,7 +83,7 @@ _test_read()
{
$TEST_DIR/$seq.t_readdir_1 $SEQ_DIR > /dev/null 2>&1 &
sleep $RUN_TIME
- pkill -PIPE $seq.t_readdir_1
+ _pkill -PIPE $seq.t_readdir_1
wait
check_kernel_bug
@@ -97,7 +97,7 @@ _test_lseek()
$TEST_DIR/$seq.t_readdir_2 $SEQ_DIR > /dev/null 2>&1 &
readdir_pid=$!
sleep $RUN_TIME
- pkill -PIPE $seq.t_readdir_2
+ _pkill -PIPE $seq.t_readdir_2
wait
check_kernel_bug
@@ -40,7 +40,7 @@ function end_test()
# stop duperemove running
if [ -e $dupe_run ]; then
rm -f $dupe_run
- pkill $dedup_bin >/dev/null 2>&1
+ _pkill $dedup_bin >/dev/null 2>&1
wait $dedup_pids
rm -f $dedup_prog
fi