]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/test/nvmf/host/identify_kernel_nvmf.sh
import 15.2.0 Octopus source
[ceph.git] / ceph / src / spdk / test / nvmf / host / identify_kernel_nvmf.sh
index d6afe52f81709f213caadddf3252587fbdfef475..233a8c2fe3d97f0ff2a11dc8622b6f696e1888fa 100755 (executable)
@@ -6,13 +6,7 @@ source $rootdir/test/common/autotest_common.sh
 source $rootdir/test/nvmf/common.sh
 
 set -e
-
-RDMA_IP_LIST=$(get_available_rdma_ips)
-NVMF_FIRST_TARGET_IP=$(echo "$RDMA_IP_LIST" | head -n 1)
-if [ -z $NVMF_FIRST_TARGET_IP ]; then
-       echo "no NIC for nvmf test"
-       exit 0
-fi
+nvmftestinit
 
 timing_enter identify_kernel_nvmf_tgt
 
@@ -50,13 +44,13 @@ ln -s /sys/kernel/config/nvmet/subsystems/$subsystemname /sys/kernel/config/nvme
 sleep 4
 
 $rootdir/examples/nvme/identify/identify -r "\
-       trtype:RDMA \
+       trtype:$TEST_TRANSPORT \
        adrfam:IPv4 \
        traddr:$NVMF_FIRST_TARGET_IP \
        trsvcid:$NVMF_PORT \
        subnqn:nqn.2014-08.org.nvmexpress.discovery" -t all
 $rootdir/examples/nvme/identify/identify -r "\
-       trtype:RDMA \
+       trtype:$TEST_TRANSPORT \
        adrfam:IPv4 \
        traddr:$NVMF_FIRST_TARGET_IP \
        trsvcid:$NVMF_PORT \
@@ -77,4 +71,5 @@ rmmod nvmet-rdma
 rmmod null_blk
 rmmod nvmet
 
+nvmftestfini
 timing_exit identify_kernel_nvmf_tgt