]> www.infradead.org Git - users/hch/blktests.git/commitdiff
tests/srp/012: Fix the displayed test status
authorBart Van Assche <bvanassche@acm.org>
Mon, 23 Aug 2021 18:10:31 +0000 (11:10 -0700)
committerOmar Sandoval <osandov@osandov.com>
Mon, 22 Nov 2021 19:13:19 +0000 (11:13 -0800)
The _have_* scripts set the SKIP_REASON variable. That variable controls
whether the status [passed] or [not run] is displayed. This patch causes
the status [passed] to be displayed instead of [not run] if legacy dm
support is not available.

Fixes: 0a2cbbd1874d ("srp and nvmeof-mp: Check whether legacy dm is supported")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
tests/srp/012

index ffd56efb9dfc5f8c04780b78646f82438bb5ff01..1a2fc6d2dc2f40c258014c89286ba05c39e62781 100755 (executable)
@@ -15,7 +15,10 @@ test_io_schedulers() {
                modprobe "$(basename "$m")" >&/dev/null
        done
        for mq in y n; do
-               [ $mq = n ] && ! _have_legacy_dm && continue
+               if [ $mq = n ] && ! _have_legacy_dm; then
+                       unset SKIP_REASON
+                       continue
+               fi
                use_blk_mq ${mq} ${mq} || return $?
                dev=$(get_bdev 0) || return $?
                dm=$(basename "$(readlink -f "${dev}")") || return $?