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
@@ -626,6 +626,8 @@ for section in $HOST_OPTIONS_SECTIONS; do
|
||||
try="$try $seqnum"
|
||||
n_try=`expr $n_try + 1`
|
||||
_check_test_fs
|
||||
test -f ${RESULT_DIR}/require_scratch && _check_scratch_fs
|
||||
rm -f ${RESULT_DIR}/require_scratch
|
||||
fi
|
||||
|
||||
seq="after_$seqnum"
|
||||
|
||||
@@ -986,6 +986,7 @@ _require_scratch()
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
touch ${RESULT_DIR}/require_scratch
|
||||
}
|
||||
|
||||
# this test needs a logdev
|
||||
|
||||
@@ -77,7 +77,6 @@ _scratch_mkfs > /dev/null 2>&1
|
||||
_scratch_mount "-o compress-force=no"
|
||||
__workout
|
||||
_scratch_unmount
|
||||
_check_scratch_fs
|
||||
|
||||
echo "*** done"
|
||||
status=0 ; exit
|
||||
|
||||
@@ -143,7 +143,5 @@ run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1
|
||||
_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
|
||||
run_check $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -123,7 +123,5 @@ run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1
|
||||
_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
|
||||
run_check $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -370,7 +370,5 @@ run_check $FSSUM_PROG -r $tmp/1.fssum $SCRATCH_MNT/mysnap1
|
||||
_run_btrfs_util_prog receive $SCRATCH_MNT -f $tmp/2.snap
|
||||
run_check $FSSUM_PROG -r $tmp/2.fssum $SCRATCH_MNT/mysnap2
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -298,7 +298,5 @@ echo "File digests in the replica filesystem:"
|
||||
md5sum $SCRATCH_MNT/mysnap1/foo | _filter_scratch
|
||||
md5sum $SCRATCH_MNT/mysnap2/foo | _filter_scratch
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -116,7 +116,5 @@ $XFS_IO_PROG -r -c "seek -r -a 0" $SCRATCH_MNT/mysnap2/foo
|
||||
# the file's size.
|
||||
$XFS_IO_PROG -r -c "fiemap -v" $SCRATCH_MNT/mysnap2/foo | _filter_fiemap
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -214,7 +214,5 @@ $BTRFS_UTIL_PROG property get $SCRATCH_MNT/sv1 compression
|
||||
touch $SCRATCH_MNT/sv1/file2
|
||||
$BTRFS_UTIL_PROG property get $SCRATCH_MNT/sv1/file2 compression
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -103,7 +103,5 @@ _scratch_mount
|
||||
_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
|
||||
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -79,7 +79,5 @@ _scratch_mount
|
||||
_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/1.snap
|
||||
run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -103,7 +103,5 @@ run_check $FSSUM_PROG -r $send_files_dir/1.fssum $SCRATCH_MNT/mysnap1
|
||||
_run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
|
||||
run_check $FSSUM_PROG -r $send_files_dir/2.fssum $SCRATCH_MNT/mysnap2
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -103,7 +103,5 @@ _run_btrfs_util_prog receive $SCRATCH_MNT -f $send_files_dir/2.snap
|
||||
[ -e $SCRATCH_MNT/testdir ] && \
|
||||
echo "Directory testdir was supposed to be deleted after incremental send!"
|
||||
|
||||
_check_scratch_fs
|
||||
|
||||
status=0
|
||||
exit
|
||||
|
||||
+1
-2
@@ -62,6 +62,5 @@ if ! _scratch_unmount; then
|
||||
exit
|
||||
fi
|
||||
echo "Check filesystem"
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
exit
|
||||
|
||||
+1
-2
@@ -121,5 +121,4 @@ if ! _scratch_unmount; then
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
|
||||
+1
-2
@@ -137,6 +137,5 @@ if ! _scratch_unmount; then
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
exit
|
||||
|
||||
+1
-2
@@ -147,6 +147,5 @@ if ! _scratch_unmount; then
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
exit
|
||||
|
||||
+1
-2
@@ -124,6 +124,5 @@ if ! _scratch_unmount; then
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
_check_scratch_fs
|
||||
status=$?
|
||||
status=0
|
||||
exit
|
||||
|
||||
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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user