]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
nvme/rc: fix rdma driver check
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 5 Oct 2023 08:02:42 +0000 (17:02 +0900)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 12 Oct 2023 03:46:44 +0000 (12:46 +0900)
Since the commit 4824ac3f5c4a ("Skip tests based on SKIP_REASON, not
return value"), blktests no longer checks return values of _have_foo
helpers. Instead, it checks if _have_foo helpers set SKIP_REASON, which
was renamed to SKIP_REASONS later, to judge test case skip. If two
_have_foo helpers are chained with ||, the skip check does not work as
expected since one of the helper may set SKIP_REASONS even when the
other does not set. Such chain with || is done in _nvme_requires() to
check rdma drivers.

To fix the check, do not chain the helper functions with || operator.
Instead, refer $use_rxe to call only the required function.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/nvme/rc

index 1ec9eb64633035bba215a601d71ef0e8cd70b628..bac2db72d1c1d7397c822e7b5ce2a3b1e051683f 100644 (file)
@@ -44,7 +44,11 @@ _nvme_requires() {
                _have_driver nvmet-rdma
                _have_configfs
                _have_program rdma
-               _have_driver rdma_rxe || _have_driver siw
+               if [ -n "$use_rxe" ]; then
+                       _have_driver rdma_rxe
+               else
+                       _have_driver siw
+               fi
                ;;
        fc)
                _have_driver nvme-fc