[PATCH blktests] nvme/63: fixup tls_key encryption check

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

 



From: Wilfred Mallawa <wilfred.mallawa@xxxxxxx>

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@xxxxxxx>
---
 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





[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