mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: Check the file system consistency on SCRATCH_DEV
There are about 198 tests which requires scratch_dev, but does not check the file system consistency afterwards. Xfstests infrastructure does not do it automatically, so fix it by running _check_scratch_fs() after each test that _require_scratch. Also remove all the _check_scratch_fs() calls that are not actually needed and will be covered by the check script. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
ddd55d55a7
commit
ab1d756fe1
Regular → Executable
@@ -171,7 +171,6 @@ _workout()
|
||||
# perform mount/umount, after that all errors should be fixed
|
||||
run_check _scratch_mount
|
||||
run_check _scratch_unmount
|
||||
_check_scratch_fs
|
||||
}
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
Regular → Executable
@@ -101,7 +101,6 @@ while [ $i -le $loop ]; do
|
||||
let i=$i+1
|
||||
done
|
||||
_scratch_unmount
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -130,6 +130,4 @@ rm $tmp.running
|
||||
# wait for fsstresses to finish
|
||||
wait
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
exit 1
|
||||
|
||||
@@ -77,7 +77,6 @@ FSSTRESS_ARGS=`_scale_fsstress_args -p 2 -n 2000 $FSSTRESS_AVOID`
|
||||
echo "run fsstress with args: $FSSTRESS_ARGS" >>$seqres.full
|
||||
$FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full
|
||||
_lets_get_pidst
|
||||
_check_scratch_fs
|
||||
|
||||
echo "*** done"
|
||||
status=0
|
||||
|
||||
@@ -84,7 +84,6 @@ workout()
|
||||
# -w ensures that the only ops are ones which cause write I/O
|
||||
FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID`
|
||||
$FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full
|
||||
_check_scratch_fs
|
||||
}
|
||||
|
||||
echo "*** test out-of-space handling for random write operations"
|
||||
|
||||
@@ -244,13 +244,6 @@ ${ATTR_PROG} -R -l foo
|
||||
|
||||
cd /
|
||||
|
||||
# Check the filesystem
|
||||
_check_scratch_fs
|
||||
|
||||
# optional stuff if your test has verbose output to help resolve problems
|
||||
#echo
|
||||
#echo "If failure, check $seqres.full (this) and $seqres.full.ok (reference)"
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -328,13 +328,6 @@ chacl $acl3 largeaclfile
|
||||
_acl_list largeaclfile | _filter_aces_notypes
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
if [ "$FSTYP" == "udf" ]; then
|
||||
cd /
|
||||
umount $TARGET_DIR
|
||||
# Check the filesystem
|
||||
_check_scratch_fs
|
||||
fi
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -80,7 +80,6 @@ ls -R -l ${TEST_DIR}${POPULATED_DIR} >>$seqres.full 2>&1
|
||||
diff -qr $POPULATED_DIR ${TEST_DIR}${POPULATED_DIR}
|
||||
|
||||
cd /
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -108,8 +108,6 @@ cd /
|
||||
umount $SCRATCH_MNT
|
||||
echo
|
||||
echo Checking filesystem
|
||||
_check_scratch_fs
|
||||
_scratch_mount
|
||||
|
||||
status=$?
|
||||
exit
|
||||
|
||||
@@ -76,7 +76,4 @@ fi
|
||||
|
||||
umount $SCRATCH_DEV
|
||||
|
||||
_check_test_fs
|
||||
_check_scratch_fs
|
||||
|
||||
exit
|
||||
|
||||
@@ -83,8 +83,6 @@ for i in `seq 1 $files`; do
|
||||
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i
|
||||
done
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
# success, all done
|
||||
echo "*** done"
|
||||
status=0
|
||||
|
||||
+1
-2
@@ -79,6 +79,5 @@ if ! _scratch_unmount; then
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
exit
|
||||
|
||||
+1
-2
@@ -104,6 +104,5 @@ if ! _scratch_unmount; then
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
exit
|
||||
|
||||
+1
-2
@@ -138,6 +138,5 @@ _scratch_mount
|
||||
|
||||
_do_workload
|
||||
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
exit
|
||||
|
||||
+1
-2
@@ -152,6 +152,5 @@ if ! _scratch_unmount; then
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
exit
|
||||
|
||||
+1
-2
@@ -155,6 +155,5 @@ if ! _scratch_unmount; then
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -67,6 +67,5 @@ echo "Silence is golden"
|
||||
$XFS_IO_PROG -f -c "falloc 0 6g" $SCRATCH_MNT/testfile.$seq >>$seqres.full 2>&1
|
||||
|
||||
_scratch_unmount
|
||||
_check_scratch_fs
|
||||
status=0
|
||||
exit
|
||||
|
||||
Regular → Executable
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user