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

Shinichiro Kawasaki shinichiro.kawasaki at wdc.com
Tue Aug 30 03:23:57 PDT 2022


On Aug 30, 2022 / 10:05, Sagi Grimberg wrote:
> 
> > Hi Sagi,
> > 
> > On Aug 29, 2022 / 11:36, Sagi Grimberg wrote:
> > > Signed-off-by: Sagi Grimberg <sagi at 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


More information about the Linux-nvme mailing list