Skip to content

Commit b6a7ca0

Browse files
committed
nvme/rc: fix rdma driver check
Since the commit 4824ac3 ("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 <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent 1aeff01 commit b6a7ca0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • tests/nvme

tests/nvme/rc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ _nvme_requires() {
4444
_have_driver nvmet-rdma
4545
_have_configfs
4646
_have_program rdma
47-
_have_driver rdma_rxe || _have_driver siw
47+
if [ -n "$use_rxe" ]; then
48+
_have_driver rdma_rxe
49+
else
50+
_have_driver siw
51+
fi
4852
;;
4953
fc)
5054
_have_driver nvme-fc

0 commit comments

Comments
 (0)