test/nvmf: handle 'nvme disconnect' non-0 return

Newer versions of nvme-cli return a non-zero status from the disconnect
command when it is successful.  Catch this in the test scripts so that
the tests don't consider this a failure.

Change-Id: I3abf4042ec8b0bc8aed5a4c36128ae73230aa190
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2017-03-03 16:53:59 -07:00
parent 6a03451228
commit 3139c76394
4 changed files with 7 additions and 7 deletions

View File

@ -71,8 +71,8 @@ for dev in $devs; do
done
sync
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1"
nvme disconnect -n "nqn.2016-06.io.spdk:cnode2"
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1" || true
nvme disconnect -n "nqn.2016-06.io.spdk:cnode2" || true
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode2

View File

@ -44,8 +44,8 @@ $testdir/nvmf_fio.py 4096 128 write 1 verify
$testdir/nvmf_fio.py 4096 128 randwrite 1 verify
sync
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1"
nvme disconnect -n "nqn.2016-06.io.spdk:cnode2"
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1" || true
nvme disconnect -n "nqn.2016-06.io.spdk:cnode2" || true
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode2

View File

@ -44,7 +44,7 @@ $testdir/../fio/nvmf_fio.py 262144 64 randwrite 10
sync
for i in `seq 1 12`; do
nvme disconnect -n "nqn.2016-06.io.spdk:cnode${i}"
nvme disconnect -n "nqn.2016-06.io.spdk:cnode${i}" || true
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode${i}
done

View File

@ -48,8 +48,8 @@ for ns in /dev/nvme?n*; do
nvme id-ns $ns
done
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1"
nvme disconnect -n "nqn.2016-06.io.spdk:cnode2"
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1" || true
nvme disconnect -n "nqn.2016-06.io.spdk:cnode2" || true
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode2