If you ctrl-c generic/019, it leaves fsstress processes running.
Kill them in the cleanup function so that they don't have to be
manually killed after interrupting the test.
While touching the _cleanup() function, make it do everything that
the generic _cleanup function it overrides does and fix the
indenting.
[Eryu: unset fs_pid and fio_pid after wait]
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
# Override the default cleanup function.
_cleanup()
{
- disallow_fail_make_request
- rm -f $tmp.*
+ kill $fs_pid $fio_pid &> /dev/null
+ disallow_fail_make_request
+ cd /
+ rm -r -f $tmp.*
}
RUN_TIME=$((20+10*$TIME_FACTOR))
kill $fs_pid &> /dev/null
wait $fs_pid
wait $fio_pid
+ unset $fs_pid
+ unset $fio_pid
# We expect that broken FS still can be umounted
run_check _scratch_unmount