test/iscsi: disable NVMe hotplug tests in iscsi fio test script

Rescanning the devices in VMs is frequently causing a system
hang, so disable these tests for now.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I13c87730efeec0d4383fac89360ab9957df172bd

Reviewed-on: https://review.gerrithub.io/386325
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Jim Harris 2017-11-08 10:51:04 -07:00 committed by Daniel Verkamp
parent 826c9ef64a
commit 6238f566f5

View File

@ -113,46 +113,49 @@ fi
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=$!
#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
#sleep 3
set +e
#set +e
for bdf in $(linux_iter_pci 0108); do
linux_remove_nvme_devices "$bdf"
done
#for bdf in $(linux_iter_pci 0108); do
# linux_remove_nvme_devices "$bdf"
#done
wait $fio_pid
fio_status=$?
#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
#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
#set -e
rm -f ./local-job0-0-verify.state
trap - SIGINT SIGTERM EXIT
iscsicleanup
rm -f $testdir/iscsi.conf
killprocess $pid
echo 1 > /sys/bus/pci/rescan
sleep 2
#echo 1 > /sys/bus/pci/rescan
#sleep 2
$rootdir/scripts/setup.sh
timing_exit fio