misc: tag all tests that examine crash recovery in a loop
[xfstests-dev.git] / tests / generic / 019
index 32db36fcc9a4d0b7f57d294cf28e450d9acdd9fe..db56dac1ed1e3125e706da694d569531fb994841 100755 (executable)
@@ -7,21 +7,16 @@
 # Run fsstress and fio(dio/aio and mmap) and simulate disk failure
 # check filesystem consistency at the end.
 #
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest aio dangerous enospc rw stress recoveryloop
 
-here=`pwd`
-tmp=/tmp/$$
 fio_config=$tmp.fio
-status=1       # failure is the default!
 
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
 . ./common/filter
 _supported_fs generic
-_supported_os Linux
 _require_scratch
+_require_block_device $SCRATCH_DEV
 _require_fail_make_request
 
 SYSFS_BDEV=`_sysfs_dev $SCRATCH_DEV`
@@ -55,19 +50,21 @@ stop_fail_scratch_dev()
     echo 0 > $SYSFS_BDEV/make-it-fail
 }
 
+# Override the default cleanup function.
 _cleanup()
 {
-    poweron_scratch_dev
     disallow_fail_make_request
     rm -f $tmp.*
 }
-trap "_cleanup; exit \$status" 1 2 3 15
 
 RUN_TIME=$((20+10*$TIME_FACTOR))
 NUM_JOBS=$((4*LOAD_FACTOR))
 BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
 FILE_SIZE=$((BLK_DEV_SIZE * 512))
 
+# Don't fail the test just because fio or fsstress dump cores
+ulimit -c 0
+
 cat >$fio_config <<EOF
 ###########
 # $seq test's fio activity
@@ -156,11 +153,9 @@ _workout()
 
 # real QA test starts here
 
-rm -f $seqres.full
 _scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
 _scratch_mount
 allow_fail_make_request
 _workout
 status=$?
-disallow_fail_make_request
 exit