Thread (10 messages) 10 messages, 3 authors, 2022-09-09

Re: [PATCH blktests] nvme: add dh module requirement for tests that involve dh groups

From: Shinichiro Kawasaki <hidden>
Date: 2022-08-30 10:24:38
Also in: linux-nvme
Subsystem: the rest · Maintainer: Linus Torvalds

On Aug 30, 2022 / 10:05, Sagi Grimberg wrote:
quoted
Hi Sagi,

On Aug 29, 2022 / 11:36, Sagi Grimberg wrote:
quoted
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
  tests/nvme/043 | 1 +
  tests/nvme/044 | 1 +
  tests/nvme/045 | 1 +
  3 files changed, 3 insertions(+)
diff --git a/tests/nvme/043 b/tests/nvme/043
index 381ae755f140..87273e5b414d 100755
--- a/tests/nvme/043
+++ b/tests/nvme/043
@@ -16,6 +16,7 @@ requires() {
  	_have_kernel_option NVME_TARGET_AUTH
  	_require_nvme_trtype_is_fabrics
  	_require_nvme_cli_auth
+	_have_driver dh_generic
  }
Do you see failure without this check?
Yes, if dh_generic is built as a module (CONFIG_CRYPTO_DH=m).
Thanks. I was able to recreate the failure setting CONFIG_CRYPTO_DH=m.

Unfortunately, your patch does not avoid the failure after the recent commit
06a0ba866d90 ("common/rc: avoid module load in _have_driver()"). As the commit
title says, _have_driver no longer has the side-effect to leave the dh_generic
module loaded. Instead, I suggest to load dh_generic in the test() function:
diff --git a/tests/nvme/043 b/tests/nvme/043
index 381ae75..dbe9d3f 100755
--- a/tests/nvme/043
+++ b/tests/nvme/043
@@ -40,6 +40,8 @@ test() {

        _setup_nvmet

+       modprobe -q dh_generic
+
        truncate -s 512M "${file_path}"

        _create_nvmet_subsystem "${subsys_name}" "${file_path}"
@@ -88,5 +90,7 @@ test() {

        rm "${file_path}"

+       modprobe -qr dh_generic
+
        echo "Test complete"
 }
-- 
Shin'ichiro Kawasaki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help