Commit a8e1295d authored by Jim Harris's avatar Jim Harris Committed by Ben Walker
Browse files

test/iscsi_tgt: use stub application



The stub application will ensure that each
iSCSI test does not need to reinitialized DPDK
memory and NVMe devices.  This drastically
cuts down on the amount of time needed to run
all of the iscsi_tgt tests.

While here, add a new common ISCSI_TEST_CORE_MASK
shell variable, eliminating a bunch of copies of
the 0xFFFF core mask, and ensuring the stub application
chooses a core mask that overlaps all of the iscsi_tgt
test cases.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Ifae73276923258ff64370ae42e19cf1a4a2c2212

Reviewed-on: https://review.gerrithub.io/362454


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 7c347821
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -227,6 +227,21 @@ function rbd_cleanup() {
	fi
}

function start_stub() {
	$rootdir/test/app/stub/stub $1 &
	stubpid=$!
	echo Waiting for stub to ready for secondary processes...
	while ! [ -e /var/run/.spdk0_config ]; do
		sleep 0.1s
	done
	echo done.
}

function kill_stub() {
	kill $stubpid
	rm -rf /var/run/.spdk0_config
}

function run_test() {
	set +x
	echo "************************************"
+4 −0
Original line number Diff line number Diff line
@@ -11,3 +11,7 @@ fi
if [ -z "$ISCSI_APP" ]; then
	ISCSI_APP=./app/iscsi_tgt/iscsi_tgt
fi

if [ -z "$ISCSI_TEST_CORE_MASK" ]; then
	ISCSI_TEST_CORE_MASK=0xFFFF
fi
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ rpc_py="python $rootdir/scripts/rpc.py"

timing_enter start_iscsi_tgt

$ISCSI_APP -c $testdir/iscsi.conf -m 0xFFFF &
$ISCSI_APP -c $testdir/iscsi.conf -m $ISCSI_TEST_CORE_MASK &
pid=$!
echo "Process pid: $pid"

+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ fio_py="python $rootdir/scripts/fio.py"

timing_enter start_iscsi_tgt

$ISCSI_APP -c $testdir/iscsi.conf -m 0xFFFF &
$ISCSI_APP -c $testdir/iscsi.conf -m $ISCSI_TEST_CORE_MASK &
pid=$!
echo "Process pid: $pid"

+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ do
	timing_enter start_iscsi_tgt_$i

	# TODO: run the different iSCSI instances on non-overlapping CPU masks
	$ISCSI_APP -c $testdir/iscsi.conf.$i -s 1000 -i $i -m 0xFFFF &
	$ISCSI_APP -c $testdir/iscsi.conf.$i -s 1000 -i $i -m $ISCSI_TEST_CORE_MASK &
	pid=$!
	echo "Process pid: $pid"

Loading