diff mbox series

[1/3] dax/dm: disable testing on devices that don't support dax

Message ID 20200205224818.18707-2-jmoyer@redhat.com (mailing list archive)
State Superseded
Headers show
Series fstests: fixes for 64k pages and dax | expand

Commit Message

Jeff Moyer Feb. 5, 2020, 10:48 p.m. UTC
Move the hack out of dmflakey and put it into _require_dm_target.  This
fixes up a lot of missed tests that are failing due to the lack of dax
support (such as tests on dm-thin, snapshot, etc).

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
---
 common/dmflakey |  5 -----
 common/rc       | 11 +++++++++++
 2 files changed, 11 insertions(+), 5 deletions(-)

Comments

Zorro Lang Feb. 6, 2020, 5:08 a.m. UTC | #1
On Wed, Feb 05, 2020 at 05:48:16PM -0500, Jeff Moyer wrote:
> Move the hack out of dmflakey and put it into _require_dm_target.  This
> fixes up a lot of missed tests that are failing due to the lack of dax
> support (such as tests on dm-thin, snapshot, etc).
> 
> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
> ---
>  common/dmflakey |  5 -----
>  common/rc       | 11 +++++++++++
>  2 files changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/common/dmflakey b/common/dmflakey
> index 2af3924d..b4e11ae9 100644
> --- a/common/dmflakey
> +++ b/common/dmflakey
> @@ -8,11 +8,6 @@ FLAKEY_ALLOW_WRITES=0
>  FLAKEY_DROP_WRITES=1
>  FLAKEY_ERROR_WRITES=2
>  
> -echo $MOUNT_OPTIONS | grep -q dax
> -if [ $? -eq 0 ]; then
> -	_notrun "Cannot run tests with DAX on dmflakey devices"
> -fi

If we need to remove this for common/dmflakey, why not do the same thing
in common/dmthin and common/dmdelay etc ?

> -
>  _init_flakey()
>  {
>  	local BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
> diff --git a/common/rc b/common/rc
> index eeac1355..785f34c6 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1874,6 +1874,17 @@ _require_dm_target()
>  	_require_sane_bdev_flush $SCRATCH_DEV
>  	_require_command "$DMSETUP_PROG" dmsetup
>  
> +	echo $MOUNT_OPTIONS | grep -q dax
> +	if [ $? -eq 0 ]; then
> +		case $target in
> +		stripe|linear|error)
> +			;;
> +		*)
> +			_notrun "Cannot run tests with DAX on $target devices."
> +			;;
> +		esac
> +	fi
> +
>  	modprobe dm-$target >/dev/null 2>&1
>  
>  	$DMSETUP_PROG targets 2>&1 | grep -q ^$target
> -- 
> 2.19.1
>
Jeff Moyer Feb. 6, 2020, 2:35 p.m. UTC | #2
Zorro Lang <zlang@redhat.com> writes:

> On Wed, Feb 05, 2020 at 05:48:16PM -0500, Jeff Moyer wrote:
>> Move the hack out of dmflakey and put it into _require_dm_target.  This
>> fixes up a lot of missed tests that are failing due to the lack of dax
>> support (such as tests on dm-thin, snapshot, etc).
>> 
>> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
>> ---
>>  common/dmflakey |  5 -----
>>  common/rc       | 11 +++++++++++
>>  2 files changed, 11 insertions(+), 5 deletions(-)
>> 
>> diff --git a/common/dmflakey b/common/dmflakey
>> index 2af3924d..b4e11ae9 100644
>> --- a/common/dmflakey
>> +++ b/common/dmflakey
>> @@ -8,11 +8,6 @@ FLAKEY_ALLOW_WRITES=0
>>  FLAKEY_DROP_WRITES=1
>>  FLAKEY_ERROR_WRITES=2
>>  
>> -echo $MOUNT_OPTIONS | grep -q dax
>> -if [ $? -eq 0 ]; then
>> -	_notrun "Cannot run tests with DAX on dmflakey devices"
>> -fi
>
> If we need to remove this for common/dmflakey, why not do the same thing
> in common/dmthin and common/dmdelay etc ?

I didn't realize they had this same code.  I'll make that change,
thanks!

-Jeff

>
>> -
>>  _init_flakey()
>>  {
>>  	local BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
>> diff --git a/common/rc b/common/rc
>> index eeac1355..785f34c6 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -1874,6 +1874,17 @@ _require_dm_target()
>>  	_require_sane_bdev_flush $SCRATCH_DEV
>>  	_require_command "$DMSETUP_PROG" dmsetup
>>  
>> +	echo $MOUNT_OPTIONS | grep -q dax
>> +	if [ $? -eq 0 ]; then
>> +		case $target in
>> +		stripe|linear|error)
>> +			;;
>> +		*)
>> +			_notrun "Cannot run tests with DAX on $target devices."
>> +			;;
>> +		esac
>> +	fi
>> +
>>  	modprobe dm-$target >/dev/null 2>&1
>>  
>>  	$DMSETUP_PROG targets 2>&1 | grep -q ^$target
>> -- 
>> 2.19.1
>>
diff mbox series

Patch

diff --git a/common/dmflakey b/common/dmflakey
index 2af3924d..b4e11ae9 100644
--- a/common/dmflakey
+++ b/common/dmflakey
@@ -8,11 +8,6 @@  FLAKEY_ALLOW_WRITES=0
 FLAKEY_DROP_WRITES=1
 FLAKEY_ERROR_WRITES=2
 
-echo $MOUNT_OPTIONS | grep -q dax
-if [ $? -eq 0 ]; then
-	_notrun "Cannot run tests with DAX on dmflakey devices"
-fi
-
 _init_flakey()
 {
 	local BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
diff --git a/common/rc b/common/rc
index eeac1355..785f34c6 100644
--- a/common/rc
+++ b/common/rc
@@ -1874,6 +1874,17 @@  _require_dm_target()
 	_require_sane_bdev_flush $SCRATCH_DEV
 	_require_command "$DMSETUP_PROG" dmsetup
 
+	echo $MOUNT_OPTIONS | grep -q dax
+	if [ $? -eq 0 ]; then
+		case $target in
+		stripe|linear|error)
+			;;
+		*)
+			_notrun "Cannot run tests with DAX on $target devices."
+			;;
+		esac
+	fi
+
 	modprobe dm-$target >/dev/null 2>&1
 
 	$DMSETUP_PROG targets 2>&1 | grep -q ^$target