Thread (7 messages) 7 messages, 3 authors, 2022-09-01

Re: [PATCH blktests] nvme/043,044,045: load dh_generic module

From: Sagi Grimberg <sagi@grimberg.me>
Date: 2022-08-31 13:38:13
Also in: linux-nvme


On 8/31/22 16:32, Sagi Grimberg wrote:
quoted
Test cases nvme/043, 044 and 045 use DH group which relies on dh_generic
module. When the module is built as a loadable module, the test cases
fail since the module is not loaded at test case runs.

To avoid the failures, load the dh_generic module at the preparation
step of the test cases. Also unload it at test end for clean up.

Reported-by: Sagi Grimberg <sagi@grimberg.me>
Fixes: 38d7c5e8400f ("nvme/043: test hash and dh group variations for 
authenticated connections")
Fixes: 63bdf9c16b19 ("nvme/044: test bi-directional authentication")
Fixes: 7640176ef7cc ("nvme/045: test re-authentication")
Signed-off-by: Shin'ichiro Kawasaki <redacted>
Link: 
https://lore.kernel.org/linux-block/a5c3c8e7-4b0a-9930-8f90-e534d2a82bdf@grimberg.me/ (local) 

---
  tests/nvme/043 | 4 ++++
  tests/nvme/044 | 4 ++++
  tests/nvme/045 | 4 ++++
  3 files changed, 12 insertions(+)
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
You should not do this, dh_generic might have been
loaded unrelated to this test, you shouldn't just
blindly unload it.
btw, even failing with a reasonable error message is fine rather
than loading dh_generic, the problem is that now it will fail the test
in a way that. requires to open the code in order to understand what 
happened.

Perhaps the original commit is better...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help