Commit de95290c authored by wanghailiangx's avatar wanghailiangx Committed by Tomasz Zawadzki
Browse files

autotest: unify style for test/ and ./test/



Although they are all correct. I suggest to unify, so it looks more normalized.

Change-Id: I61ee92b2ac9f2260851e0d7e28ebaea8783423f6
Signed-off-by: default avatarHailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15172


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarMichal Berger <michal.berger@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 58c75caa
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ fi

case "$SPDK_TEST_AUTOBUILD" in
	full)
		./configure $config_params
		$rootdir/configure $config_params
		echo "** START ** Info for Hostname: $HOSTNAME"
		uname -a
		$MAKE cc_version
@@ -62,10 +62,10 @@ elif [[ $SPDK_TEST_SCANBUILD -eq 1 ]]; then
else
	if [[ $SPDK_TEST_FUZZER -eq 1 ]]; then
		# if we are testing nvmf fuzz with llvm lib, --with-shared will cause lib link fail
		./configure $config_params
		$rootdir/configure $config_params
	else
		# if we aren't testing the unittests, build with shared objects.
		./configure $config_params --with-shared
		$rootdir/configure $config_params --with-shared
	fi
	run_test "make" $MAKE $MAKEFLAGS
fi
+3 −3
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ fi
timing_exit porcelain_check

if [[ $SPDK_TEST_RELEASE_BUILD -eq 1 ]]; then
	run_test "packaging" test/packaging/packaging.sh
	run_test "packaging" $rootdir/test/packaging/packaging.sh
	$MAKE clean
fi

@@ -54,10 +54,10 @@ if [ $(uname -s) = Linux ]; then
		LD=$(type -P ld.gold)
		export LD
	fi
	./configure $config_params --enable-lto
	$rootdir/configure $config_params --enable-lto
else
	# LTO needs a special compiler to work on BSD.
	./configure $config_params
	$rootdir/configure $config_params
fi
$MAKE ${MAKEFLAGS}
$MAKE ${MAKEFLAGS} clean
+82 −82
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ timing_enter cleanup
rm -f /var/tmp/spdk*.sock

# Load the kernel driver
./scripts/setup.sh reset
$rootdir/scripts/setup.sh reset

get_zoned_devs

@@ -121,7 +121,7 @@ if [ $(uname -s) = Linux ]; then
	run_test "setup.sh" "$rootdir/test/setup/test-setup.sh"
fi

./scripts/setup.sh status
$rootdir/scripts/setup.sh status

if [[ $(uname -s) == Linux ]]; then
	# Revert NVMe namespaces to default state
@@ -132,7 +132,7 @@ timing_exit cleanup

# set up huge pages
timing_enter afterboot
./scripts/setup.sh
$rootdir/scripts/setup.sh
timing_exit afterboot

# Revert existing OPAL to factory settings that may have been left from earlier failed tests.
@@ -144,39 +144,39 @@ opal_revert_cleanup
#####################

if [ $SPDK_TEST_UNITTEST -eq 1 ]; then
	run_test "unittest" ./test/unit/unittest.sh
	run_test "unittest" $rootdir/test/unit/unittest.sh
fi

if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
	if [[ $SPDK_TEST_CRYPTO -eq 1 || $SPDK_TEST_VBDEV_COMPRESS -eq 1 ]]; then
		if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then
			./scripts/qat_setup.sh igb_uio
			$rootdir/scripts/qat_setup.sh igb_uio
		else
			./scripts/qat_setup.sh
			$rootdir/scripts/qat_setup.sh
		fi
	fi
	timing_enter lib

	run_test "env" test/env/env.sh
	run_test "rpc" test/rpc/rpc.sh
	run_test "rpc_client" test/rpc_client/rpc_client.sh
	run_test "json_config" ./test/json_config/json_config.sh
	run_test "json_config_extra_key" ./test/json_config/json_config_extra_key.sh
	run_test "alias_rpc" test/json_config/alias_rpc/alias_rpc.sh
	run_test "spdkcli_tcp" test/spdkcli/tcp.sh
	run_test "dpdk_mem_utility" test/dpdk_memory_utility/test_dpdk_mem_info.sh
	run_test "event" test/event/event.sh
	run_test "thread" test/thread/thread.sh
	run_test "accel" test/accel/accel.sh
	run_test "app_cmdline" test/app/cmdline.sh
	run_test "env" $rootdir/test/env/env.sh
	run_test "rpc" $rootdir/test/rpc/rpc.sh
	run_test "rpc_client" $rootdir/test/rpc_client/rpc_client.sh
	run_test "json_config" $rootdir/test/json_config/json_config.sh
	run_test "json_config_extra_key" $rootdir/test/json_config/json_config_extra_key.sh
	run_test "alias_rpc" $rootdir/test/json_config/alias_rpc/alias_rpc.sh
	run_test "spdkcli_tcp" $rootdir/test/spdkcli/tcp.sh
	run_test "dpdk_mem_utility" $rootdir/test/dpdk_memory_utility/test_dpdk_mem_info.sh
	run_test "event" $rootdir/test/event/event.sh
	run_test "thread" $rootdir/test/thread/thread.sh
	run_test "accel" $rootdir/test/accel/accel.sh
	run_test "app_cmdline" $rootdir/test/app/cmdline.sh

	if [ $SPDK_TEST_BLOCKDEV -eq 1 ]; then
		run_test "blockdev_general" test/bdev/blockdev.sh
		run_test "bdev_raid" test/bdev/bdev_raid.sh
		run_test "bdevperf_config" test/bdev/bdevperf/test_config.sh
		run_test "blockdev_general" $rootdir/test/bdev/blockdev.sh
		run_test "bdev_raid" $rootdir/test/bdev/bdev_raid.sh
		run_test "bdevperf_config" $rootdir/test/bdev/bdevperf/test_config.sh
		if [[ $(uname -s) == Linux ]]; then
			run_test "reactor_set_interrupt" test/interrupt/reactor_set_interrupt.sh
			run_test "reap_unregistered_poller" test/interrupt/reap_unregistered_poller.sh
			run_test "reactor_set_interrupt" $rootdir/test/interrupt/reactor_set_interrupt.sh
			run_test "reap_unregistered_poller" $rootdir/test/interrupt/reap_unregistered_poller.sh
		fi
	fi

@@ -188,73 +188,73 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
			# job timeout. Avoid that by skipping these tests - this should not affect the coverage
			# since dd tests are still run as part of the vg jobs.
			if [[ $SPDK_TEST_CRYPTO -eq 0 ]]; then
				run_test "spdk_dd" test/dd/dd.sh
				run_test "spdk_dd" $rootdir/test/dd/dd.sh
			fi
		fi
	fi

	if [ $SPDK_TEST_NVME -eq 1 ]; then
		run_test "blockdev_nvme" test/bdev/blockdev.sh "nvme"
		run_test "blockdev_nvme" $rootdir/test/bdev/blockdev.sh "nvme"
		if [[ $(uname -s) == Linux ]]; then
			run_test "blockdev_nvme_gpt" test/bdev/blockdev.sh "gpt"
			run_test "blockdev_nvme_gpt" $rootdir/test/bdev/blockdev.sh "gpt"
		fi
		run_test "nvme" test/nvme/nvme.sh
		run_test "nvme" $rootdir/test/nvme/nvme.sh
		if [[ $SPDK_TEST_NVME_PMR -eq 1 ]]; then
			run_test "nvme_pmr" test/nvme/nvme_pmr.sh
			run_test "nvme_pmr" $rootdir/test/nvme/nvme_pmr.sh
		fi
		if [[ $SPDK_TEST_NVME_SCC -eq 1 ]]; then
			run_test "nvme_scc" test/nvme/nvme_scc.sh
			run_test "nvme_scc" $rootdir/test/nvme/nvme_scc.sh
		fi
		if [[ $SPDK_TEST_NVME_BP -eq 1 ]]; then
			run_test "nvme_bp" test/nvme/nvme_bp.sh
			run_test "nvme_bp" $rootdir/test/nvme/nvme_bp.sh
		fi
		if [[ $SPDK_TEST_NVME_CUSE -eq 1 ]]; then
			run_test "nvme_cuse" test/nvme/cuse/nvme_cuse.sh
			run_test "nvme_cuse" $rootdir/test/nvme/cuse/nvme_cuse.sh
		fi
		if [[ $SPDK_TEST_NVME_CMB -eq 1 ]]; then
			run_test "nvme_cmb" test/nvme/cmb/cmb.sh
			run_test "nvme_cmb" $rootdir/test/nvme/cmb/cmb.sh
		fi

		if [[ $SPDK_TEST_NVME_ZNS -eq 1 ]]; then
			run_test "nvme_zns" test/nvme/zns/zns.sh
			run_test "nvme_zns" $rootdir/test/nvme/zns/zns.sh
		fi

		run_test "nvme_rpc" test/nvme/nvme_rpc.sh
		run_test "nvme_rpc_timeouts" test/nvme/nvme_rpc_timeouts.sh
		run_test "nvme_rpc" $rootdir/test/nvme/nvme_rpc.sh
		run_test "nvme_rpc_timeouts" $rootdir/test/nvme/nvme_rpc_timeouts.sh
		# Only test hotplug without ASAN enabled. Since if it is
		# enabled, it catches SEGV earlier than our handler which
		# breaks the hotplug logic.
		if [ $SPDK_RUN_ASAN -eq 0 ] && [ $(uname -s) = Linux ]; then
			run_test "sw_hotplug" test/nvme/sw_hotplug.sh
			run_test "sw_hotplug" $rootdir/test/nvme/sw_hotplug.sh
		fi

		if [[ $SPDK_TEST_XNVME -eq 1 ]]; then
			run_test "nvme_xnvme" test/nvme/xnvme/xnvme.sh
			run_test "blockdev_xnvme" test/bdev/blockdev.sh "xnvme"
			run_test "nvme_xnvme" $rootdir/test/nvme/xnvme/xnvme.sh
			run_test "blockdev_xnvme" $rootdir/test/bdev/blockdev.sh "xnvme"
			# Run ublk with xnvme since they have similar kernel dependencies
			run_test "ublk" test/ublk/ublk.sh
			run_test "ublk" $rootdir/test/ublk/ublk.sh
		fi
	fi

	if [ $SPDK_TEST_IOAT -eq 1 ]; then
		run_test "ioat" test/ioat/ioat.sh
		run_test "ioat" $rootdir/test/ioat/ioat.sh
	fi

	timing_exit lib

	if [ $SPDK_TEST_ISCSI -eq 1 ]; then
		run_test "iscsi_tgt" ./test/iscsi_tgt/iscsi_tgt.sh
		run_test "spdkcli_iscsi" ./test/spdkcli/iscsi.sh
		run_test "iscsi_tgt" $rootdir/test/iscsi_tgt/iscsi_tgt.sh
		run_test "spdkcli_iscsi" $rootdir/test/spdkcli/iscsi.sh

		# Run raid spdkcli test under iSCSI since blockdev tests run on systems that can't run spdkcli yet
		run_test "spdkcli_raid" test/spdkcli/raid.sh
		run_test "spdkcli_raid" $rootdir/test/spdkcli/raid.sh
	fi

	if [ $SPDK_TEST_BLOBFS -eq 1 ]; then
		run_test "rocksdb" ./test/blobfs/rocksdb/rocksdb.sh
		run_test "blobstore" ./test/blobstore/blobstore.sh
		run_test "blobstore_grow" ./test/blobstore/blobstore_grow/blobstore_grow.sh
		run_test "blobfs" ./test/blobfs/blobfs.sh
		run_test "rocksdb" $rootdir/test/blobfs/rocksdb/rocksdb.sh
		run_test "blobstore" $rootdir/test/blobstore/blobstore.sh
		run_test "blobstore_grow" $rootdir/test/blobstore/blobstore_grow/blobstore_grow.sh
		run_test "blobfs" $rootdir/test/blobfs/blobfs.sh
		run_test "hello_blob" $SPDK_EXAMPLE_DIR/hello_blob \
			examples/blob/hello_world/hello_blob.json
	fi
@@ -264,19 +264,19 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
		# The NVMe-oF run test cases are split out like this so that the parser that compiles the
		# list of all tests can properly differentiate them. Please do not merge them into one line.
		if [ "$SPDK_TEST_NVMF_TRANSPORT" = "rdma" ]; then
			run_test "nvmf_rdma" ./test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
			run_test "spdkcli_nvmf_rdma" ./test/spdkcli/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
			run_test "nvmf_rdma" $rootdir/test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
			run_test "spdkcli_nvmf_rdma" $rootdir/test/spdkcli/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
		elif [ "$SPDK_TEST_NVMF_TRANSPORT" = "tcp" ]; then
			run_test "nvmf_tcp" ./test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
			run_test "nvmf_tcp" $rootdir/test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
			if [[ $SPDK_TEST_URING -eq 0 ]]; then
				run_test "spdkcli_nvmf_tcp" ./test/spdkcli/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
				run_test "nvmf_identify_passthru" test/nvmf/target/identify_passthru.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
				run_test "spdkcli_nvmf_tcp" $rootdir/test/spdkcli/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
				run_test "nvmf_identify_passthru" $rootdir/test/nvmf/target/identify_passthru.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
			fi
			run_test "nvmf_dif" test/nvmf/target/dif.sh
			run_test "nvmf_abort_qd_sizes" test/nvmf/target/abort_qd_sizes.sh
			run_test "nvmf_dif" $rootdir/test/nvmf/target/dif.sh
			run_test "nvmf_abort_qd_sizes" $rootdir/test/nvmf/target/abort_qd_sizes.sh
		elif [ "$SPDK_TEST_NVMF_TRANSPORT" = "fc" ]; then
			run_test "nvmf_fc" ./test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
			run_test "spdkcli_nvmf_fc" ./test/spdkcli/nvmf.sh
			run_test "nvmf_fc" $rootdir/test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
			run_test "spdkcli_nvmf_fc" $rootdir/test/spdkcli/nvmf.sh
		else
			echo "unknown NVMe transport, please specify rdma, tcp, or fc."
			exit 1
@@ -284,82 +284,82 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
	fi

	if [ $SPDK_TEST_VHOST -eq 1 ]; then
		run_test "vhost" ./test/vhost/vhost.sh
		run_test "vhost" $rootdir/test/vhost/vhost.sh
	fi

	if [ $SPDK_TEST_VFIOUSER_QEMU -eq 1 ]; then
		run_test "vfio_user_qemu" ./test/vfio_user/vfio_user.sh
		run_test "vfio_user_qemu" $rootdir/test/vfio_user/vfio_user.sh
	fi

	if [ $SPDK_TEST_LVOL -eq 1 ]; then
		run_test "lvol" ./test/lvol/lvol.sh
		run_test "blob_io_wait" ./test/blobstore/blob_io_wait/blob_io_wait.sh
		run_test "lvol" $rootdir/test/lvol/lvol.sh
		run_test "blob_io_wait" $rootdir/test/blobstore/blob_io_wait/blob_io_wait.sh
	fi

	if [ $SPDK_TEST_VHOST_INIT -eq 1 ]; then
		timing_enter vhost_initiator
		run_test "vhost_blockdev" ./test/vhost/initiator/blockdev.sh
		run_test "spdkcli_virtio" ./test/spdkcli/virtio.sh
		run_test "vhost_shared" ./test/vhost/shared/shared.sh
		run_test "vhost_fuzz" ./test/vhost/fuzz/fuzz.sh
		run_test "vhost_blockdev" $rootdir/test/vhost/initiator/blockdev.sh
		run_test "spdkcli_virtio" $rootdir/test/spdkcli/virtio.sh
		run_test "vhost_shared" $rootdir/test/vhost/shared/shared.sh
		run_test "vhost_fuzz" $rootdir/test/vhost/fuzz/fuzz.sh
		timing_exit vhost_initiator
	fi

	if [ $SPDK_TEST_PMDK -eq 1 ]; then
		run_test "blockdev_pmem" ./test/bdev/blockdev.sh "pmem"
		run_test "pmem" ./test/pmem/pmem.sh -x
		run_test "spdkcli_pmem" ./test/spdkcli/pmem.sh
		run_test "blockdev_pmem" $rootdir/test/bdev/blockdev.sh "pmem"
		run_test "pmem" $rootdir/test/pmem/pmem.sh -x
		run_test "spdkcli_pmem" $rootdir/test/spdkcli/pmem.sh
	fi

	if [ $SPDK_TEST_RBD -eq 1 ]; then
		run_test "blockdev_rbd" ./test/bdev/blockdev.sh "rbd"
		run_test "spdkcli_rbd" ./test/spdkcli/rbd.sh
		run_test "blockdev_rbd" $rootdir/test/bdev/blockdev.sh "rbd"
		run_test "spdkcli_rbd" $rootdir/test/spdkcli/rbd.sh
	fi

	if [ $SPDK_TEST_OCF -eq 1 ]; then
		run_test "ocf" ./test/ocf/ocf.sh
		run_test "ocf" $rootdir/test/ocf/ocf.sh
	fi

	if [ $SPDK_TEST_FTL -eq 1 ]; then
		run_test "ftl" ./test/ftl/ftl.sh
		run_test "ftl" $rootdir/test/ftl/ftl.sh
	fi

	if [ $SPDK_TEST_VMD -eq 1 ]; then
		run_test "vmd" ./test/vmd/vmd.sh
		run_test "vmd" $rootdir/test/vmd/vmd.sh
	fi

	if [ $SPDK_TEST_VBDEV_COMPRESS -eq 1 ]; then
		run_test "compress_compdev" ./test/compress/compress.sh "compdev"
		run_test "compress_isal" ./test/compress/compress.sh "isal"
		run_test "compress_compdev" $rootdir/test/compress/compress.sh "compdev"
		run_test "compress_isal" $rootdir/test/compress/compress.sh "isal"
	fi

	if [ $SPDK_TEST_OPAL -eq 1 ]; then
		run_test "nvme_opal" ./test/nvme/nvme_opal.sh
		run_test "nvme_opal" $rootdir/test/nvme/nvme_opal.sh
	fi

	if [ $SPDK_TEST_CRYPTO -eq 1 ]; then
		run_test "blockdev_crypto_aesni" ./test/bdev/blockdev.sh "crypto_aesni"
		run_test "blockdev_crypto_sw" ./test/bdev/blockdev.sh "crypto_sw"
		run_test "blockdev_crypto_aesni" $rootdir/test/bdev/blockdev.sh "crypto_aesni"
		run_test "blockdev_crypto_sw" $rootdir/test/bdev/blockdev.sh "crypto_sw"
		# Proceed with the test only if QAT devices are in place
		if [[ $(lspci -d:37c8) ]]; then
			run_test "blockdev_crypto_qat" ./test/bdev/blockdev.sh "crypto_qat"
			run_test "blockdev_crypto_qat" $rootdir/test/bdev/blockdev.sh "crypto_qat"
		fi
	fi

	if [[ $SPDK_TEST_SCHEDULER -eq 1 ]]; then
		run_test "scheduler" ./test/scheduler/scheduler.sh
		run_test "scheduler" $rootdir/test/scheduler/scheduler.sh
	fi

	if [[ $SPDK_TEST_SMA -eq 1 ]]; then
		run_test "sma" ./test/sma/sma.sh
		run_test "sma" $rootdir/test/sma/sma.sh
	fi

	if [[ $SPDK_TEST_FUZZER -eq 1 ]]; then
		run_test "llvm_fuzz" test/fuzz/llvm.sh
		run_test "llvm_fuzz" $rootdir/test/fuzz/llvm.sh
	fi

	if [[ $SPDK_TEST_RAID5 -eq 1 ]]; then
		run_test "blockdev_raid5f" ./test/bdev/blockdev.sh "raid5f"
		run_test "blockdev_raid5f" $rootdir/test/bdev/blockdev.sh "raid5f"
	fi
fi

+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ function app_repeat_test() {
		# This SIGTERM is sent to the app_repeat test app - it doesn't actually
		# terminate the app, it just causes it go through another
		# spdk_app_stop/spdk_app_start cycle
		./scripts/rpc.py -s $rpc_server spdk_kill_instance SIGTERM
		$rootdir/scripts/rpc.py -s $rpc_server spdk_kill_instance SIGTERM
	done

	waitforlisten $repeat_pid $rpc_server
+21 −21
Original line number Diff line number Diff line
@@ -22,53 +22,53 @@ create_veth_interfaces

trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT

run_test "iscsi_tgt_sock" ./test/iscsi_tgt/sock/sock.sh
run_test "iscsi_tgt_sock" $rootdir/test/iscsi_tgt/sock/sock.sh
if [[ -d /usr/local/calsoft ]]; then
	run_test "iscsi_tgt_calsoft" ./test/iscsi_tgt/calsoft/calsoft.sh
	run_test "iscsi_tgt_calsoft" $rootdir/test/iscsi_tgt/calsoft/calsoft.sh
else
	skip_run_test_with_warning "WARNING: Calsoft binaries not found, skipping test!"
fi
run_test "iscsi_tgt_filesystem" ./test/iscsi_tgt/filesystem/filesystem.sh
run_test "iscsi_tgt_reset" ./test/iscsi_tgt/reset/reset.sh
run_test "iscsi_tgt_rpc_config" ./test/iscsi_tgt/rpc_config/rpc_config.sh
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
run_test "iscsi_tgt_ip_migration" ./test/iscsi_tgt/ip_migration/ip_migration.sh
run_test "iscsi_tgt_trace_record" ./test/iscsi_tgt/trace_record/trace_record.sh
run_test "iscsi_tgt_login_redirection" ./test/iscsi_tgt/login_redirection/login_redirection.sh
run_test "iscsi_tgt_filesystem" $rootdir/test/iscsi_tgt/filesystem/filesystem.sh
run_test "iscsi_tgt_reset" $rootdir/test/iscsi_tgt/reset/reset.sh
run_test "iscsi_tgt_rpc_config" $rootdir/test/iscsi_tgt/rpc_config/rpc_config.sh
run_test "iscsi_tgt_iscsi_lvol" $rootdir/test/iscsi_tgt/lvol/iscsi_lvol.sh
run_test "iscsi_tgt_fio" $rootdir/test/iscsi_tgt/fio/fio.sh
run_test "iscsi_tgt_qos" $rootdir/test/iscsi_tgt/qos/qos.sh
run_test "iscsi_tgt_ip_migration" $rootdir/test/iscsi_tgt/ip_migration/ip_migration.sh
run_test "iscsi_tgt_trace_record" $rootdir/test/iscsi_tgt/trace_record/trace_record.sh
run_test "iscsi_tgt_login_redirection" $rootdir/test/iscsi_tgt/login_redirection/login_redirection.sh

if [ $RUN_NIGHTLY -eq 1 ]; then
	if [ $SPDK_TEST_PMDK -eq 1 ]; then
		run_test "iscsi_tgt_pmem" ./test/iscsi_tgt/pmem/iscsi_pmem.sh 4096 10
		run_test "iscsi_tgt_pmem" $rootdir/test/iscsi_tgt/pmem/iscsi_pmem.sh 4096 10
	fi
	run_test "iscsi_tgt_ext4test" ./test/iscsi_tgt/ext4test/ext4test.sh
	run_test "iscsi_tgt_digests" ./test/iscsi_tgt/digests/digests.sh
	run_test "iscsi_tgt_ext4test" $rootdir/test/iscsi_tgt/ext4test/ext4test.sh
	run_test "iscsi_tgt_digests" $rootdir/test/iscsi_tgt/digests/digests.sh
fi
if [ $SPDK_TEST_RBD -eq 1 ]; then
	if ! hash ceph; then
		echo "ERROR: SPDK_TEST_RBD requested but no ceph installed!"
		false
	fi
	run_test "iscsi_tgt_rbd" ./test/iscsi_tgt/rbd/rbd.sh
	run_test "iscsi_tgt_rbd" $rootdir/test/iscsi_tgt/rbd/rbd.sh
fi

trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT

if [ $SPDK_TEST_NVMF -eq 1 ]; then
	# 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
	run_test "iscsi_tgt_fio_remote_nvme" $rootdir/test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh
fi

if [ $RUN_NIGHTLY -eq 1 ]; then
	run_test "iscsi_tgt_fuzz" ./test/iscsi_tgt/fuzz/fuzz.sh
	run_test "iscsi_tgt_multiconnection" ./test/iscsi_tgt/multiconnection/multiconnection.sh
	run_test "iscsi_tgt_fuzz" $rootdir/test/iscsi_tgt/fuzz/fuzz.sh
	run_test "iscsi_tgt_multiconnection" $rootdir/test/iscsi_tgt/multiconnection/multiconnection.sh
fi

if [ $SPDK_TEST_ISCSI_INITIATOR -eq 1 ]; then
	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
	run_test "iscsi_tgt_resize" ./test/iscsi_tgt/resize/resize.sh
	run_test "iscsi_tgt_initiator" $rootdir/test/iscsi_tgt/initiator/initiator.sh
	run_test "iscsi_tgt_bdev_io_wait" $rootdir/test/iscsi_tgt/bdev_io_wait/bdev_io_wait.sh
	run_test "iscsi_tgt_resize" $rootdir/test/iscsi_tgt/resize/resize.sh
fi

cleanup_veth_interfaces
Loading