fstests: _require_metadata_journaling in _require_dm_flakey
RFC PATCH 1/1 fstests: _require_metadata_journaling in _require_dm_flakey
Tests take use of dm-flakey target should require metadata journaling, so move _require_metadata_journaling call from each test to _require_dm_flakey to ease the process, though it seems unnecessary to btrfs or xfs specific tests.
This change also makes generic/039 generic/059 generic/325 require metadata journaling automatically, and any new test that calls _require_dm_flakey.
--- common/rc | 1 + tests/generic/034 | 1 - tests/generic/040 | 1 - tests/generic/041 | 1 - tests/generic/056 | 1 - tests/generic/057 | 1 - tests/generic/065 | 1 - tests/generic/066 | 1 - tests/generic/073 | 1 - tests/generic/311 | 1 - tests/generic/321 | 1 - tests/generic/322 | 1 - 12 files changed, 1 insertion(+), 11 deletions(-)
common/rc +1 -0
@@ -1311,6 +1311,7 @@ _require_dm_flakey() { # require SCRATCH_DEV to be a valid block device _require_block_device $SCRATCH_DEV + _require_metadata_journaling $SCRATCH_DEV _require_command "$DMSETUP_PROG" dmsetup modprobe dm-flakey >/dev/null 2>&1
tests/generic/034 +0 -1
@@ -53,7 +53,6 @@ _supported_os Linux _need_to_be_root _require_scratch _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full
tests/generic/040 +0 -1
@@ -62,7 +62,6 @@ _supported_os Linux _need_to_be_root _require_scratch _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full
tests/generic/041 +0 -1
@@ -66,7 +66,6 @@ _supported_os Linux _need_to_be_root _require_scratch _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full
tests/generic/056 +0 -1
@@ -55,7 +55,6 @@ _supported_os Linux _need_to_be_root _require_scratch _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full
tests/generic/057 +0 -1
@@ -55,7 +55,6 @@ _supported_os Linux _need_to_be_root _require_scratch _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full
tests/generic/065 +0 -1
@@ -56,7 +56,6 @@ _supported_os Linux _need_to_be_root _require_scratch _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full
tests/generic/066 +0 -1
@@ -61,7 +61,6 @@ _need_to_be_root _require_scratch _require_dm_flakey _require_attrs -_require_metadata_journaling $SCRATCH_DEV _crash_and_mount() {
tests/generic/073 +0 -1
@@ -56,7 +56,6 @@ _supported_os Linux _need_to_be_root _require_scratch _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full
tests/generic/311 +0 -1
@@ -56,7 +56,6 @@ _supported_os Linux _need_to_be_root _require_scratch_nocheck _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV # xfs_io is not required for this test, but it's the best way to verify # the test system supports fallocate() for allocation
tests/generic/321 +0 -1
@@ -45,7 +45,6 @@ _supported_os Linux _need_to_be_root _require_scratch_nocheck _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full
tests/generic/322 +0 -1
@@ -45,7 +45,6 @@ _supported_os Linux _need_to_be_root _require_scratch_nocheck _require_dm_flakey -_require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full
Signature · 1 line
2.1.0
Quoted 8 lines · Eryu Guan
Tests take use of dm-flakey target should require metadata journaling, so move
_require_metadata_journalingcall from each test to_require_dm_flakeyto ease the process, though it seems unnecessary to btrfs or xfs specific tests.This change also makes generic/039 generic/059 generic/325 require metadata journaling automatically, and any new test that calls
_require_dm_flakey.
I'm not sure this is a great idea... I think _require_metadata_journaling should only be used when we expect filesystem consistency after a (flakey) shutdown. We can use dm_flakey to test fsync persistence on vfat, for example, right? But with this change such a test won't run on vfat or many other filesystems even though the test for persistent data would be perfectly valid.
-Eric
Quoted 10 lines · Eric Sandeen
Quoted 8 lines · Eryu Guan
Tests take use of dm-flakey target should require metadata journaling, so move
_require_metadata_journalingcall from each test to_require_dm_flakeyto ease the process, though it seems unnecessary to btrfs or xfs specific tests.This change also makes generic/039 generic/059 generic/325 require metadata journaling automatically, and any new test that calls
_require_dm_flakey.
Quoted 8 lines
I'm not sure this is a great idea... I think
_require_metadata_journalingshould only be used when we expect filesystem consistency after a (flakey) shutdown. We can usedm_flakeyto test fsync persistence on vfat, for example, right? But with this change such a test won't run on vfat or many other filesystems even though the test for persistent data would be perfectly valid.-Eric
Yes, you're right. Thanks for pointing this out!
Then I think generic/039 generic/059 and generic/325 still need _require_metadata_journaling, I've seen generic/059 fail on ext2(using ext4 driver). I'll send another patch to fix these issues.
Thanks,
Eryu