generic: require journal in shutdown tests
PATCH 1/1 generic: require journal in shutdown tests
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.
--- tests/generic/042 | 1 + tests/generic/043 | 1 + tests/generic/044 | 1 + tests/generic/045 | 1 + tests/generic/046 | 1 + tests/generic/047 | 1 + tests/generic/048 | 1 + tests/generic/049 | 1 + tests/generic/051 | 1 + tests/generic/052 | 1 + tests/generic/054 | 3 +++ tests/generic/055 | 3 +++ tests/generic/388 | 1 + tests/generic/392 | 1 + 14 files changed, 18 insertions(+)
tests/generic/042 +1 -0
@@ -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"
tests/generic/043 +1 -0
@@ -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
tests/generic/044 +1 -0
@@ -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
tests/generic/045 +1 -0
@@ -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
tests/generic/046 +1 -0
@@ -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
tests/generic/047 +1 -0
@@ -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()
tests/generic/048 +1 -0
@@ -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
tests/generic/049 +1 -0
@@ -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()
tests/generic/051 +1 -0
@@ -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))
tests/generic/052 +1 -0
@@ -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 \
tests/generic/054 +3 -0
@@ -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
tests/generic/055 +3 -0
@@ -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 \
tests/generic/388 +1 -0
@@ -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
tests/generic/392 +1 -0
@@ -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
Signature · 1 line
2.9.3
Quoted 6 lines · Eryu Guan
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.
Quoted 7 lines
Adding
_require_metadata_journalingto 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.Signed-off-by Eryu Guan <[email protected]>
Thanks!!
- Ted
Quoted 8 lines · Eryu Guan
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_journalingto all generic tests in shutdown group to ensure there's journal present.
Good!
Thanks,
Xiong
Quoted 197 lines
generic/050 is skipped because it has
_require_scratch_nocheck, which indicates no fsck is done after test.Signed-off-by Eryu Guan <[email protected]>--- tests/generic/042 | 1 + tests/generic/043 | 1 + tests/generic/044 | 1 + tests/generic/045 | 1 + tests/generic/046 | 1 + tests/generic/047 | 1 + tests/generic/048 | 1 + tests/generic/049 | 1 + tests/generic/051 | 1 + tests/generic/052 | 1 + tests/generic/054 | 3 +++ tests/generic/055 | 3 +++ tests/generic/388 | 1 + tests/generic/392 | 1 + 14 files changed, 18 insertions(+)tests/generic/042 +1
-0@@ -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"tests/generic/043 +1
-0@@ -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 filestests/generic/044 +1
-0@@ -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 filestests/generic/045 +1
-0@@ -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 filestests/generic/046 +1
-0@@ -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 filestests/generic/047 +1
-0@@ -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()tests/generic/048 +1
-0@@ -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? 10Gtests/generic/049 +1
-0@@ -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()tests/generic/051 +1
-0@@ -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))tests/generic/052 +1
-0@@ -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 \tests/generic/054 +3
-0@@ -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 whichtests/generic/055 +3
-0@@ -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 \tests/generic/388 +1
-0@@ -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); dotests/generic/392 +1
-0@@ -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/testfileSignature · 1 line
2.9.3