test/nmic: Using multi-ports to test muti-paths.
Host connects to nvmf in multiple paths, that we can use different ports on one nic to test this case. Then this case can be tested on all machines even though they have only one nic. Signed-off-by: yidong0635 <dongx.yi@intel.com> Change-Id: I021e2e1923361ecb4de1e260b2c277f7719f8335 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3590 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
fa01f99692
commit
d617125df2
@ -13,8 +13,6 @@ rpc_py="$rootdir/scripts/rpc.py"
|
||||
nvmftestinit
|
||||
nvmfappstart -m 0xF
|
||||
|
||||
NVMF_SECOND_TARGET_IP=$(echo "$RDMA_IP_LIST" | sed -n 2p)
|
||||
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
# Create subsystems
|
||||
@ -37,19 +35,17 @@ else
|
||||
echo " Adding namespace failed - expected result."
|
||||
fi
|
||||
|
||||
echo "test case2: host connect to nvmf target in multiple paths"
|
||||
if [ -n "$NVMF_SECOND_TARGET_IP" ]; then
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_SECOND_TARGET_IP -s $NVMF_PORT
|
||||
echo "test case2: host connect to nvmf target in multiple paths, using different ports between 49152 and 65535"
|
||||
NVMF_PORT2=49152
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT2"
|
||||
nvme connect -t $TEST_TRANSPORT -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"
|
||||
nvme connect -t $TEST_TRANSPORT -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT2"
|
||||
|
||||
nvme connect -t $TEST_TRANSPORT -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"
|
||||
nvme connect -t $TEST_TRANSPORT -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_SECOND_TARGET_IP" -s "$NVMF_PORT"
|
||||
waitforserial "$NVMF_SERIAL"
|
||||
|
||||
waitforserial "$NVMF_SERIAL"
|
||||
$rootdir/scripts/fio.py -p nvmf -i 4096 -d 1 -t write -r 1 -v
|
||||
|
||||
$rootdir/scripts/fio.py -p nvmf -i 4096 -d 1 -t write -r 1 -v
|
||||
fi
|
||||
|
||||
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1" || true
|
||||
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1"
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user