diff mbox series

[blktests,2/5] tests/nvmeof-mp/rc: run nvmeof-mp tests if we set multipath=N

Message ID 20201124010427.18595-3-yi.zhang@redhat.com (mailing list archive)
State New, archived
Headers show
Series nvmeof-mp/srp/nvme-rdma misc fix and enhancement | expand

Commit Message

Yi Zhang Nov. 24, 2020, 1:04 a.m. UTC
To enable it, just do bellow step before we run it:
$ echo "options nvme_core multipath=N" >/etc/modprobe.d/nvme.conf

Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
---
 tests/nvmeof-mp/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bart Van Assche Nov. 24, 2020, 3:26 a.m. UTC | #1
On 11/23/20 5:04 PM, Yi Zhang wrote:
> To enable it, just do bellow step before we run it:
> $ echo "options nvme_core multipath=N" >/etc/modprobe.d/nvme.conf
> 
> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
> ---
>  tests/nvmeof-mp/rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/nvmeof-mp/rc b/tests/nvmeof-mp/rc
> index d7a7c87..bc78f14 100755
> --- a/tests/nvmeof-mp/rc
> +++ b/tests/nvmeof-mp/rc
> @@ -17,7 +17,7 @@ group_requires() {
>  	# Since the nvmeof-mp tests are based on the dm-mpath driver, these
>  	# tests are incompatible with the NVME_MULTIPATH kernel configuration
>  	# option.
> -	if _have_kernel_option NVME_MULTIPATH; then
> +	if _have_kernel_option NVME_MULTIPATH && _have_module_param_value nvme_core multipath Y; then
>  		SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config"
>  		return
>  	fi

Please set different SKIP_REASON string for each case such that it
remains easy for a blktests user to figure out why these tests have been
skipped.

Thanks,

Bart.
Yi Zhang Nov. 24, 2020, 2:04 p.m. UTC | #2
On 11/24/20 11:26 AM, Bart Van Assche wrote:
> On 11/23/20 5:04 PM, Yi Zhang wrote:
>> To enable it, just do bellow step before we run it:
>> $ echo "options nvme_core multipath=N" >/etc/modprobe.d/nvme.conf
>>
>> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
>> ---
>>   tests/nvmeof-mp/rc | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tests/nvmeof-mp/rc b/tests/nvmeof-mp/rc
>> index d7a7c87..bc78f14 100755
>> --- a/tests/nvmeof-mp/rc
>> +++ b/tests/nvmeof-mp/rc
>> @@ -17,7 +17,7 @@ group_requires() {
>>   	# Since the nvmeof-mp tests are based on the dm-mpath driver, these
>>   	# tests are incompatible with the NVME_MULTIPATH kernel configuration
>>   	# option.
>> -	if _have_kernel_option NVME_MULTIPATH; then
>> +	if _have_kernel_option NVME_MULTIPATH && _have_module_param_value nvme_core multipath Y; then
>>   		SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config"
>>   		return
>>   	fi
> Please set different SKIP_REASON string for each case such that it
> remains easy for a blktests user to figure out why these tests have been
> skipped.
Do you mean something like this, could you add more detail here, thanks.

diff --git a/tests/nvmeof-mp/rc b/tests/nvmeof-mp/rc
index d7a7c87..af700d9 100755
--- a/tests/nvmeof-mp/rc
+++ b/tests/nvmeof-mp/rc
@@ -16,9 +16,9 @@ group_requires() {

         # Since the nvmeof-mp tests are based on the dm-mpath driver, these
         # tests are incompatible with the NVME_MULTIPATH kernel 
configuration
-       # option.
-       if _have_kernel_option NVME_MULTIPATH; then
-               SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config"
+       # option and nvme_core: multipath set with Y.
+       if _have_kernel_option NVME_MULTIPATH && 
_have_module_param_value nvme_core multipath Y; then
+               SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in 
.config and nvme_core: multipath should be set with N"
                 return
         fi


> Thanks,
>
> Bart.
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
>
Bart Van Assche Nov. 25, 2020, 3:51 a.m. UTC | #3
On 11/24/20 6:04 AM, Yi Zhang wrote:
> Do you mean something like this, could you add more detail here, thanks.
> 
> diff --git a/tests/nvmeof-mp/rc b/tests/nvmeof-mp/rc
> index d7a7c87..af700d9 100755
> --- a/tests/nvmeof-mp/rc
> +++ b/tests/nvmeof-mp/rc
> @@ -16,9 +16,9 @@ group_requires() {
> 
>         # Since the nvmeof-mp tests are based on the dm-mpath driver, these
>         # tests are incompatible with the NVME_MULTIPATH kernel
> configuration
> -       # option.
> -       if _have_kernel_option NVME_MULTIPATH; then
> -               SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config"
> +       # option and nvme_core: multipath set with Y.
> +       if _have_kernel_option NVME_MULTIPATH &&
> _have_module_param_value nvme_core multipath Y; then
> +               SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in
> .config and nvme_core: multipath should be set with N"
>                 return
>         fi

I may have sent you in the wrong direction. This is what I meant:

	if _have_kernel_option NVME_MULTIPATH &&
	    _have_module_param_value nvme_core multipath Y; then
	    SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config and
multipathing has been enabled in the nvme_core kernel module"
	    return
	fi

Thanks,

Bart.
Yi Zhang Nov. 25, 2020, 7:36 a.m. UTC | #4
On 11/25/20 11:51 AM, Bart Van Assche wrote:
> On 11/24/20 6:04 AM, Yi Zhang wrote:
>> Do you mean something like this, could you add more detail here, thanks.
>>
>> diff --git a/tests/nvmeof-mp/rc b/tests/nvmeof-mp/rc
>> index d7a7c87..af700d9 100755
>> --- a/tests/nvmeof-mp/rc
>> +++ b/tests/nvmeof-mp/rc
>> @@ -16,9 +16,9 @@ group_requires() {
>>
>>          # Since the nvmeof-mp tests are based on the dm-mpath driver, these
>>          # tests are incompatible with the NVME_MULTIPATH kernel
>> configuration
>> -       # option.
>> -       if _have_kernel_option NVME_MULTIPATH; then
>> -               SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config"
>> +       # option and nvme_core: multipath set with Y.
>> +       if _have_kernel_option NVME_MULTIPATH &&
>> _have_module_param_value nvme_core multipath Y; then
>> +               SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in
>> .config and nvme_core: multipath should be set with N"
>>                  return
>>          fi
> I may have sent you in the wrong direction. This is what I meant:
>
> 	if _have_kernel_option NVME_MULTIPATH &&
> 	    _have_module_param_value nvme_core multipath Y; then
> 	    SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config and
> multipathing has been enabled in the nvme_core kernel module"
> 	    return
> 	fi
Updated on V2, thanks for the review.

> Thanks,
>
> Bart.
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
diff mbox series

Patch

diff --git a/tests/nvmeof-mp/rc b/tests/nvmeof-mp/rc
index d7a7c87..bc78f14 100755
--- a/tests/nvmeof-mp/rc
+++ b/tests/nvmeof-mp/rc
@@ -17,7 +17,7 @@  group_requires() {
 	# Since the nvmeof-mp tests are based on the dm-mpath driver, these
 	# tests are incompatible with the NVME_MULTIPATH kernel configuration
 	# option.
-	if _have_kernel_option NVME_MULTIPATH; then
+	if _have_kernel_option NVME_MULTIPATH && _have_module_param_value nvme_core multipath Y; then
 		SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config"
 		return
 	fi