]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
generic: require journal in shutdown tests
authorEryu Guan <eguan@redhat.com>
Mon, 6 Mar 2017 11:45:57 +0000 (19:45 +0800)
committerEryu Guan <eguan@redhat.com>
Thu, 9 Mar 2017 07:01:43 +0000 (15:01 +0800)
Tests in shutdown group are supposed to test journal recovery after
filesystem shutdown, and the tests assume the filesystem in test has
journal support. But with the ext4 shutdown function added in
4.11-rc kernel, ext2 gains shutdown support too when driving with
ext4 driver, so generic/051 fails because fs corruption after test.

Adding _require_metadata_journaling to all generic tests in shutdown
group to ensure there's journal present.

generic/050 is skipped because it has _require_scratch_nocheck,
which indicates no fsck is done after test.

Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eryu Guan <eguan@redhat.com>
14 files changed:
tests/generic/042
tests/generic/043
tests/generic/044
tests/generic/045
tests/generic/046
tests/generic/047
tests/generic/048
tests/generic/049
tests/generic/051
tests/generic/052
tests/generic/054
tests/generic/055
tests/generic/388
tests/generic/392

index 6eecbdceec9d94c434ef070e504c255869e7f50e..68ff03c65580396939769252e8110921251d7933 100755 (executable)
@@ -92,6 +92,7 @@ _require_xfs_io_command "fpunch"
 _require_xfs_io_command "fzero"
 
 _scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 _crashtest "falloc -k"
index b76a5aa8d94502802c56c478a7c44d2486a71900..3d98ab05ad875289a97c434c906f72366b925553 100755 (executable)
@@ -43,6 +43,7 @@ _require_scratch
 _require_scratch_shutdown
 _require_fiemap
 _scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 # create files
index 0331baa6bb9670f8d72a63322e9a1aba5cbbcef5..eb64b8606f3b67c011e99295c7851f3efc1b5293 100755 (executable)
@@ -43,6 +43,7 @@ _require_scratch
 _require_scratch_shutdown
 _require_fiemap
 _scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 # create files
index 874c955982f0ab47120399a1e38b711dbddbf5c9..5ef747f256fab62f87969324718f4c3fb649bb1b 100755 (executable)
@@ -43,6 +43,7 @@ _require_scratch
 _require_scratch_shutdown
 _require_fiemap
 _scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 # create files
index 5a894b858cd15706ff1f2a7ed12655f2898597f8..882cb095b96b98a38448478b630368ccaefd05e6 100755 (executable)
@@ -43,6 +43,7 @@ _require_scratch
 _require_scratch_shutdown
 _require_fiemap
 _scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 # create files
index 631dc1e4240fb8c3f3e917399f38b93bffcb8648..d7e4610d842feedce67867c5d1b53cec2bb40e15 100755 (executable)
@@ -44,6 +44,7 @@ _require_scratch
 _require_scratch_shutdown
 _require_fiemap
 _scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 _check_files()
index 51d7efd28a47469e8a91584531dcb67409cb6ae8..3f0bcc183b7477133cb09d11eac7a84cd4819690 100755 (executable)
@@ -44,6 +44,7 @@ _require_scratch
 _require_scratch_shutdown
 _require_fiemap
 _scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 # Do we have enough space on disk?  10G
index 1299242233ce92fb052b07c51d698ae88dd00985..1f2a4b2b9a08f22d54b97780757659cdaa0087af 100755 (executable)
@@ -44,6 +44,7 @@ _require_scratch
 _require_scratch_shutdown
 _require_fiemap
 _scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 _check_files()
index 7b807b9f9d09263f05dd652e806e37b79e8fe0cb..29ac61b600c5fb1c5d8524a134caf1a7c2ba2c2d 100755 (executable)
@@ -55,6 +55,7 @@ _require_command "$KILLALL_PROG" killall
 rm -f $seqres.full
 
 _scratch_mkfs > $seqres.full 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 SLEEP_TIME=$((30 * $TIME_FACTOR))
index f7cdd09c16e2b5941539010d955286630460d2f8..65d430d1fb51d8ceaeb4cf01c3c92b755a6ad9f6 100755 (executable)
@@ -53,6 +53,7 @@ _require_logstate
 echo "mkfs"
 _scratch_mkfs >>$seqres.full 2>&1 \
     || _fail "mkfs scratch failed"
+_require_metadata_journaling $SCRATCH_DEV
 
 echo "mount"
 _scratch_mount >>$seqres.full 2>&1 \
index 8375e574db24ca0c97b2124538c52f0e8c262c18..4d4be59ba7018ffbf021ab11a194f6cb92997f88 100755 (executable)
@@ -50,6 +50,9 @@ _require_logstate
 echo "*** init FS"
 _scratch_unmount >/dev/null 2>&1
 
+_scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
+
 _get_log_configs > $tmp.seq.params
 
 # Do the work for various log params which
index 207c007f257e0ad30db710959ebf2ceca34f0e31..aed3b28c3ceb2de6cc60c63f6bd50ab212c2fcba 100755 (executable)
@@ -79,6 +79,9 @@ QUOTA_OPTION=`_get_quota_option`
 echo "*** init FS"
 _scratch_unmount >/dev/null 2>&1
 
+_scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
+
 _get_log_configs > $tmp.seq.params
 
 cat $tmp.seq.params \
index 3729aa5b2f524d04511b113163dbab129cc89f3d..27602085c0e251e39f0464e40948bc98ed5b0136 100755 (executable)
@@ -62,6 +62,7 @@ rm -f $seqres.full
 echo "Silence is golden."
 
 _scratch_mkfs >> $seqres.full 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount || _fail "mount failed"
 
 for i in $(seq 1 50); do
index b8af8a084b74d95afce0addeed572a89ec4187ad..6922f7d2a887f59080ced27530b96f1d08d7df83 100755 (executable)
@@ -53,6 +53,7 @@ _require_scratch_shutdown
 _require_xfs_io_command "fpunch"
 
 _scratch_mkfs >/dev/null 2>&1
+_require_metadata_journaling $SCRATCH_DEV
 _scratch_mount
 
 testfile=$SCRATCH_MNT/testfile