Commit cb90136c authored by Seth Howell's avatar Seth Howell Committed by Tomasz Zawadzki
Browse files

test: eliminate case and suite from run_test



We will be able to distinguish case and suite in the post process
scripts based on if they have any internal tests.

Change-Id: Iff2aa5caa251924d8a842085d87eb2a17aca45d4
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478522


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
parent 77d591e1
Loading
Loading
Loading
Loading
+41 −41
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ fi
#####################

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

@@ -152,119 +152,119 @@ fi
if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
	timing_enter lib

	run_test suite "env" test/env/env.sh
	run_test suite "rpc_client" test/rpc_client/rpc_client.sh
	run_test suite "json_config" ./test/json_config/json_config.sh
	run_test suite "alias_rpc" test/json_config/alias_rpc/alias_rpc.sh
	run_test suite "spdkcli_tcp" test/spdkcli/tcp.sh
	run_test "env" test/env/env.sh
	run_test "rpc_client" test/rpc_client/rpc_client.sh
	run_test "json_config" ./test/json_config/json_config.sh
	run_test "alias_rpc" test/json_config/alias_rpc/alias_rpc.sh
	run_test "spdkcli_tcp" test/spdkcli/tcp.sh

	if [ $SPDK_TEST_BLOCKDEV -eq 1 ]; then
		run_test suite "blockdev" test/bdev/blockdev.sh
		run_test suite "bdev_raid" test/bdev/bdev_raid.sh
		run_test "blockdev" test/bdev/blockdev.sh
		run_test "bdev_raid" test/bdev/bdev_raid.sh
	fi

	if [ $SPDK_TEST_JSON -eq 1 ]; then
		run_test suite "test_converter" test/config_converter/test_converter.sh
		run_test "test_converter" test/config_converter/test_converter.sh
	fi

	if [ $SPDK_TEST_EVENT -eq 1 ]; then
		run_test suite "event" test/event/event.sh
		run_test "event" test/event/event.sh
	fi

	if [ $SPDK_TEST_NVME -eq 1 ]; then
		run_test suite "nvme" test/nvme/nvme.sh
		run_test "nvme" test/nvme/nvme.sh
		if [[ $SPDK_TEST_NVME_CLI -eq 1 ]]; then
			run_test suite "nvme_cli" test/nvme/spdk_nvme_cli.sh
			run_test "nvme_cli" test/nvme/spdk_nvme_cli.sh
		fi
		if [[ $SPDK_TEST_NVME_CUSE -eq 1 ]]; then
			run_test suite "nvme_cli_cuse" test/nvme/spdk_nvme_cli_cuse.sh
			run_test suite "nvme_smartctl_cuse" test/nvme/spdk_smartctl_cuse.sh
			run_test "nvme_cli_cuse" test/nvme/spdk_nvme_cli_cuse.sh
			run_test "nvme_smartctl_cuse" test/nvme/spdk_smartctl_cuse.sh
		fi
		# 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 ]; then
			run_test suite "nvme_hotplug" test/nvme/hotplug.sh intel
			run_test "nvme_hotplug" test/nvme/hotplug.sh intel
		fi
	fi

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

	timing_exit lib

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

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

	if [ $SPDK_TEST_VPP -eq 1 ]; then
		run_test suite "iscsi_tgt_vpp" ./test/iscsi_tgt/iscsi_tgt.sh vpp
		run_test "iscsi_tgt_vpp" ./test/iscsi_tgt/iscsi_tgt.sh vpp
	fi

	if [ $SPDK_TEST_BLOBFS -eq 1 ]; then
		run_test suite "rocksdb" ./test/blobfs/rocksdb/rocksdb.sh
		run_test suite "blobstore" ./test/blobstore/blobstore.sh
		run_test suite "blobfs" ./test/blobfs/blobfs.sh
		run_test "rocksdb" ./test/blobfs/rocksdb/rocksdb.sh
		run_test "blobstore" ./test/blobstore/blobstore.sh
		run_test "blobfs" ./test/blobfs/blobfs.sh
	fi

	if [ $SPDK_TEST_NVMF -eq 1 ]; then
		run_test suite "nvmf" ./test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
		run_test suite "spdkcli_nvmf" ./test/spdkcli/nvmf.sh
		run_test "nvmf" ./test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
		run_test "spdkcli_nvmf" ./test/spdkcli/nvmf.sh
	fi

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

	if [ $SPDK_TEST_LVOL -eq 1 ]; then
		run_test suite "lvol" ./test/lvol/lvol.sh --test-cases=all
		run_test suite "lvol2" ./test/lvol/lvol2.sh
		run_test suite "blob_io_wait" ./test/blobstore/blob_io_wait/blob_io_wait.sh
		run_test "lvol" ./test/lvol/lvol.sh --test-cases=all
		run_test "lvol2" ./test/lvol/lvol2.sh
		run_test "blob_io_wait" ./test/blobstore/blob_io_wait/blob_io_wait.sh
		report_test_completion "lvol"
	fi

	if [ $SPDK_TEST_VHOST_INIT -eq 1 ]; then
		timing_enter vhost_initiator
		run_test suite "vhost_blockdev" ./test/vhost/initiator/blockdev.sh
		run_test suite "spdkcli_virtio" ./test/spdkcli/virtio.sh
		run_test suite "vhost_shared" ./test/vhost/shared/shared.sh
		run_test suite "vhost_fuzz" ./test/vhost/fuzz/fuzz.sh
		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
		report_test_completion "vhost initiator"
		timing_exit vhost_initiator
	fi

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

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

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

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

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

        if [ $SPDK_TEST_REDUCE -eq 1 ]; then
                run_test suite "compress" ./test/compress/compress.sh
                run_test "compress" ./test/compress/compress.sh
        fi

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

+15 −15
Original line number Diff line number Diff line
@@ -62,12 +62,12 @@ function fio_test_suite() {
	local fio_ext_params="--ioengine=spdk_bdev --iodepth=128 --bs=192k --runtime=100 $testdir/bdev.fio --spdk_conf=./test/bdev/bdev.conf"

	if [ $RUN_NIGHTLY -eq 0 ]; then
		run_test "case" "bdev_fio_rw_verify" fio_bdev $fio_params --spdk_mem=$PRE_RESERVED_MEM \
		run_test "bdev_fio_rw_verify" fio_bdev $fio_params --spdk_mem=$PRE_RESERVED_MEM \
		--output=$output_dir/blockdev_fio_verify.txt
	elif [ $RUN_NIGHTLY_FAILING -eq 1 ]; then
		# Use size 192KB which both exceeds typical 128KB max NVMe I/O
		#  size and will cross 128KB Intel DC P3700 stripe boundaries.
		run_test "case" "bdev_fio_rw_verify_ext" fio_bdev $fio_ext_params --spdk_mem=$PRE_RESERVED_MEM \
		run_test "bdev_fio_rw_verify_ext" fio_bdev $fio_ext_params --spdk_mem=$PRE_RESERVED_MEM \
		--output=$output_dir/blockdev_fio_verify.txt
	fi
	rm -f ./*.state
@@ -80,9 +80,9 @@ function fio_test_suite() {
	done

	if [ $RUN_NIGHTLY -eq 0 ]; then
		run_test "case" "bdev_fio_trim" fio_bdev $fio_params --output=$output_dir/blockdev_trim.txt
		run_test "bdev_fio_trim" fio_bdev $fio_params --output=$output_dir/blockdev_trim.txt
	elif [ $RUN_NIGHTLY_FAILING -eq 1 ]; then
		run_test "case" "bdev_fio_trim_ext" fio_bdev $fio_ext_params --output=$output_dir/blockdev_trim.txt
		run_test "bdev_fio_trim_ext" fio_bdev $fio_ext_params --output=$output_dir/blockdev_trim.txt
	fi

	rm -f ./*.state
@@ -158,7 +158,7 @@ function qos_function_test() {

		# Run bdevperf with IOPS rate limit on bdev 1
		$rpc_py bdev_set_qos_limit --rw_ios_per_sec $iops_limit $QOS_DEV_1
		run_test "case" "bdev_qos_iops" run_qos_test $iops_limit IOPS $QOS_DEV_1
		run_test "bdev_qos_iops" run_qos_test $iops_limit IOPS $QOS_DEV_1

		# Run bdevperf with bandwidth rate limit on bdev 2
		# Set the bandwidth limit as 1/10 of the measure performance without QoS
@@ -168,11 +168,11 @@ function qos_function_test() {
			bw_limit=$qos_lower_bw_limit
		fi
		$rpc_py bdev_set_qos_limit --rw_mbytes_per_sec $bw_limit $QOS_DEV_2
		run_test "case" "bdev_qos_bw" run_qos_test $bw_limit BANDWIDTH $QOS_DEV_2
		run_test "bdev_qos_bw" run_qos_test $bw_limit BANDWIDTH $QOS_DEV_2

		# Run bdevperf with additional read only bandwidth rate limit on bdev 1
		$rpc_py bdev_set_qos_limit --r_mbytes_per_sec $qos_lower_bw_limit $QOS_DEV_1
		run_test "case" "bdev_qos_ro_bw" run_qos_test $qos_lower_bw_limit BANDWIDTH $QOS_DEV_1
		run_test "bdev_qos_ro_bw" run_qos_test $qos_lower_bw_limit BANDWIDTH $QOS_DEV_1
	else
		echo "Actual IOPS without limiting is too low - exit testing"
	fi
@@ -262,24 +262,24 @@ $rootdir/scripts/gen_nvme.sh >> $testdir/bdev_gpt.conf
# End bdev configuration
#-----------------------------------------------------

run_test "case" "bdev_hello_world" $rootdir/examples/bdev/hello_world/hello_bdev -c $testdir/bdev.conf -b Malloc0
run_test "case" "bdev_bounds" bdev_bounds
run_test "case" "bdev_nbd" nbd_function_test $testdir/bdev.conf "$bdevs_name"
run_test "bdev_hello_world" $rootdir/examples/bdev/hello_world/hello_bdev -c $testdir/bdev.conf -b Malloc0
run_test "bdev_bounds" bdev_bounds
run_test "bdev_nbd" nbd_function_test $testdir/bdev.conf "$bdevs_name"
if [ -d /usr/src/fio ]; then
	run_test "suite" "bdev_fio" fio_test_suite
	run_test "bdev_fio" fio_test_suite
else
	echo "FIO not available"
	exit 1
fi

# Run bdevperf with gpt
run_test "case" "bdev_gpt_verify" $testdir/bdevperf/bdevperf -c $testdir/bdev_gpt.conf -q 128 -o 4096 -w verify -t 5
run_test "case" "bdev_gpt_write_zeroes" $testdir/bdevperf/bdevperf -c $testdir/bdev_gpt.conf -q 128 -o 4096 -w write_zeroes -t 1
run_test "suite" "bdev_qos" qos_test_suite
run_test "bdev_gpt_verify" $testdir/bdevperf/bdevperf -c $testdir/bdev_gpt.conf -q 128 -o 4096 -w verify -t 5
run_test "bdev_gpt_write_zeroes" $testdir/bdevperf/bdevperf -c $testdir/bdev_gpt.conf -q 128 -o 4096 -w write_zeroes -t 1
run_test "bdev_qos" qos_test_suite

# Temporarily disabled - infinite loop
# if [ $RUN_NIGHTLY -eq 1 ]; then
	# run_test "case" "bdev_gpt_reset" $testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 16 -w reset -o 4096 -t 60
	# run_test "bdev_gpt_reset" $testdir/bdevperf/bdevperf -c $testdir/bdev.conf -q 16 -w reset -o 4096 -t 60
	# report_test_completion "nightly_bdev_reset"
# fi

+6 −6
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ echo "TpointGroupMask 0x80" >> $ROCKSDB_CONF
trap 'run_bsdump; rm -f $ROCKSDB_CONF; exit 1' SIGINT SIGTERM EXIT

if [ -z "$SKIP_MKFS" ]; then
	run_test "case" "blobfs_mkfs" $rootdir/test/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1
	run_test "blobfs_mkfs" $rootdir/test/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1
fi

mkdir -p $output_dir/rocksdb
@@ -124,11 +124,11 @@ cat << EOL >> writesync_flags.txt
--num=$NUM_KEYS
EOL

run_test "case" "rocksdb_insert" run_step insert
run_test "case" "rocksdb_overwrite" run_step overwrite
run_test "case" "rocksdb_readwrite" run_step readwrite
run_test "case" "rocksdb_writesync" run_step writesync
run_test "case" "rocksdb_randread" run_step randread
run_test "rocksdb_insert" run_step insert
run_test "rocksdb_overwrite" run_step overwrite
run_test "rocksdb_readwrite" run_step readwrite
run_test "rocksdb_writesync" run_step writesync
run_test "rocksdb_randread" run_step randread

trap - SIGINT SIGTERM EXIT

+4 −7
Original line number Diff line number Diff line
@@ -572,28 +572,25 @@ function kill_stub() {
}

function run_test() {
	if [ $# -le 2 ]; then
	if [ $# -le 1 ]; then
		echo "Not enough parameters"
		echo "usage: run_test test_type test_name test_script [script_params]"
		echo "usage: run_test test_name test_script [script_params]"
		exit 1
	fi

	xtrace_disable
	local test_type
	test_type="$(echo $1 | tr '[:lower:]' '[:upper:]')"
	shift
	local test_name="$1"
	shift

	timing_enter $test_name
	echo "************************************"
	echo "START TEST $test_type $test_name"
	echo "START TEST $test_name"
	echo "************************************"
	xtrace_restore
	time "$@"
	xtrace_disable
	echo "************************************"
	echo "END TEST $test_type $test_name"
	echo "END TEST $test_name"
	echo "************************************"

	timing_exit $test_name
+5 −5
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@ testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)
source $rootdir/test/common/autotest_common.sh

run_test "case" "env_memory" $testdir/memory/memory_ut
run_test "case" "env_vtophys" $testdir/vtophys/vtophys
run_test "case" "env_pci" $testdir/pci/pci_ut
run_test "env_memory" $testdir/memory/memory_ut
run_test "env_vtophys" $testdir/vtophys/vtophys
run_test "env_pci" $testdir/pci/pci_ut

argv="-c 0x1 "
if [ $(uname) = Linux ]; then
@@ -18,12 +18,12 @@ if [ $(uname) = Linux ]; then
	# this implicitly.
	argv+="--base-virtaddr=0x200000000000"
fi
run_test "case" "env_dpdk_post_init" $testdir/env_dpdk_post_init/env_dpdk_post_init $argv
run_test "env_dpdk_post_init" $testdir/env_dpdk_post_init/env_dpdk_post_init $argv

if [ $(uname) = Linux ]; then
	# This tests the --match-allocations DPDK parameter which is only
	# supported on Linux
	run_test "case" "env_mem_callbacks" $testdir/mem_callbacks/mem_callbacks
	run_test "env_mem_callbacks" $testdir/mem_callbacks/mem_callbacks
fi

report_test_completion "env"
Loading