generic: _require_dm_target() helper

generic/085 was failing on a machine w/o devicemapper kernel
support because it requires the linear target, but didn't
explicitly test for it.

I could have cut & pasted _require_dm_linear(), but chose
to go the route of a generic helper, _require_dm_target $FOO,
because some day someone will need the zero target, the error
target, or who knows.

Add the helper, use it in test generic/085, and convert
_require_dm_flakey, _require_dm_snapshot, and
_dmerror_required with this new helper.

Reported-by: Angelo Dureghello <angelo.dureghello@nomovok.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Eric Sandeen
2015-10-14 14:08:42 +11:00
committed by Dave Chinner
parent 7f0a867ce6
commit 50266c22dc
32 changed files with 47 additions and 71 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -56,7 +56,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -61,7 +61,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -65,7 +65,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -54,7 +54,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -54,7 +54,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -59,7 +59,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
_require_xfs_io_command "fpunch"
+1 -1
View File
@@ -55,7 +55,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -59,7 +59,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_attrs
_require_metadata_journaling $SCRATCH_DEV
+1 -1
View File
@@ -55,7 +55,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -49,7 +49,7 @@ _supported_fs generic
_supported_os Linux
_require_test
_require_scratch_nocheck
_require_dm_snapshot
_require_dm_target snapshot
_require_command $LVM_PROG lvm
echo "Silence is golden"
+11 -11
View File
@@ -41,6 +41,16 @@ _cleanup()
cleanup_dmdev
}
cleanup_dmdev()
{
# in case it's still suspended and/or mounted
$DMSETUP_PROG resume $lvdev >/dev/null 2>&1
$UMOUNT_PROG $lvdev >/dev/null 2>&1
$DMSETUP_PROG remove $node >>$seqres.full 2>&1
$DMSETUP_PROG mknodes >/dev/null 2>&1
}
# get standard environment, filters and checks
. ./common/rc
. ./common/filter
@@ -50,7 +60,7 @@ _supported_fs generic
_supported_os Linux
_require_scratch
_require_block_device $SCRATCH_DEV
_require_command $DMSETUP_PROG
_require_dm_target linear
_require_freeze
setup_dmdev()
@@ -61,16 +71,6 @@ setup_dmdev()
return $?
}
cleanup_dmdev()
{
# in case it's still suspended and/or mounted
$DMSETUP_PROG resume $lvdev >/dev/null 2>&1
$UMOUNT_PROG $lvdev >/dev/null 2>&1
$DMSETUP_PROG remove $node >>$seqres.full 2>&1
$DMSETUP_PROG mknodes >/dev/null 2>&1
}
rm -f $seqres.full
echo "Silence is golden"
+1 -1
View File
@@ -53,7 +53,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -51,7 +51,7 @@ _need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# This test was motivated by an issue found in btrfs when the btrfs no-holes
+1 -1
View File
@@ -49,7 +49,7 @@ _need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -48,7 +48,7 @@ _need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -51,7 +51,7 @@ _need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -55,7 +55,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch_nocheck
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# xfs_io is not required for this test, but it's the best way to verify
+1 -1
View File
@@ -44,7 +44,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch_nocheck
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
+1 -1
View File
@@ -44,7 +44,7 @@ _supported_fs generic
_supported_os Linux
_need_to_be_root
_require_scratch_nocheck
_require_dm_flakey
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full

Some files were not shown because too many files have changed in this diff Show More