# 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`
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
# 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