diff mbox series

[blktests,v1,3/5] nvme/rc: do not issue warnings on cleanup when using fc transport

Message ID 20240206131655.32050-4-dwagner@suse.de (mailing list archive)
State New, archived
Headers show
Series fc transport cleanups | expand

Commit Message

Daniel Wagner Feb. 6, 2024, 1:16 p.m. UTC
When running the tests with FC as transport and the udev auto connect
enabled, discovery controllers are created and destroys while the tests
are running.

The cleanup code expects that all devices are under blktetsts control,
but this isn't the case. So just disable the warning as it is reporting
a lot of false positives.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 tests/nvme/rc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Shinichiro Kawasaki Feb. 7, 2024, 9:59 a.m. UTC | #1
On Feb 06, 2024 / 14:16, Daniel Wagner wrote:
> When running the tests with FC as transport and the udev auto connect
> enabled, discovery controllers are created and destroys while the tests

Same comment as the previous patch: s/destroys/destroyed/

> are running.
> 
> The cleanup code expects that all devices are under blktetsts control,

s/blktetsts/blktests/

> but this isn't the case. So just disable the warning as it is reporting
> a lot of false positives.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  tests/nvme/rc | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/nvme/rc b/tests/nvme/rc
> index 9cc83afe0668..ca6a284a1e25 100644
> --- a/tests/nvme/rc
> +++ b/tests/nvme/rc
> @@ -352,7 +352,10 @@ _cleanup_nvmet() {
>  		dev="$(basename "$dev")"
>  		transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)"
>  		if [[ "$transport" == "${nvme_trtype}" ]]; then
> -			echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}"
> +			# if udev auto connect is enabled for FC we get false positives
> +			if [[ "$transport" != "fc" ]]; then
> +				echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}"
> +			fi
>  			_nvme_disconnect_ctrl "${dev}"
>  		fi
>  	done
> -- 
> 2.43.0
>
diff mbox series

Patch

diff --git a/tests/nvme/rc b/tests/nvme/rc
index 9cc83afe0668..ca6a284a1e25 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -352,7 +352,10 @@  _cleanup_nvmet() {
 		dev="$(basename "$dev")"
 		transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)"
 		if [[ "$transport" == "${nvme_trtype}" ]]; then
-			echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}"
+			# if udev auto connect is enabled for FC we get false positives
+			if [[ "$transport" != "fc" ]]; then
+				echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}"
+			fi
 			_nvme_disconnect_ctrl "${dev}"
 		fi
 	done