public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Cc: Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH blktests] nvme/043,044,045: load dh_generic module
Date: Wed, 31 Aug 2022 16:37:52 +0300	[thread overview]
Message-ID: <89aedf1d-ae08-adef-db29-17e5bf85d054@grimberg.me> (raw)
In-Reply-To: <dc677c86-284c-21c2-ff42-ce40a1797613@grimberg.me>



On 8/31/22 16:32, Sagi Grimberg wrote:
> 
>> 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 <shinichiro.kawasaki@wdc.com>
>> Link: 
>> https://lore.kernel.org/linux-block/a5c3c8e7-4b0a-9930-8f90-e534d2a82bdf@grimberg.me/ 
>>
>> ---
>>   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...

  reply	other threads:[~2022-08-31 13:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31  5:27 [PATCH blktests] nvme/043,044,045: load dh_generic module Shin'ichiro Kawasaki
2022-08-31 10:44 ` Chaitanya Kulkarni
2022-08-31 10:45 ` Chaitanya Kulkarni
2022-09-01  6:35   ` Shinichiro Kawasaki
2022-08-31 13:32 ` Sagi Grimberg
2022-08-31 13:37   ` Sagi Grimberg [this message]
2022-09-01  6:33     ` 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=89aedf1d-ae08-adef-db29-17e5bf85d054@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=hare@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=shinichiro.kawasaki@wdc.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