mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fstests: _fail test by default when _scratch_mount fails
Previously _scratch_mount didn't check the mount status and most tests continue to run even if the mount failed (unless test checks for the mount status explicitly). This would result in running tests on the underlying filesystem (usually rootfs) and implicit test failures, and such failures can be annoying and are usually hard to debug. Now _fail test by default if _scratch_mount failed and introduce _try_scratch_mount for tests that need to check mount results themselves. Suggested-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
+1
-1
@@ -102,7 +102,7 @@ _scratch_unmount
|
||||
# Convert non-extent & extent data to btrfs, mount it, verify the data
|
||||
$BTRFS_CONVERT_PROG $SCRATCH_DEV >> $seqres.full 2>&1 || \
|
||||
_fail "btrfs-convert failed"
|
||||
_scratch_mount || _fail "Could not mount new btrfs fs"
|
||||
_try_scratch_mount || _fail "Could not mount new btrfs fs"
|
||||
|
||||
# Compute md5 for converted files.
|
||||
find "$SCRATCH_MNT/ext3_ext4_data" -type f -fprint "$BTRFS_MD5SUM"
|
||||
|
||||
Reference in New Issue
Block a user