Skip to content

Commit 613b837

Browse files
twilfredokawasaki
authored andcommitted
nvme/063: fixup tls_key encryption check
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: #168 Fixes: 9aa2023 ("nvme: add testcase for secure concatenation") Signed-off-by: Wilfred Mallawa <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent 4348daa commit 613b837

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/nvme/063

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ test() {
9393
_nvme_connect_subsys --dhchap-secret "${hostkey}" --concat
9494

9595
ctrl=$(_find_nvme_dev "${def_subsysnqn}")
96-
if _nvme_ctrl_tls_key "$ctrl" > /dev/null ; then
96+
if ! _nvme_ctrl_tls_key "$ctrl" > /dev/null ; then
9797
echo "WARNING: connection is not encrypted"
9898
_systemctl_stop
9999
return 1

0 commit comments

Comments
 (0)