]> www.infradead.org Git - users/hch/blktests.git/commitdiff
nvme/039: avoid module loads for various transport types
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 10 Jun 2022 12:15:18 +0000 (21:15 +0900)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tue, 14 Jun 2022 08:19:34 +0000 (17:19 +0900)
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: Alan Adamson <alan.adamson@oracle.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
tests/nvme/039

index 9ed5059787a3511f5f474f2ac9662f5361b53f0e..85827fae629d92e9f51364794b9b3dd131b0fcaa 100755 (executable)
@@ -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
 }