numam-spdk/test/iscsi_tgt/iscsi_tgt.sh
Jim Harris a8e1295d4b 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: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifae73276923258ff64370ae42e19cf1a4a2c2212

Reviewed-on: https://review.gerrithub.io/362454
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-25 16:55:03 -04:00

49 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)
source $rootdir/scripts/autotest_common.sh
if [ ! $(uname -s) = Linux ]; then
exit 0
fi
export TARGET_IP=127.0.0.1
export INITIATOR_IP=127.0.0.1
source $rootdir/test/iscsi_tgt/common.sh
timing_enter iscsi_tgt
# ISCSI_TEST_CORE_MASK is the biggest core mask specified by
# any of the iscsi_tgt tests. Using this mask for the stub
# ensures that if this mask spans CPU sockets, that we will
# allocate memory from both sockets. The stub will *not*
# run anything on the extra cores (and will sleep on master
# core 0) so there is no impact to the iscsi_tgt tests by
# specifying the bigger core mask.
start_stub "-s 2048 -i 0 -m $ISCSI_TEST_CORE_MASK"
trap "kill_stub; exit 1" SIGINT SIGTERM EXIT
export ISCSI_APP="./app/iscsi_tgt/iscsi_tgt -i 0"
run_test ./test/iscsi_tgt/calsoft/calsoft.sh
run_test ./test/iscsi_tgt/filesystem/filesystem.sh
run_test ./test/iscsi_tgt/fio/fio.sh
run_test ./test/iscsi_tgt/reset/reset.sh
run_test ./test/iscsi_tgt/rpc_config/rpc_config.sh
run_test ./test/iscsi_tgt/idle_migration/idle_migration.sh
if [ $RUN_NIGHTLY -eq 1 ]; then
run_test ./test/iscsi_tgt/ip_migration/ip_migration.sh
fi
run_test ./test/iscsi_tgt/ext4test/ext4test.sh
run_test ./test/iscsi_tgt/rbd/rbd.sh
trap - SIGINT SIGTERM EXIT
kill_stub
# TODO: enable remote NVMe controllers with multi-process so that
# we can use the stub for this test
run_test ./test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh
timing_exit iscsi_tgt