2017-05-10 22:01:26 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
|
|
|
rootdir=$(readlink -f $testdir/../..)
|
2018-02-27 22:14:08 +00:00
|
|
|
source $rootdir/test/common/autotest_common.sh
|
2017-05-10 22:01:26 +00:00
|
|
|
|
|
|
|
if [ ! $(uname -s) = Linux ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2017-05-25 03:58:35 +00:00
|
|
|
source $rootdir/test/iscsi_tgt/common.sh
|
|
|
|
|
2020-03-27 13:26:51 +00:00
|
|
|
# Run cleanup once to make sure we remove any stale iscsiadm
|
|
|
|
# entries if they were missed in previous runs
|
|
|
|
iscsicleanup
|
|
|
|
|
2018-04-04 13:46:41 +00:00
|
|
|
# Network configuration
|
2020-08-11 10:03:58 +00:00
|
|
|
create_veth_interfaces
|
2018-04-04 13:46:41 +00:00
|
|
|
|
2020-08-11 10:03:58 +00:00
|
|
|
trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT
|
2017-05-25 03:58:35 +00:00
|
|
|
|
2020-08-11 10:36:11 +00:00
|
|
|
run_test "iscsi_tgt_sock" ./test/iscsi_tgt/sock/sock.sh
|
|
|
|
if [[ -d /usr/local/calsoft ]]; then
|
|
|
|
run_test "iscsi_tgt_calsoft" ./test/iscsi_tgt/calsoft/calsoft.sh
|
|
|
|
else
|
|
|
|
skip_run_test_with_warning "WARNING: Calsoft binaries not found, skipping test!"
|
2018-06-25 12:44:59 +00:00
|
|
|
fi
|
2019-12-19 23:03:30 +00:00
|
|
|
run_test "iscsi_tgt_filesystem" ./test/iscsi_tgt/filesystem/filesystem.sh
|
|
|
|
run_test "iscsi_tgt_reset" ./test/iscsi_tgt/reset/reset.sh
|
2020-08-11 10:36:11 +00:00
|
|
|
run_test "iscsi_tgt_rpc_config" ./test/iscsi_tgt/rpc_config/rpc_config.sh
|
2019-12-19 23:03:30 +00:00
|
|
|
run_test "iscsi_tgt_iscsi_lvol" ./test/iscsi_tgt/lvol/iscsi_lvol.sh
|
|
|
|
run_test "iscsi_tgt_fio" ./test/iscsi_tgt/fio/fio.sh
|
|
|
|
run_test "iscsi_tgt_qos" ./test/iscsi_tgt/qos/qos.sh
|
2020-08-11 10:36:11 +00:00
|
|
|
run_test "iscsi_tgt_ip_migration" ./test/iscsi_tgt/ip_migration/ip_migration.sh
|
2019-12-19 23:03:30 +00:00
|
|
|
run_test "iscsi_tgt_trace_record" ./test/iscsi_tgt/trace_record/trace_record.sh
|
2020-08-17 23:16:33 +00:00
|
|
|
run_test "iscsi_tgt_login_redirection" ./test/iscsi_tgt/login_redirection/login_redirection.sh
|
2017-09-20 13:57:36 +00:00
|
|
|
|
2017-05-10 22:01:26 +00:00
|
|
|
if [ $RUN_NIGHTLY -eq 1 ]; then
|
2018-04-03 23:07:39 +00:00
|
|
|
if [ $SPDK_TEST_PMDK -eq 1 ]; then
|
2019-12-19 23:03:30 +00:00
|
|
|
run_test "iscsi_tgt_pmem" ./test/iscsi_tgt/pmem/iscsi_pmem.sh 4096 10
|
2017-12-15 17:40:36 +00:00
|
|
|
fi
|
2019-12-19 23:03:30 +00:00
|
|
|
run_test "iscsi_tgt_ext4test" ./test/iscsi_tgt/ext4test/ext4test.sh
|
|
|
|
run_test "iscsi_tgt_digests" ./test/iscsi_tgt/digests/digests.sh
|
2017-05-10 22:01:26 +00:00
|
|
|
fi
|
2017-07-19 23:22:38 +00:00
|
|
|
if [ $SPDK_TEST_RBD -eq 1 ]; then
|
2020-08-11 10:36:11 +00:00
|
|
|
if ! hash ceph; then
|
|
|
|
echo "ERROR: SPDK_TEST_RBD requested but no ceph installed!"
|
|
|
|
false
|
2018-06-25 12:44:59 +00:00
|
|
|
fi
|
2020-08-11 10:36:11 +00:00
|
|
|
run_test "iscsi_tgt_rbd" ./test/iscsi_tgt/rbd/rbd.sh
|
2017-07-19 23:22:38 +00:00
|
|
|
fi
|
2017-05-25 03:58:35 +00:00
|
|
|
|
2020-08-11 10:03:58 +00:00
|
|
|
trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT
|
2017-05-25 03:58:35 +00:00
|
|
|
|
2017-12-08 20:28:19 +00:00
|
|
|
if [ $SPDK_TEST_NVMF -eq 1 ]; then
|
2020-08-11 10:36:11 +00:00
|
|
|
# Test configure remote NVMe device from rpc and conf file
|
|
|
|
run_test "iscsi_tgt_fio_remote_nvme" ./test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh
|
2017-12-08 20:28:19 +00:00
|
|
|
fi
|
|
|
|
|
2017-11-29 10:01:09 +00:00
|
|
|
if [ $RUN_NIGHTLY -eq 1 ]; then
|
2020-08-11 10:36:11 +00:00
|
|
|
run_test "iscsi_tgt_fuzz" ./test/iscsi_tgt/fuzz/fuzz.sh
|
2019-12-19 23:03:30 +00:00
|
|
|
run_test "iscsi_tgt_multiconnection" ./test/iscsi_tgt/multiconnection/multiconnection.sh
|
2017-11-29 10:01:09 +00:00
|
|
|
fi
|
|
|
|
|
2018-03-16 11:49:11 +00:00
|
|
|
if [ $SPDK_TEST_ISCSI_INITIATOR -eq 1 ]; then
|
2019-12-19 23:03:30 +00:00
|
|
|
run_test "iscsi_tgt_initiator" ./test/iscsi_tgt/initiator/initiator.sh
|
|
|
|
run_test "iscsi_tgt_bdev_io_wait" ./test/iscsi_tgt/bdev_io_wait/bdev_io_wait.sh
|
2018-03-16 11:49:11 +00:00
|
|
|
fi
|
|
|
|
|
2020-08-11 10:03:58 +00:00
|
|
|
cleanup_veth_interfaces
|
2018-04-04 13:46:41 +00:00
|
|
|
trap - SIGINT SIGTERM EXIT
|