Commit 8bd0514b authored by Cunyin Chang's avatar Cunyin Chang Committed by Ben Walker
Browse files

test: remove unused test code for iscsi hotplug.



Change-Id: I53c7911bfd1a530f37d5eddd22ab1611ac9d763e
Signed-off-by: default avatarCunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/386370


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 9124d31b
Loading
Loading
Loading
Loading
+0 −47
Original line number Diff line number Diff line
@@ -5,17 +5,6 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh

function linux_iter_pci {
	# Argument is the class code
	# TODO: More specifically match against only class codes in the grep
	# step.
	lspci -mm -n -D | grep $1 | tr -d '"' | awk -F " " '{print $1}'
}

function linux_remove_nvme_devices() {
	echo 1 > "/sys/bus/pci/devices/$bdf/remove"
}

function running_config() {
	# generate a config file from the running iscsi_tgt
	#  running_config.sh will leave the file at /tmp/iscsi.conf
@@ -135,42 +124,6 @@ set -e
iscsicleanup
$rpc_py delete_target_node 'iqn.2016-06.io.spdk:Target3'

# Disable the following hotplug test, since the pci rescan at the end of the
#  test is causing rather frequent system hangs with emulated NVMe devices
#  in VMs.

#if [ -z "$NO_NVME" ]; then
#$rpc_py construct_target_node Target3 Target3_alias HotInNvme0n1:0 1:2 64 1 0 0 0
#iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
#iscsiadm -m node --login -p $TARGET_IP:$PORT
#sleep 1
#$fio_py 1048576 128 rw 10 &
#fio_pid=$!

#sleep 3

#set +e

#for bdf in $(linux_iter_pci 0108); do
#	linux_remove_nvme_devices "$bdf"
#done

#wait $fio_pid
#fio_status=$?

#if [ $fio_status -eq 0 ]; then
#	echo "fio successful - expected failure"
#	iscsicleanup
#	rm -f $testdir/iscsi.conf
#	killprocess $pid
#	exit 1
#else
#	echo "fio failed as expected"
#fi
#fi

#set -e

rm -f ./local-job0-0-verify.state
trap - SIGINT SIGTERM EXIT
iscsicleanup