]> www.infradead.org Git - users/hch/blktests.git/commitdiff
nvmeof-mp/rc: Avoid skipping tests due to the expected SKIP_REASON
authorXiao Yang <yangx.jy@fujitsu.com>
Fri, 24 Jun 2022 07:50:23 +0000 (15:50 +0800)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 24 Jun 2022 23:22:31 +0000 (08:22 +0900)
In _have_kernel_option(), SKIP_REASON = "kernel option NVME_MULTIPATH
has not been enabled" is expected but all nvmeof-mp tests are skipped
due to the SKIP_REASON. For example:
-----------------------------------------------------
./check nvmeof-mp/001
nvmeof-mp/***                                                [not run]
    kernel option NVME_MULTIPATH has not been enabled
-----------------------------------------------------

Avoid the issue by unsetting the SKIP_REASON.

Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
Fixes: 7ae143852f6c ("common/rc: don't unset previous SKIP_REASON in _have_kernel_option()")
[Shin'ichiro: reduced in-line comment]
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/nvmeof-mp/rc

index dcb2e3c71093061c52bdf3a9a0d795d7fb3ef075..708196b4eeeedfb5b8533bdcd84eac48acb80aaf 100755 (executable)
@@ -24,6 +24,9 @@ and multipathing has been enabled in the nvme_core kernel module"
                return
        fi
 
+       # Avoid test skip due to SKIP_REASON set by _have_kernel_option().
+       unset SKIP_REASON
+
        _have_configfs || return
        required_modules=(
                dm_multipath