Skip to contentSkip to conversation

tests: Fix failure in nojournal mode

PATCH In review Jan Kara 2 participants 2 messages Feb 20 – Feb 21

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

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
index 728ad19bfcec..9fbf0404fec9 100755
@@ -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
index 726120e67c8e..56a8ced2f8da 100755
@@ -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
index a67931ad877f..e8ead300e362 100755
@@ -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
index 4a811630a621..018b868cb6ce 100755
@@ -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
index b3b0ab0ace56..1e3f0cd54087 100755
@@ -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
index 9c27fbbc389b..23f06d699dfa 100755
@@ -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
index b9c608713c37..10869bc7aabf 100755
@@ -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
index 2ad069dbf78f..25d021095b6f 100755
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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.

---

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
index 728ad19bfcec..9fbf0404fec9 100755
@@ -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
index 726120e67c8e..56a8ced2f8da 100755
@@ -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
index a67931ad877f..e8ead300e362 100755
@@ -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
index 4a811630a621..018b868cb6ce 100755
@@ -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
index b3b0ab0ace56..1e3f0cd54087 100755
@@ -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
index 9c27fbbc389b..23f06d699dfa 100755
@@ -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
index b9c608713c37..10869bc7aabf 100755
@@ -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
index 2ad069dbf78f..25d021095b6f 100755
@@ -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