diff mbox series

[blktests,06/10] common/nvme: add '--tls' argument to _nvme_connect_subsys()

Message ID 20250402070906.393160-7-shinichiro.kawasaki@wdc.com (mailing list archive)
State New
Headers show
Series nvme: test cases for TLS support | expand

Commit Message

Shinichiro Kawasaki April 2, 2025, 7:09 a.m. UTC
From: Hannes Reinecke <hare@suse.de>

To start TLS-encrypted connections.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 common/nvme | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/common/nvme b/common/nvme
index 3761329..9327dff 100644
--- a/common/nvme
+++ b/common/nvme
@@ -274,6 +274,7 @@  _nvme_connect_subsys() {
 	local no_wait=false
 	local hdr_digest=false
 	local data_digest=false
+	local tls=false
 	local port
 	local i
 	local -a ARGS
@@ -340,6 +341,10 @@  _nvme_connect_subsys() {
 				data_digest=true
 				shift 1
 				;;
+			--tls)
+				tls=true
+				shift 1
+				;;
 			*)
 				echo "WARNING: unknown argument: $1"
 				shift
@@ -397,6 +402,9 @@  _nvme_connect_subsys() {
 	if [[ ${data_digest} = true ]]; then
 		ARGS+=(--data-digest)
 	fi
+	if [[ ${tls} = true ]]; then
+		ARGS+=(--tls)
+	fi
 	ARGS+=(-o json)
 	connect=$(nvme connect "${ARGS[@]}" 2> /dev/null)