tests: Fix failure in nojournal mode
PATCH 1/1 tests: Fix failure in nojournal mode
Several tests use fs shutdown. Without journalling the filesystem isn't guaranteed to be consistent after shutdown. So for tests that don't make sure data makes it to the disk using fsync/sync we cannot really test much. Skip such tests without journalling.
--- tests/ext4/051 | 1 + tests/generic/536 | 1 + tests/generic/622 | 1 + tests/generic/635 | 1 + tests/generic/646 | 1 + tests/generic/705 | 1 + tests/generic/722 | 1 + tests/overlay/087 | 1 + 8 files changed, 8 insertions(+)
tests/ext4/051 +1 -0
@@ -16,6 +16,7 @@ _exclude_fs ext2 _exclude_fs ext3 _require_scratch _require_scratch_shutdown +_require_metadata_journaling _require_command "$TUNE2FS_PROG" tune2fs echo "Silence is golden"
tests/generic/536 +1 -0
@@ -17,6 +17,7 @@ _begin_fstest auto quick rw shutdown # Modify as appropriate. _require_scratch _require_scratch_shutdown +_require_metadata_journaling # create a small fs and initialize free blocks with a unique pattern _scratch_mkfs_sized $((1024 * 1024 * 100)) >> $seqres.full 2>&1
tests/generic/622 +1 -0
@@ -78,6 +78,7 @@ _cleanup() # rather than the test filesystem. _require_scratch _require_scratch_shutdown +_require_metadata_journaling _require_xfs_io_command "pwrite" _require_xfs_io_command "fsync" _require_xfs_io_command "syncfs"
tests/generic/635 +1 -0
@@ -26,6 +26,7 @@ _begin_fstest auto quick atime bigtime shutdown _require_scratch _require_scratch_shutdown +_require_metadata_journaling _scratch_mkfs > $seqres.full _scratch_mount
tests/generic/646 +1 -0
@@ -19,6 +19,7 @@ _begin_fstest auto quick recoveryloop shutdown _require_scratch _require_scratch_shutdown +_require_metadata_journaling _scratch_mkfs > $seqres.full 2>&1 _scratch_mount
tests/generic/705 +1 -0
@@ -12,6 +12,7 @@ _begin_fstest auto shutdown _require_scratch _require_scratch_shutdown +_require_metadata_journaling _require_command "$FILEFRAG_PROG" filefrag _scratch_mkfs > $seqres.full 2>&1 _scratch_mount
tests/generic/722 +1 -0
@@ -18,6 +18,7 @@ _require_test_program "punch-alternating" _require_xfs_io_command exchangerange _require_scratch _require_scratch_shutdown +_require_metadata_journaling _scratch_mkfs >> $seqres.full _scratch_mount
tests/overlay/087 +1 -0
@@ -34,6 +34,7 @@ _begin_fstest auto quick mount shutdown # Modify as appropriate. _require_scratch_nocheck _require_scratch_shutdown_and_syncfs +_require_metadata_journaling [ "$OVL_BASE_FSTYP" == "xfs" ] || \ _notrun "base fs $OVL_BASE_FSTYP has unknown behavior with syncfs after shutdown"
Signature · 1 line
2.51.0
Quoted 7 lines · Jan Kara
Several tests use fs shutdown. Without journalling the filesystem isn't guaranteed to be consistent after shutdown. So for tests that don't make sure data makes it to the disk using fsync/sync we cannot really test much. Skip such tests without journalling.
Signed-off-by Jan Kara <[email protected]>---
Thanks Jan! As we discussed in:
https://lore.kernel.org/fstests/20260216131308.atxnkqehyke4conu@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com/T/#t
this patch is good to me now, if no more review points I'll push it to next release.
Quoted 109 lines
tests/ext4/051 | 1 + tests/generic/536 | 1 + tests/generic/622 | 1 + tests/generic/635 | 1 + tests/generic/646 | 1 + tests/generic/705 | 1 + tests/generic/722 | 1 + tests/overlay/087 | 1 + 8 files changed, 8 insertions(+)tests/ext4/051 +1
-0@@ -16,6 +16,7 @@ _exclude_fs ext2 _exclude_fs ext3 _require_scratch _require_scratch_shutdown +_require_metadata_journaling _require_command "$TUNE2FS_PROG" tune2fs echo "Silence is golden"tests/generic/536 +1
-0@@ -17,6 +17,7 @@ _begin_fstest auto quick rw shutdown # Modify as appropriate. _require_scratch _require_scratch_shutdown +_require_metadata_journaling # create a small fs and initialize free blocks with a unique pattern _scratch_mkfs_sized $((1024 * 1024 * 100)) >> $seqres.full 2>&1tests/generic/622 +1
-0@@ -78,6 +78,7 @@ _cleanup() # rather than the test filesystem. _require_scratch _require_scratch_shutdown +_require_metadata_journaling _require_xfs_io_command "pwrite" _require_xfs_io_command "fsync" _require_xfs_io_command "syncfs"tests/generic/635 +1
-0@@ -26,6 +26,7 @@ _begin_fstest auto quick atime bigtime shutdown _require_scratch _require_scratch_shutdown +_require_metadata_journaling _scratch_mkfs > $seqres.full _scratch_mounttests/generic/646 +1
-0@@ -19,6 +19,7 @@ _begin_fstest auto quick recoveryloop shutdown _require_scratch _require_scratch_shutdown +_require_metadata_journaling _scratch_mkfs > $seqres.full 2>&1 _scratch_mounttests/generic/705 +1
-0@@ -12,6 +12,7 @@ _begin_fstest auto shutdown _require_scratch _require_scratch_shutdown +_require_metadata_journaling _require_command "$FILEFRAG_PROG" filefrag _scratch_mkfs > $seqres.full 2>&1 _scratch_mounttests/generic/722 +1
-0@@ -18,6 +18,7 @@ _require_test_program "punch-alternating" _require_xfs_io_command exchangerange _require_scratch _require_scratch_shutdown +_require_metadata_journaling _scratch_mkfs >> $seqres.full _scratch_mounttests/overlay/087 +1
-0@@ -34,6 +34,7 @@ _begin_fstest auto quick mount shutdown # Modify as appropriate. _require_scratch_nocheck _require_scratch_shutdown_and_syncfs +_require_metadata_journaling [ "$OVL_BASE_FSTYP" == "xfs" ] || \ _notrun "base fs $OVL_BASE_FSTYP has unknown behavior with syncfs after shutdown"Signature · 1 line
2.51.0