From 3ded3e13c008326d197d11ac975049ed1f8ec922 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Fri, 20 Feb 2026 21:33:08 +0100 Subject: [PATCH] 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. Signed-off-by: Jan Kara Reviewed-by: Zorro Lang Signed-off-by: Zorro Lang --- 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(+) diff --git a/tests/ext4/051 b/tests/ext4/051 index 728ad19b..9fbf0404 100755 --- a/tests/ext4/051 +++ b/tests/ext4/051 @@ -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" diff --git a/tests/generic/536 b/tests/generic/536 index 726120e6..56a8ced2 100755 --- a/tests/generic/536 +++ b/tests/generic/536 @@ -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 diff --git a/tests/generic/622 b/tests/generic/622 index a67931ad..e8ead300 100755 --- a/tests/generic/622 +++ b/tests/generic/622 @@ -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" diff --git a/tests/generic/635 b/tests/generic/635 index 4a811630..018b868c 100755 --- a/tests/generic/635 +++ b/tests/generic/635 @@ -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 diff --git a/tests/generic/646 b/tests/generic/646 index b3b0ab0a..1e3f0cd5 100755 --- a/tests/generic/646 +++ b/tests/generic/646 @@ -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 diff --git a/tests/generic/705 b/tests/generic/705 index 9c27fbbc..23f06d69 100755 --- a/tests/generic/705 +++ b/tests/generic/705 @@ -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 diff --git a/tests/generic/722 b/tests/generic/722 index b9c60871..10869bc7 100755 --- a/tests/generic/722 +++ b/tests/generic/722 @@ -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 diff --git a/tests/overlay/087 b/tests/overlay/087 index 2ad069db..25d02109 100755 --- a/tests/overlay/087 +++ b/tests/overlay/087 @@ -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" -- 2.47.3