2017-05-10 15:01:26 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
|
|
|
rootdir=$(readlink -f $testdir/../..)
|
2018-02-27 15:14:08 -07:00
|
|
|
source $rootdir/test/common/autotest_common.sh
|
2017-05-10 15:01:26 -07:00
|
|
|
|
|
|
|
if [ ! $(uname -s) = Linux ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2017-05-24 20:58:35 -07:00
|
|
|
source $rootdir/test/iscsi_tgt/common.sh
|
|
|
|
|
2017-05-10 15:01:26 -07:00
|
|
|
timing_enter iscsi_tgt
|
2017-05-24 20:58:35 -07:00
|
|
|
|
2018-04-23 03:04:15 -04:00
|
|
|
# $1 = test type (posix/vpp)
|
|
|
|
if [ "$1" == "posix" ] || [ "$1" == "vpp" ]; then
|
|
|
|
TEST_TYPE=$1
|
|
|
|
else
|
|
|
|
echo "No iSCSI test type specified"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-04-04 09:46:41 -04:00
|
|
|
# Network configuration
|
2018-04-23 03:04:15 -04:00
|
|
|
create_veth_interfaces $TEST_TYPE
|
2018-04-04 09:46:41 -04:00
|
|
|
|
2019-08-09 10:46:01 +02:00
|
|
|
trap 'cleanup_veth_interfaces $TEST_TYPE; exit 1' SIGINT SIGTERM EXIT
|
2017-05-24 20:58:35 -07:00
|
|
|
|
2018-06-25 08:44:59 -04:00
|
|
|
run_test suite ./test/iscsi_tgt/sock/sock.sh $TEST_TYPE
|
|
|
|
if [ "$TEST_TYPE" == "posix" ]; then
|
|
|
|
# calsoft doesn't handle TCP stream properly and fails decoding iSCSI
|
|
|
|
# requests when are divided by TCP segmentation. This is very common
|
|
|
|
# situation for VPP and causes that calsoft.sh never PASS.
|
|
|
|
run_test suite ./test/iscsi_tgt/calsoft/calsoft.sh
|
|
|
|
fi
|
2018-03-13 13:57:41 +08:00
|
|
|
run_test suite ./test/iscsi_tgt/filesystem/filesystem.sh
|
|
|
|
run_test suite ./test/iscsi_tgt/reset/reset.sh
|
|
|
|
run_test suite ./test/iscsi_tgt/rpc_config/rpc_config.sh $TEST_TYPE
|
|
|
|
run_test suite ./test/iscsi_tgt/lvol/iscsi_lvol.sh
|
|
|
|
run_test suite ./test/iscsi_tgt/fio/fio.sh
|
2019-05-15 22:23:18 +02:00
|
|
|
run_test suite ./test/iscsi_tgt/qos/qos.sh
|
2018-06-25 08:44:59 -04:00
|
|
|
|
|
|
|
# IP Migration tests do not support network namespaces,
|
|
|
|
# they can only be run on posix sockets.
|
|
|
|
if [ "$TEST_TYPE" == "posix" ]; then
|
|
|
|
run_test suite ./test/iscsi_tgt/ip_migration/ip_migration.sh
|
|
|
|
fi
|
2018-11-14 22:01:51 -05:00
|
|
|
run_test suite ./test/iscsi_tgt/trace_record/trace_record.sh
|
2017-09-20 15:57:36 +02:00
|
|
|
|
2017-05-10 15:01:26 -07:00
|
|
|
if [ $RUN_NIGHTLY -eq 1 ]; then
|
2018-04-03 16:07:39 -07:00
|
|
|
if [ $SPDK_TEST_PMDK -eq 1 ]; then
|
2018-03-13 13:57:41 +08:00
|
|
|
run_test suite ./test/iscsi_tgt/pmem/iscsi_pmem.sh 4096 10
|
2017-12-15 10:40:36 -07:00
|
|
|
fi
|
2018-03-13 13:57:41 +08:00
|
|
|
run_test suite ./test/iscsi_tgt/ext4test/ext4test.sh
|
|
|
|
run_test suite ./test/iscsi_tgt/digests/digests.sh
|
2017-05-10 15:01:26 -07:00
|
|
|
fi
|
2017-07-19 16:22:38 -07:00
|
|
|
if [ $SPDK_TEST_RBD -eq 1 ]; then
|
2018-06-25 08:44:59 -04:00
|
|
|
# RBD tests do not support network namespaces,
|
|
|
|
# they can only be run on posix sockets.
|
|
|
|
if [ "$TEST_TYPE" == "posix" ]; then
|
|
|
|
run_test suite ./test/iscsi_tgt/rbd/rbd.sh
|
|
|
|
fi
|
2017-07-19 16:22:38 -07:00
|
|
|
fi
|
2017-05-24 20:58:35 -07:00
|
|
|
|
2019-08-09 10:46:01 +02:00
|
|
|
trap 'cleanup_veth_interfaces $TEST_TYPE; exit 1' SIGINT SIGTERM EXIT
|
2017-05-24 20:58:35 -07:00
|
|
|
|
2017-12-08 13:28:19 -07:00
|
|
|
if [ $SPDK_TEST_NVMF -eq 1 ]; then
|
2018-06-25 08:44:59 -04:00
|
|
|
# NVMe-oF tests do not support network namespaces,
|
|
|
|
# they can only be run on posix sockets.
|
|
|
|
if [ "$TEST_TYPE" == "posix" ]; then
|
|
|
|
# Test configure remote NVMe device from rpc and conf file
|
|
|
|
run_test suite ./test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh
|
|
|
|
fi
|
2017-12-08 13:28:19 -07:00
|
|
|
fi
|
|
|
|
|
2017-11-29 18:01:09 +08:00
|
|
|
if [ $RUN_NIGHTLY -eq 1 ]; then
|
2018-03-13 13:57:41 +08:00
|
|
|
run_test suite ./test/iscsi_tgt/multiconnection/multiconnection.sh
|
2017-11-29 18:01:09 +08:00
|
|
|
fi
|
|
|
|
|
2018-03-16 19:49:11 +08:00
|
|
|
if [ $SPDK_TEST_ISCSI_INITIATOR -eq 1 ]; then
|
2018-03-13 13:57:41 +08:00
|
|
|
run_test suite ./test/iscsi_tgt/initiator/initiator.sh
|
2018-08-23 03:19:20 -04:00
|
|
|
run_test suite ./test/iscsi_tgt/bdev_io_wait/bdev_io_wait.sh
|
2018-03-16 19:49:11 +08:00
|
|
|
fi
|
|
|
|
|
2018-04-23 03:04:15 -04:00
|
|
|
cleanup_veth_interfaces $TEST_TYPE
|
2018-04-04 09:46:41 -04:00
|
|
|
trap - SIGINT SIGTERM EXIT
|
2017-05-10 15:01:26 -07:00
|
|
|
timing_exit iscsi_tgt
|