diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 5f52ef127..706e4d797 100644 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -217,6 +217,9 @@ function revert_soft_roce() { } function check_ip_is_soft_roce() { + if [ "$TEST_TRANSPORT" != "rdma" ]; then + return 0 + fi rxe_cfg status rxe | grep -wq "$1" } diff --git a/test/nvmf/host/bdevperf.sh b/test/nvmf/host/bdevperf.sh index 776550c4d..2883144e6 100755 --- a/test/nvmf/host/bdevperf.sh +++ b/test/nvmf/host/bdevperf.sh @@ -23,7 +23,7 @@ function tgt_init() { nvmftestinit # There is an intermittent error relating to this test and Soft-RoCE. for now, just # skip this test if we are using rxe. TODO: get to the bottom of GitHub issue #1165 -if [ $TEST_TRANSPORT == "rdma" ] && check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then +if check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then echo "Using software RDMA, skipping the host bdevperf tests." exit 0 fi diff --git a/test/nvmf/host/target_disconnect.sh b/test/nvmf/host/target_disconnect.sh index 82521196b..5fe3b2c6a 100755 --- a/test/nvmf/host/target_disconnect.sh +++ b/test/nvmf/host/target_disconnect.sh @@ -75,7 +75,7 @@ function nvmf_target_disconnect_tc3() { nvmftestinit # There is an intermittent error relating to this test and Soft-RoCE. for now, just # skip this test if we are using rxe. TODO: get to the bottom of GitHub issue #1043 -if [ $TEST_TRANSPORT == "rdma" ] && check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then +if check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then echo "Using software RDMA, skipping the target disconnect tests." else run_test "nvmf_target_disconnect_tc1" nvmf_target_disconnect_tc1 diff --git a/test/nvmf/target/shutdown.sh b/test/nvmf/target/shutdown.sh index 585756cfc..662c53b80 100755 --- a/test/nvmf/target/shutdown.sh +++ b/test/nvmf/target/shutdown.sh @@ -149,7 +149,7 @@ function nvmf_shutdown_tc3() { # The shutdown tests create a lot of edge cases that Soft-RoCE doesn't respond well to. # Specifically Soft-RoCE will return invalid values in the WC field after a qp has been # destroyed which lead to NULL pointer references not seen in real hardware. -if [ $TEST_TRANSPORT == "rdma" ] && check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then +if check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then echo "Using software RDMA, skipping the shutdown tests." exit 0 fi