]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
ext4/044: Fix failure when mount options are incompatible with ext3
authorJan Kara <jack@suse.cz>
Mon, 5 Dec 2022 12:41:44 +0000 (13:41 +0100)
committerZorro Lang <zlang@kernel.org>
Thu, 8 Dec 2022 12:47:30 +0000 (20:47 +0800)
There are some mount options that are incompatible with ext3 filesystem
type. If they are used, this test fails because it tries to remount the
filesystem as ext3. The test makes sense even without remounting as ext3
so just make the test silently skip the remount.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/ext4/044

index 50de5a40bdc78558f163c33e9d94ae6247751db3..96fa70cc0d1e1f7f58ba14602fa8a0f1464cd284 100755 (executable)
@@ -53,9 +53,10 @@ _within_tolerance "sec_ctime" $sec_ctime $sec 1 -v
 
 _scratch_unmount >> $seqres.full 2>&1
 
-# Test mount to ext3 then mount back to ext4 and check timestamp again
-_mount -t ext3 `_scratch_mount_options $*` || _fail "ext3 mount failed"
-_scratch_unmount >> $seqres.full 2>&1
+# Test mount to ext3 then mount back to ext4 and check timestamp again.  We
+# ignore if ext3 failed to mount. It can happen because some mount options are
+# incompatible with ext3. Still the test makes sense.
+_mount -t ext3 `_scratch_mount_options $*` >> $seqres.full 2>&1 && _scratch_unmount >> $seqres.full 2>&1
 _scratch_mount
 
 nsec_atime2=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file atime nsec`