Commit 178b06b4 authored by Jim Harris's avatar Jim Harris
Browse files

test/nvmf: fix some nvme_cli.sh test issues



1) remove unnecessary disconnect for cnode2 - this
   subsystem doesn't exist (and the || true was
   hiding the failure
2) remove || true from the cnode1 disconnect
3) remove extra spaces when assigning nvme_model -
   maybe these spaces are OK on some versions of
   bash, but when I run this locally this doesn't
   work at all
4) remove trailing spaces from model returned by
   identify data before comparison

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: If3dd7ddc2ba44fc880e5b398b5fe0922b6637b80

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454689


Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarSeth Howell <seth.howell5141@gmail.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 03c30943
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ nvme list
for ctrl in /dev/nvme?; do
	nvme id-ctrl $ctrl
	nvme smart-log $ctrl
	nvme_model = $(nvme id-ctrl $ctrl | grep -w mn | sed 's/^.*: //')
	nvme_model=$(nvme id-ctrl $ctrl | grep -w mn | sed 's/^.*: //' | sed 's/ *$//')
	if [ "$nvme_model" != "SPDK_Controller1" ]; then
		echo "Wrong model number for controller" $nvme_model
		exit 1
@@ -56,8 +56,7 @@ for ns in /dev/nvme?n*; do
	nvme id-ns $ns
done

nvme disconnect -n "nqn.2016-06.io.spdk:cnode1" || true
nvme disconnect -n "nqn.2016-06.io.spdk:cnode2" || true
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1"

if [ -d  $spdk_nvme_cli ]; then
	# Test spdk/nvme-cli NVMe-oF commands: discover, connect and disconnect