From: Wilfred Mallawa <wilfred.opensource@gmail.com>
To: shinichiro.kawasaki@wdc.com, linux-block@vger.kernel.org
Cc: dlemoal@kernel.org, hare@suse.de, yi.zhang@redhat.com,
alistair.francis@wdc.com, wilfred.mallawa@wdc.com
Subject: [PATCH blktests] nvme/63: fixup tls_key encryption check
Date: Fri, 9 May 2025 09:44:00 +1000 [thread overview]
Message-ID: <20250508234359.434022-2-wilfred.opensource@gmail.com> (raw)
From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
The _nvme_ctrl_tls_key function returns 0 if `tls_key` exists in sysfs for
the respective nvme controller. This will be evaluated as true. However,
the test should error only if the key is not exposed by sysfs. Which
would mean the connection is not encrypted, as per the existing warning
message in the test. Currently, we are checking that it exists and
erroring out incorrectly. This patch fixes the above.
Link: https://github.com/osandov/blktests/issues/168
Fixes: 9aa2023312bf ("nvme: add testcase for secure concatenation")
Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
---
tests/nvme/063 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/nvme/063 b/tests/nvme/063
index 7477078..5bfe8be 100755
--- a/tests/nvme/063
+++ b/tests/nvme/063
@@ -93,7 +93,7 @@ test() {
_nvme_connect_subsys --dhchap-secret "${hostkey}" --concat
ctrl=$(_find_nvme_dev "${def_subsysnqn}")
- if _nvme_ctrl_tls_key "$ctrl" > /dev/null ; then
+ if ! _nvme_ctrl_tls_key "$ctrl" > /dev/null ; then
echo "WARNING: connection is not encrypted"
_systemctl_stop
return 1
--
2.49.0
next reply other threads:[~2025-05-08 23:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 23:44 Wilfred Mallawa [this message]
2025-05-15 12:32 ` [PATCH blktests] nvme/63: fixup tls_key encryption check Shinichiro Kawasaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250508234359.434022-2-wilfred.opensource@gmail.com \
--to=wilfred.opensource@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=dlemoal@kernel.org \
--cc=hare@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=shinichiro.kawasaki@wdc.com \
--cc=wilfred.mallawa@wdc.com \
--cc=yi.zhang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).