From 0e1dcce24a7518d5ae1fb42e8b12be7a1cc24ed2 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Mon, 25 Jul 2016 08:20:11 -0700 Subject: [PATCH] nvmf: Disconnect the initiator on test exit. Change-Id: I8e640a77dc4c17582ff5ec0a4daba4f1d509c30c Signed-off-by: Ben Walker --- test/nvmf/common.sh | 2 -- test/nvmf/filesystem/filesystem.sh | 3 +++ test/nvmf/fio/fio.sh | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 83515929e..031541363 100755 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -81,8 +81,6 @@ function allocate_nic_ips() function nvmfcleanup() { - sync - sleep 5 sync rmmod nvme-rdma } diff --git a/test/nvmf/filesystem/filesystem.sh b/test/nvmf/filesystem/filesystem.sh index 2815f4316..4311f180b 100755 --- a/test/nvmf/filesystem/filesystem.sh +++ b/test/nvmf/filesystem/filesystem.sh @@ -60,6 +60,9 @@ for dev in $devs; do done done +sync +nvme disconnect -n "nqn.2016-06.io.spdk:cnode1" + trap - SIGINT SIGTERM EXIT nvmfcleanup diff --git a/test/nvmf/fio/fio.sh b/test/nvmf/fio/fio.sh index afe121083..b1db82fc2 100755 --- a/test/nvmf/fio/fio.sh +++ b/test/nvmf/fio/fio.sh @@ -35,6 +35,9 @@ $testdir/nvmf_fio.py 4096 1 randrw 1 verify $testdir/nvmf_fio.py 4096 128 rw 1 verify $testdir/nvmf_fio.py 4096 128 randrw 1 verify +sync +nvme disconnect -n "nqn.2016-06.io.spdk:cnode1" + rm -f ./local-job0-0-verify.state trap - SIGINT SIGTERM EXIT