diff mbox series

[blktests] nvme/039: avoid module loads for various transport types

Message ID 20220610121518.548549-1-shinichiro.kawasaki@wdc.com (mailing list archive)
State New, archived
Headers show
Series [blktests] nvme/039: avoid module loads for various transport types | expand

Commit Message

Shinichiro Kawasaki June 10, 2022, 12:15 p.m. UTC
The test case nvme/039 does not depend on nvme transport type and does
not require modules for the transport types. The _nvme_requires call in
requires() loads the modules and those modules are left unloaded after
the test case run. This causes failures of following nvmeof-mp test runs
with message:

  modprobe: FATAL: Module nvmet is in use.

To avoid the unnecessary module loads, remove _nvme_requires call.
Instead, just check existence of nvme command.

Fixes: 9accb5f86670 ("tests/nvme: add tests for error logging")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/nvme/039 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chaitanya Kulkarni June 13, 2022, 5:51 a.m. UTC | #1
On 6/10/2022 5:15 AM, Shin'ichiro Kawasaki wrote:
> The test case nvme/039 does not depend on nvme transport type and does
> not require modules for the transport types. The _nvme_requires call in
> requires() loads the modules and those modules are left unloaded after
> the test case run. This causes failures of following nvmeof-mp test runs
> with message:
> 
>    modprobe: FATAL: Module nvmet is in use.
> 
> To avoid the unnecessary module loads, remove _nvme_requires call.
> Instead, just check existence of nvme command.
> 
> Fixes: 9accb5f86670 ("tests/nvme: add tests for error logging")
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> ---

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
Shinichiro Kawasaki June 14, 2022, 8:25 a.m. UTC | #2
On Jun 10, 2022 / 16:08, Alan Adamson wrote:
> Reviewed-by: Alan Adamson <alan.adamson@oracle.com>
> 
> 
> > On Jun 10, 2022, at 5:15 AM, Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> wrote:
> > 
> > The test case nvme/039 does not depend on nvme transport type and does
> > not require modules for the transport types. The _nvme_requires call in
> > requires() loads the modules and those modules are left unloaded after
> > the test case run. This causes failures of following nvmeof-mp test runs
> > with message:
> > 
> >  modprobe: FATAL: Module nvmet is in use.
> > 
> > To avoid the unnecessary module loads, remove _nvme_requires call.
> > Instead, just check existence of nvme command.
> > 
> > Fixes: 9accb5f86670 ("tests/nvme: add tests for error logging")
> > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

Alan, Chaitanya, thank you for the reviewed-by tags. I've applied it.
diff mbox series

Patch

diff --git a/tests/nvme/039 b/tests/nvme/039
index 9ed5059..85827fa 100755
--- a/tests/nvme/039
+++ b/tests/nvme/039
@@ -13,7 +13,7 @@  DESCRIPTION="test error logging"
 QUICK=1
 
 requires() {
-	_nvme_requires
+	_have_program nvme
 	_have_kernel_option FAULT_INJECTION && \
 	    _have_kernel_option FAULT_INJECTION_DEBUG_FS
 }