Commit dbb84dd5 authored by Karol Latecki's avatar Karol Latecki Committed by Tomasz Zawadzki
Browse files

test/iscsi: run cleanup once before running the tests



Run iscsicleanup once before running the tests. This is
to ensure we delete any stale entries or files if they
were not removed properly in previous test runs.

Fixes #1311

Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Change-Id: Idb415adddfaa7cbb443377a292fae357c1707e79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1539


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 99cff835
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -578,6 +578,7 @@ function iscsicleanup() {
	echo "Cleaning up iSCSI connection"
	iscsiadm -m node --logout || true
	iscsiadm -m node -o delete || true
	rm -rf /var/lib/iscsi/nodes/*
}

function stop_iscsi_service() {
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,10 @@ else
	exit 1
fi

# Run cleanup once to make sure we remove any stale iscsiadm
# entries if they were missed in previous runs
iscsicleanup

# Network configuration
create_veth_interfaces $TEST_TYPE