Message ID | 1428063285-31140-1-git-send-email-eguan@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 4/3/15 7:14 AM, Eryu Guan wrote: > 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. 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 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Apr 06, 2015 at 09:46:35AM -0500, Eric Sandeen wrote: > On 4/3/15 7:14 AM, Eryu Guan wrote: > > 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. > > 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 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 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/common/rc b/common/rc index c5db0dd..518bf38 100644 --- a/common/rc +++ b/common/rc @@ -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 diff --git a/tests/generic/034 b/tests/generic/034 index 966b3d2..4ec1db8 100755 --- a/tests/generic/034 +++ b/tests/generic/034 @@ -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 diff --git a/tests/generic/040 b/tests/generic/040 index c841fbc..5f10f48 100755 --- a/tests/generic/040 +++ b/tests/generic/040 @@ -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 diff --git a/tests/generic/041 b/tests/generic/041 index f38b662..36a6f42 100755 --- a/tests/generic/041 +++ b/tests/generic/041 @@ -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 diff --git a/tests/generic/056 b/tests/generic/056 index 8bb1522..9ec00e3 100755 --- a/tests/generic/056 +++ b/tests/generic/056 @@ -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 diff --git a/tests/generic/057 b/tests/generic/057 index 3b9f89e..4c0ffd1 100755 --- a/tests/generic/057 +++ b/tests/generic/057 @@ -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 diff --git a/tests/generic/065 b/tests/generic/065 index 739a4d5..4fdff5a 100755 --- a/tests/generic/065 +++ b/tests/generic/065 @@ -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 diff --git a/tests/generic/066 b/tests/generic/066 index cb36506..3fbce8f 100755 --- a/tests/generic/066 +++ b/tests/generic/066 @@ -61,7 +61,6 @@ _need_to_be_root _require_scratch _require_dm_flakey _require_attrs -_require_metadata_journaling $SCRATCH_DEV _crash_and_mount() { diff --git a/tests/generic/073 b/tests/generic/073 index 9cf0d90..bf666ec 100755 --- a/tests/generic/073 +++ b/tests/generic/073 @@ -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 diff --git a/tests/generic/311 b/tests/generic/311 index d21b6eb..85e52e8 100755 --- a/tests/generic/311 +++ b/tests/generic/311 @@ -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 diff --git a/tests/generic/321 b/tests/generic/321 index c821a23..3bd6b12 100755 --- a/tests/generic/321 +++ b/tests/generic/321 @@ -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 diff --git a/tests/generic/322 b/tests/generic/322 index 4c0edf6..3ec2387 100755 --- a/tests/generic/322 +++ b/tests/generic/322 @@ -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 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. Signed-off-by: Eryu Guan <eguan@redhat.com> --- 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(-)