Re: [PATCH v6 3/7] nvme: make tests transport type agnostic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2020-09-03 3:26 p.m., Sagi Grimberg wrote:
> Pass in nvme_trtype to common routines that can
> support multiple transport types.
> 
> Signed-off-by: Sagi Grimberg <sagi@xxxxxxxxxxx>
> ---
>  tests/nvme/002 |  4 ++--
>  tests/nvme/003 |  4 ++--
>  tests/nvme/004 |  6 +++---
>  tests/nvme/005 |  8 ++++----
>  tests/nvme/006 |  2 +-
>  tests/nvme/007 |  2 +-
>  tests/nvme/008 |  8 ++++----
>  tests/nvme/009 |  8 ++++----
>  tests/nvme/010 |  8 ++++----
>  tests/nvme/011 |  8 ++++----
>  tests/nvme/012 |  8 ++++----
>  tests/nvme/013 |  8 ++++----
>  tests/nvme/014 |  8 ++++----
>  tests/nvme/015 |  8 ++++----
>  tests/nvme/016 |  2 +-
>  tests/nvme/017 |  2 +-
>  tests/nvme/018 |  8 ++++----
>  tests/nvme/019 |  8 ++++----
>  tests/nvme/020 |  8 ++++----
>  tests/nvme/021 |  8 ++++----
>  tests/nvme/022 |  8 ++++----
>  tests/nvme/023 |  8 ++++----
>  tests/nvme/024 |  8 ++++----
>  tests/nvme/025 |  8 ++++----
>  tests/nvme/026 |  8 ++++----
>  tests/nvme/027 |  8 ++++----
>  tests/nvme/028 | 10 +++++-----
>  tests/nvme/029 |  8 ++++----
>  tests/nvme/030 |  2 +-
>  tests/nvme/031 |  4 ++--
>  tests/nvme/rc  | 39 ++++++++++++++++++++++++++++++++-------
>  31 files changed, 131 insertions(+), 106 deletions(-)
> 
> diff --git a/tests/nvme/002 b/tests/nvme/002
> index 92779e8d28ca..955f68da026a 100755
> --- a/tests/nvme/002
> +++ b/tests/nvme/002
> @@ -21,7 +21,7 @@ test() {
>  
>  	local iterations=1000
>  	local port
> -	port="$(_create_nvmet_port "loop")"
> +	port="$(_create_nvmet_port "${nvme_trtype}")"
>  
>  	local loop_dev
>  	loop_dev="$(losetup -f)"
> @@ -31,7 +31,7 @@ test() {
>  		_add_nvmet_subsys_to_port "${port}" "blktests-subsystem-$i"
>  	done
>  
> -	_nvme_discover loop | _filter_discovery
> +	_nvme_discover "${nvme_trtype}" | _filter_discovery
>  
>  	for ((i = iterations - 1; i >= 0; i--)); do
>  		_remove_nvmet_subsystem_from_port "${port}" "blktests-subsystem-$i"
> diff --git a/tests/nvme/003 b/tests/nvme/003
> index 83d1b2ff9cb0..654ff776f6f9 100755
> --- a/tests/nvme/003
> +++ b/tests/nvme/003
> @@ -21,7 +21,7 @@ test() {
>  	_setup_nvmet
>  
>  	local port
> -	port="$(_create_nvmet_port "loop")"
> +	port="$(_create_nvmet_port "${nvme_trtype}")"
>  
>  	local loop_dev
>  	loop_dev="$(losetup -f)"
> @@ -29,7 +29,7 @@ test() {
>  	_create_nvmet_subsystem "blktests-subsystem-1" "${loop_dev}"
>  	_add_nvmet_subsys_to_port "${port}" "blktests-subsystem-1"
>  
> -	_nvme_connect_subsys loop nqn.2014-08.org.nvmexpress.discovery
> +	_nvme_connect_subsys "${nvme_trtype}" nqn.2014-08.org.nvmexpress.discovery
>  
>  	# This is ugly but checking for the absence of error messages is ...
>  	sleep 10
> diff --git a/tests/nvme/004 b/tests/nvme/004
> index 1a3eedd634cf..0a62e3448e7b 100755
> --- a/tests/nvme/004
> +++ b/tests/nvme/004
> @@ -22,7 +22,7 @@ test() {
>  	_setup_nvmet
>  
>  	local port
> -	port="$(_create_nvmet_port "loop")"
> +	port="$(_create_nvmet_port "${nvme_trtype}")"
>  
>  	truncate -s 1G "$TMPDIR/img"
>  
> @@ -33,10 +33,10 @@ test() {
>  		"91fdba0d-f87b-4c25-b80f-db7be1418b9e"
>  	_add_nvmet_subsys_to_port "${port}" "blktests-subsystem-1"
>  
> -	_nvme_connect_subsys loop blktests-subsystem-1
> +	_nvme_connect_subsys "${nvme_trtype}" blktests-subsystem-1
>  
>  	local nvmedev
> -	nvmedev="$(_find_nvme_loop_dev)"
> +	nvmedev="$(_find_nvme_dev)"
>  	cat "/sys/block/${nvmedev}n1/uuid"
>  	cat "/sys/block/${nvmedev}n1/wwid"
>  
> diff --git a/tests/nvme/005 b/tests/nvme/005
> index 708e37766e0e..e97287a96a4e 100755
> --- a/tests/nvme/005
> +++ b/tests/nvme/005
> @@ -22,7 +22,7 @@ test() {
>  	_setup_nvmet
>  
>  	local port
> -	port="$(_create_nvmet_port "loop")"
> +	port="$(_create_nvmet_port "${nvme_trtype}")"
>  
>  	truncate -s 1G "$TMPDIR/img"
>  
> @@ -33,16 +33,16 @@ test() {
>  		"91fdba0d-f87b-4c25-b80f-db7be1418b9e"
>  	_add_nvmet_subsys_to_port "${port}" "blktests-subsystem-1"
>  
> -	_nvme_connect_subsys loop blktests-subsystem-1
> +	_nvme_connect_subsys "${nvme_trtype}" blktests-subsystem-1
>  
>  	local nvmedev
> -	nvmedev="$(_find_nvme_loop_dev)"
> +	nvmedev="$(_find_nvme_dev)"
>  
>  	udevadm settle
>  
>  	echo 1 > "/sys/class/nvme/${nvmedev}/reset_controller"
>  
> -	_nvme_disconnect_ctrl ${nvmedev}
> +	_nvme_disconnect_ctrl "${nvmedev}"

Sorry... looks like you fixed the quotes in the wrong patch... The
quotes here (and in a number of other places) were removed in the
previous patch then fixed up in this one... Maybe run "make check" on
each patch individually?

Besides this nit, I don't see any other issues.

Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>

Thanks,

Logan



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux