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

Shinichiro Kawasaki shinichiro.kawasaki at wdc.com
Thu Sep 8 21:14:45 PDT 2022


On Aug 31, 2022 / 04:59, Shinichiro Kawasaki wrote:
> On Aug 30, 2022 / 16:26, Sagi Grimberg wrote:
> 
> [...]
> 
> > > 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"
> > >   }
> > > 
> > 
> > That's fine with me, can you prepare an alternative patch for it?
> 
> Sure, will post it soon.

As discussed, the alternative patch I suggested was not good [1]. Then I applied
your original fix together with improvement of _have_driver() [2].

Thanks!

[1] https://lore.kernel.org/linux-block/20220901063551.djziyblzw6g2cxwd@shindev/
[2] https://lore.kernel.org/linux-block/20220902034516.223173-1-shinichiro.kawasaki@wdc.com/

-- 
Shin'ichiro Kawasaki


More information about the Linux-nvme mailing list