xfstests: remove fio config files after finished test

After finished test, temporarily fio config file should be removed.
This commit tries to fix this problem in the following test cases:
  - generic/299-300
  - ext4/301-304
  - shared/305

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
Zheng Liu
2013-05-14 08:35:44 -05:00
committed by Rich Johnston
parent ef6b444461
commit 05aab5cf04
7 changed files with 36 additions and 28 deletions
+6 -4
View File
@@ -29,6 +29,7 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
fio_config=$tmp.fio
status=1 # failure is the default!
# get standard environment, filters and checks
@@ -79,6 +80,7 @@ _cleanup()
{
poweron_scratch_dev
disallow_fail_make_request
rm -f $tmp.*
}
trap "_cleanup; exit \$status" 1 2 3 15
@@ -87,7 +89,7 @@ NUM_JOBS=$((4*LOAD_FACTOR))
BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
FILE_SIZE=$((BLK_DEV_SIZE * 512))
cat >$tmp-$seq.fio <<EOF
cat >$fio_config <<EOF
###########
# $seq test's fio activity
# Filenames derived from jobsname and jobid like follows:
@@ -127,7 +129,7 @@ time_based
EOF
_require_fio $tmp-$seq.fio
_require_fio $fio_config
# Disable all sync operations to get higher load
FSSTRESS_AVOID="$FSSTRESS_AVOID -ffsync=0 -fsync=0 -ffdatasync=0 -f setattr=1"
@@ -143,8 +145,8 @@ _workout()
$FSSTRESS_PROG $args > /dev/null 2>&1 &
fs_pid=$!
echo "Start fio.."
cat $tmp-$seq.fio >> $seqres.full
$FIO_PROG $tmp-$seq.fio >> $seqres.full 2>&1 &
cat $fio_config >> $seqres.full
$FIO_PROG $fio_config >> $seqres.full 2>&1 &
fio_pid=$!
# Let's it work for awhile, and force device failure