test/nvmf: use waitforserial instead of waitforblk

Use serial number to identify connected nvme subsystem.
/dev/nvmeX might be taken by some other device which is
not even a part of the tests.
It also might be affected by previous tests and not
always show up with the expected name.

Fixes #1308

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8d0e1b05f22a1263340014abdaf557f0fef5ad82
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1408
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Karol Latecki 2020-03-23 13:33:51 +01:00 committed by Tomasz Zawadzki
parent f7e9e764be
commit ec42f1a81f

View File

@ -34,10 +34,8 @@ do
done done
for i in $(seq 1 $NVMF_SUBSYS); do for i in $(seq 1 $NVMF_SUBSYS); do
k=$((i-1))
nvme connect -t $TEST_TRANSPORT -n "nqn.2016-06.io.spdk:cnode${i}" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT" nvme connect -t $TEST_TRANSPORT -n "nqn.2016-06.io.spdk:cnode${i}" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"
waitforserial SPDK$i
waitforblk "nvme${k}n1"
done done
$rootdir/scripts/fio.py -p nvmf -i 262144 -d 64 -t read -r 10 $rootdir/scripts/fio.py -p nvmf -i 262144 -d 64 -t read -r 10