Some tests use killall command, but killall may not exist.
We should check whether killall exists or not.
Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
_require_scratch
_require_scratch_shutdown
+_require_command "$KILLALL_PROG" killall
rm -f $seqres.full
# let this run for a while
$FSSTRESS_PROG -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
sleep $SLEEP_TIME
-killall -q $FSSTRESS_PROG
+$KILLALL_PROG -q $FSSTRESS_PROG
wait
sync
_scratch_unmount
# now shutdown and unmount
sleep 5
$here/src/godown $load_dir
-killall -q $FSSTRESS_PROG
+$KILLALL_PROG -q $FSSTRESS_PROG
wait
# for some reason fsstress processes manage to live on beyond the wait?
sleep $enospc_time
done
- killall $tmp.fsstress.bin
+ $KILLALL_PROG $tmp.fsstress.bin
wait $pid
}
_require_quota
_require_user
_require_scratch
+_require_command "$KILLALL_PROG" killall
rm -f $seqres.full
_scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
_supported_fs generic
_supported_os Linux
_require_test
+_require_command "$KILLALL_PROG" killall
dmesg -c > /dev/null
{
src/t_readdir_1 $SEQ_DIR &
sleep $RUN_TIME
- killall t_readdir_1
+ $KILLALL_PROG t_readdir_1
check_kernel_bug
if [ $? -ne 0 ]; then
_fatal "kernel bug detected, check dmesg for more infomation."
{
src/t_readdir_2 $SEQ_DIR &
sleep $RUN_TIME
- killall t_readdir_2
+ $KILLALL_PROG t_readdir_2
check_kernel_bug
if [ $? -ne 0 ]; then
_fatal "kernel bug detected, check dmesg for more infomation."
_cleanup()
{
- killall -9 fsstress 2>/dev/null
+ $KILLALL_PROG -9 fsstress 2>/dev/null
wait
cd /
_scratch_unmount 2>/dev/null
_require_scratch
_require_freeze
_require_xfs_sysfs $(_short_dev $TEST_DEV)/log
+_require_command "$KILLALL_PROG" killall
rm -f $seqres.full
iters=$((iters - 1))
done
-killall $FSSTRESS_PROG
+$KILLALL_PROG $FSSTRESS_PROG
wait
_scratch_unmount
_cleanup()
{
- killall -9 fsstress 2>/dev/null
+ $KILLALL_PROG -9 fsstress 2>/dev/null
wait
cd /
_scratch_unmount 2>/dev/null
_require_scratch
_require_xfs_mkfs_finobt
_require_xfs_finobt
+_require_command "$KILLALL_PROG" killall
rm -f $seqres.full
_rand_replace $SCRATCH_MNT/dir$((i+1)) $COUNT
done
-killall fsstress
+$KILLALL_PROG fsstress
wait
# clean out the competing fsstress allocations, then everything else
{
cd /
rm -f $tmp.*
- killall -9 $FSSTRESS_PROG > /dev/null 2>&1
+ $KILLALL_PROG -9 $FSSTRESS_PROG > /dev/null 2>&1
_scratch_unmount > /dev/null 2>&1
}
_require_scratch
_require_dm_target flakey
_require_xfs_sysfs debug/log_recovery_delay
+_require_command "$KILLALL_PROG" killall
echo "Silence is golden."
$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT > /dev/null 2>&1 &
sleep 5
src/godown -f $SCRATCH_MNT
-killall -q $FSSTRESS_PROG
+$KILLALL_PROG -q $FSSTRESS_PROG
wait
_scratch_unmount
{
cd /
rm -f $tmp.*
- killall -9 $XFS_REPAIR_PROG > /dev/null 2>&1
+ $KILLALL_PROG -9 $XFS_REPAIR_PROG > /dev/null 2>&1
wait > /dev/null 2>&1
}
_supported_fs xfs
_supported_os Linux
_require_scratch_nocheck
+_require_command "$KILLALL_PROG" killall
_scratch_mkfs | _filter_mkfs > /dev/null 2> $tmp.mkfs || _fail "mkfs failed"
{
cd /
rm -f $tmp.*
- killall -9 fsstress > /dev/null 2>&1
+ $KILLALL_PROG -9 fsstress > /dev/null 2>&1
wait > /dev/null 2>&1
}
_supported_os Linux
_require_scratch
_require_v2log
+_require_command "$KILLALL_PROG" killall
echo "Silence is golden."
{
cd /
rm -f $tmp.*
- killall -9 fsstress > /dev/null 2>&1
+ $KILLALL_PROG -9 fsstress > /dev/null 2>&1
wait > /dev/null 2>&1
}
_supported_os Linux
_require_xfs_sysfs $(_short_dev $TEST_DEV)/log/log_badcrc_factor
_require_scratch
+_require_command "$KILLALL_PROG" killall
echo "Silence is golden."
_supported_fs xfs
_supported_os Linux
-[ -n "$KILLALL_PROG" ] || _notrun "killall executable not found"
+_require_command "$KILLALL_PROG" killall
_require_scratch
_scratch_mkfs_xfs >/dev/null 2>&1
_require_scratch
_require_freeze
+_require_command "$KILLALL_PROG" killall
rm -f $seqres.full
_scratch_mkfs_xfs -d agcount=16,su=256k,sw=12 -l su=256k,size=5120b >/dev/null 2>&1
let LOOP=$LOOP-1
done
echo "Test done" | tee -a $seqres.full
-killall -q $FSSTRESS_PROG
+$KILLALL_PROG -q $FSSTRESS_PROG
wait
status=0
_require_xfs_quota
_require_xfs_mkfs_crc
_require_xfs_crc
+_require_command "$KILLALL_PROG" killall
rm -f $seqres.full
_scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
sleep 10
xfs_quota -x -c "off -$type" $SCRATCH_DEV
sleep 5
- killall -q $FSSTRESS_PROG
+ $KILLALL_PROG -q $FSSTRESS_PROG
wait
}