Commit 20f4a21d authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Ben Walker
Browse files

test/nvmf/nvme-cli: don't run nvme-cli as secondary process



nvme-cli in NVMf tests currently fails to initialize
the NVMe driver and exits straight away [1]. It expects
the primary process to initialize the driver first, but
since the primary process doesn't operate on any NVMe
devices, it doesn't initialize the driver at all.

Fix this by running nvme-cli without multi-process mode.
In NVMf tests, nvme-cli is only used to discover, connect
and disconnect from an SPDK NVMf target. It does not need
to access any shared memory resources.

This wasn't an issue before, because we used an outdated
DPDK version for nvme-cli which didn't detect any other
shared memory processes of SPDK.

[1] nvme.c: 337:nvme_driver_init: *ERROR*: primary process
is not started yet

Change-Id: Id56f94c6655049e87ab9d93ee38853faf40a11e5
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442552


Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarSeth Howell <seth.howell5141@gmail.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 0c0d9d4e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ bdf=$(echo $bdfs|awk '{ print $1 }')
cd $spdk_nvme_cli
make clean && make -j$(nproc) LDFLAGS="$(make -s -C $spdk_nvme_cli/spdk ldflags)"
sed -i 's/spdk=0/spdk=1/g' spdk.conf
sed -i 's/shm_id=1/shm_id=0/g' spdk.conf
sed -i 's/shm_id=.*/shm_id=0/g' spdk.conf
./nvme list
./nvme id-ctrl $bdf
./nvme list-ctrl $bdf
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ nvme disconnect -n "nqn.2016-06.io.spdk:cnode2" || true
if [ -d  $spdk_nvme_cli ]; then
	# Test spdk/nvme-cli NVMe-oF commands: discover, connect and disconnect
	cd $spdk_nvme_cli
	sed -i 's/shm_id=.*/shm_id=-1/g' spdk.conf
	./nvme discover -t rdma -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT"
	nvme_num_before_connection=$(nvme list |grep "/dev/nvme*"|awk '{print $1}'|wc -l)
	./nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"