test: move report_test_completion into run_test
This also requires us to change the create_test_list function to rely on the run_test function for creating the canonical test list. Change-Id: Ib35e7752935a3ac83de2702b6dfbd42539027f6a Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476962 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
2f476a638f
commit
a571eb03e9
@ -146,7 +146,6 @@ fi
|
||||
|
||||
if [ $SPDK_TEST_UNITTEST -eq 1 ]; then
|
||||
run_test "unittest" ./test/unit/unittest.sh
|
||||
report_test_completion "unittest"
|
||||
fi
|
||||
|
||||
|
||||
@ -236,10 +235,10 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_LVOL -eq 1 ]; then
|
||||
#TODO: rewrite lvol tests in bash.
|
||||
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
|
||||
@ -248,7 +247,6 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
|
||||
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
|
||||
|
||||
|
@ -117,4 +117,3 @@ trap 'on_error_exit;' ERR
|
||||
raid_function_test
|
||||
|
||||
rm -f $tmp_file
|
||||
report_test_completion "bdev_raid"
|
||||
|
@ -87,7 +87,6 @@ function fio_test_suite() {
|
||||
|
||||
rm -f ./*.state
|
||||
rm -f $testdir/bdev.fio
|
||||
report_test_completion "bdev_fio"
|
||||
}
|
||||
|
||||
function get_io_result() {
|
||||
@ -280,7 +279,6 @@ run_test "bdev_qos" qos_test_suite
|
||||
# Temporarily disabled - infinite loop
|
||||
# if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
# 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
|
||||
|
||||
# Bdev and configuration cleanup below this line
|
||||
@ -294,4 +292,3 @@ rm -f /tmp/aiofile
|
||||
rm -f /tmp/spdk-pmem-pool
|
||||
rm -f $testdir/bdev.conf
|
||||
rbd_cleanup
|
||||
report_test_completion "bdev"
|
||||
|
@ -143,4 +143,3 @@ blobfs_fuse_test
|
||||
|
||||
rm -rf $mount_dir
|
||||
rm -f $tmp_file
|
||||
report_test_completion "blobfs"
|
||||
|
@ -134,5 +134,3 @@ trap - SIGINT SIGTERM EXIT
|
||||
|
||||
run_bsdump
|
||||
rm -f $ROCKSDB_CONF
|
||||
|
||||
report_test_completion "blobfs"
|
||||
|
@ -59,5 +59,3 @@ sync
|
||||
rm -rf $testdir/bdevperf.conf
|
||||
rm -rf $testdir/aio.bdev
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
|
||||
report_test_completion "blob_io_wait"
|
||||
|
@ -330,11 +330,11 @@ function timing_finish() {
|
||||
}
|
||||
|
||||
function create_test_list() {
|
||||
grep -rshI --exclude="autotest_common.sh" --exclude="$rootdir/test/common/autotest_common.sh" -e "report_test_completion" $rootdir | sed 's/report_test_completion//g; s/[[:blank:]]//g; s/"//g;' > $output_dir/all_tests.txt || true
|
||||
}
|
||||
|
||||
function report_test_completion() {
|
||||
echo "$1" >> $output_dir/test_completions.txt
|
||||
grep -rshI --exclude="autotest_common.sh" \
|
||||
--exclude="$rootdir/test/common/autotest_common.sh" \
|
||||
-e "run_test " $rootdir | grep -v "#" \
|
||||
| sed 's/^.*run_test/run_test/' | awk '{print $2}' | \
|
||||
sed 's/\"//g' | sort > $output_dir/all_tests.txt || true
|
||||
}
|
||||
|
||||
function process_core() {
|
||||
@ -602,6 +602,7 @@ function run_test() {
|
||||
echo "END TEST $test_name"
|
||||
echo "************************************"
|
||||
|
||||
echo "$test_name" >> $output_dir/test_completions.txt
|
||||
timing_exit $test_name
|
||||
xtrace_restore
|
||||
}
|
||||
|
2
test/env/env.sh
vendored
2
test/env/env.sh
vendored
@ -25,5 +25,3 @@ if [ $(uname) = Linux ]; then
|
||||
# supported on Linux
|
||||
run_test "env_mem_callbacks" $testdir/mem_callbacks/mem_callbacks
|
||||
fi
|
||||
|
||||
report_test_completion "env"
|
||||
|
@ -7,4 +7,3 @@ source $rootdir/test/common/autotest_common.sh
|
||||
run_test "event_perf" $testdir/event_perf/event_perf -m 0xF -t 1
|
||||
run_test "event_reactor" $testdir/reactor/reactor -t 1
|
||||
run_test "event_reactor_perf" $testdir/reactor_perf/reactor_perf -t 1
|
||||
report_test_completion "event"
|
||||
|
@ -15,5 +15,3 @@ for (( i=0; i<${#tests[@]}; i++ )) do
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -c $ftl_bdev_conf ${tests[$i]}
|
||||
timing_exit "${tests[$i]}"
|
||||
done
|
||||
|
||||
report_test_completion ftl_bdevperf
|
||||
|
@ -86,7 +86,5 @@ echo 3 > /proc/sys/vm/drop_caches
|
||||
dd if=/dev/nbd0 bs=4K count=$data_size | md5sum -c $testdir/testfile.md5
|
||||
dd if=/dev/nbd0 bs=4K count=$chunk_size skip=$data_size | md5sum -c $testdir/testfile2.md5
|
||||
|
||||
report_test_completion ftl_dirty_shutdown
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
restore_kill
|
||||
|
@ -36,5 +36,3 @@ for test in ${tests}; do
|
||||
fio_bdev $testdir/config/fio/$test.fio
|
||||
timing_exit $test
|
||||
done
|
||||
|
||||
report_test_completion ftl_fio
|
||||
|
@ -92,7 +92,5 @@ echo 3 > /proc/sys/vm/drop_caches
|
||||
md5sum -c $testdir/testfile.md5
|
||||
md5sum -c $testdir/testfile2.md5
|
||||
|
||||
report_test_completion occsd_restore
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
restore_kill
|
||||
|
@ -7,5 +7,3 @@ source $rootdir/test/common/autotest_common.sh
|
||||
run_test "ioat_perf" $rootdir/examples/ioat/perf/ioat_perf -t 1
|
||||
|
||||
run_test "ioat_verify" $rootdir/examples/ioat/verify/verify -t 1
|
||||
|
||||
report_test_completion "ioat"
|
||||
|
@ -52,4 +52,3 @@ trap - SIGINT SIGTERM EXIT
|
||||
killprocess $pid
|
||||
|
||||
iscsitestfini $1 $2
|
||||
report_test_completion "bdev_io_wait"
|
||||
|
@ -129,4 +129,3 @@ fi
|
||||
|
||||
killprocess $pid
|
||||
iscsitestfini $1 $2
|
||||
report_test_completion "nightly_iscsi_ext4test"
|
||||
|
@ -54,4 +54,3 @@ trap - SIGINT SIGTERM EXIT
|
||||
killprocess $pid
|
||||
|
||||
iscsitestfini $1 $2
|
||||
report_test_completion "iscsi_initiator"
|
||||
|
@ -127,4 +127,3 @@ iscsicleanup
|
||||
|
||||
$rpc_py -s $rpc_second_addr spdk_kill_instance SIGTERM
|
||||
iscsitestfini $1 $2
|
||||
report_test_completion "iscsi_ip_migration"
|
||||
|
@ -97,6 +97,5 @@ iscsicleanup
|
||||
killprocess $iscsipid
|
||||
$rpc_py nvmf_delete_subsystem nqn.2016-06.io.spdk:cnode1
|
||||
|
||||
report_test_completion "iscsi_nvme_remote"
|
||||
iscsitestfini $1 $2
|
||||
nvmftestfini
|
||||
|
@ -72,4 +72,3 @@ trap - SIGINT SIGTERM EXIT
|
||||
rm -f ./local-job*
|
||||
rm -f /tmp/pool_file*
|
||||
killprocess $pid
|
||||
report_test_completion "nightly_iscsi_pmem"
|
||||
|
@ -65,4 +65,3 @@ killprocess $pid
|
||||
rbd_cleanup
|
||||
|
||||
iscsitestfini $1 $2
|
||||
report_test_completion "iscsi_rbd"
|
||||
|
@ -96,7 +96,6 @@ trap '-' SIGINT SIGTERM EXIT
|
||||
# NOTE: socat returns code 143 on SIGINT
|
||||
killprocess $server_pid || true
|
||||
|
||||
report_test_completion "sock_client"
|
||||
timing_exit sock_client
|
||||
|
||||
# ----------------
|
||||
@ -123,5 +122,4 @@ trap - SIGINT SIGTERM EXIT
|
||||
killprocess $server_pid
|
||||
|
||||
iscsitestfini $1 $2
|
||||
report_test_completion "sock_server"
|
||||
timing_exit sock_server
|
||||
|
@ -140,5 +140,4 @@ kill -9 $qemupid
|
||||
rm "$qemu_pidfile"
|
||||
rm "$test_img"
|
||||
|
||||
report_test_completion "nvme_hotplug"
|
||||
timing_exit hotplug_test
|
||||
|
@ -20,8 +20,6 @@ driver=$3
|
||||
declare -i io_time=5
|
||||
declare -i kernel_hotplug_time=7
|
||||
|
||||
timing_enter hotplug_hw
|
||||
|
||||
timing_enter hotplug_hw_cfg
|
||||
|
||||
# Configure microcontroller
|
||||
@ -74,7 +72,4 @@ timing_exit wait_for_example
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
|
||||
report_test_completion "nvme_hotplug_hw"
|
||||
timing_exit hotplug_hw_test
|
||||
|
||||
timing_exit hotplug_hw
|
||||
|
@ -20,7 +20,6 @@ function nvme_perf {
|
||||
if [ -b /dev/ram0 ]; then
|
||||
# Test perf with AIO device
|
||||
$rootdir/examples/nvme/perf/perf /dev/ram0 -q 128 -w read -o 12288 -t 1 -LL -i 0
|
||||
report_test_completion "nvme_perf"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -29,7 +28,6 @@ function nvme_fio_test {
|
||||
for bdf in $(iter_pci_class_code 01 08 02); do
|
||||
for blkname in $(get_nvme_name_from_bdf $bdf); do
|
||||
fio_nvme $PLUGIN_DIR/example_config.fio --filename="trtype=PCIe traddr=${bdf//:/.} ns=${blkname##*n}"
|
||||
report_test_completion "nvme_fio"
|
||||
done
|
||||
done
|
||||
}
|
||||
@ -42,7 +40,6 @@ function nvme_multi_secondary {
|
||||
$rootdir/examples/nvme/perf/perf -i 0 -q 16 -w read -o 4096 -t 3 -c 0x4
|
||||
wait $pid0
|
||||
wait $pid1
|
||||
report_test_completion "nvme_multi_secondary"
|
||||
}
|
||||
|
||||
if [ $(uname) = Linux ]; then
|
||||
|
@ -48,5 +48,3 @@ if [ $(uname) = Linux ]; then
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
kill_stub
|
||||
fi
|
||||
|
||||
report_test_completion spdk_nvme_cli
|
||||
|
@ -70,5 +70,3 @@ fi
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
killprocess $spdk_tgt_pid
|
||||
|
||||
report_test_completion spdk_nvme_cli_cuse
|
||||
|
@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../..)
|
||||
source $rootdir/scripts/common.sh
|
||||
source $rootdir/test/common/autotest_common.sh
|
||||
|
||||
timing_enter nvme_smartctl_cuse
|
||||
|
||||
SMARTCTL_CMD='smartctl -d nvme'
|
||||
rpc_py=$rootdir/scripts/rpc.py
|
||||
|
||||
@ -80,6 +78,3 @@ fi
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
killprocess $spdk_tgt_pid
|
||||
|
||||
report_test_completion spdk_nvme_smartctl_cuse
|
||||
timing_exit nvme_smartctl_cuse
|
||||
|
@ -56,5 +56,3 @@ timing_exit host
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
revert_soft_roce
|
||||
|
||||
report_test_completion "nvmf"
|
||||
|
@ -73,4 +73,3 @@ $rpc_py nvmf_delete_subsystem nqn.2016-06.io.spdk:cnode1
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
|
||||
nvmftestfini
|
||||
report_test_completion "nvmf_spdk_nvme_cli"
|
||||
|
@ -12,5 +12,3 @@ run_test "ocf_create_destruct" "$testdir/management/create-destruct.sh"
|
||||
run_test "ocf_multicore" "$testdir/management/multicore.sh"
|
||||
run_test "ocf_persistent_metadata" "$testdir/management/persistent-metadata.sh"
|
||||
run_test "ocf_remove" "$testdir/management/remove.sh"
|
||||
|
||||
report_test_completion "ocf"
|
||||
|
@ -691,5 +691,4 @@ if $test_delete_bdev || $test_all; then
|
||||
fi
|
||||
|
||||
pmem_clean_pool_file
|
||||
report_test_completion "pmem"
|
||||
vhost_kill 0
|
||||
|
@ -70,4 +70,3 @@ $spdkcli_job "'/iscsi/auth_groups delete_secret 1 test2' 'user=test2'
|
||||
timing_exit spdkcli_clear_iscsi_config
|
||||
|
||||
killprocess $iscsi_tgt_pid
|
||||
report_test_completion spdk_cli
|
||||
|
@ -83,4 +83,3 @@ timing_exit spdkcli_clear_nvmf_config
|
||||
|
||||
killprocess $nvmf_tgt_pid
|
||||
#revert_soft_roce
|
||||
report_test_completion spdk_cli_nvmf
|
||||
|
@ -45,4 +45,3 @@ rm -f $testdir/match_files/spdkcli_pmem_info.test
|
||||
timing_exit spdkcli_clear_pmem_config
|
||||
|
||||
killprocess $spdk_tgt_pid
|
||||
report_test_completion spdk_cli
|
||||
|
@ -44,4 +44,3 @@ $spdkcli_job "'/bdevs/malloc delete Malloc1' '' True
|
||||
timing_exit spdkcli_delete_malloc
|
||||
|
||||
killprocess $spdk_tgt_pid
|
||||
report_test_completion spdk_cli
|
||||
|
@ -30,5 +30,3 @@ rbd_cleanup
|
||||
timing_exit spdkcli_clear_rbd_config
|
||||
|
||||
killprocess $spdk_tgt_pid
|
||||
|
||||
report_test_completion spdk_cli_rbd
|
||||
|
@ -58,5 +58,3 @@ waitfortcplisten $spdk_tgt_pid $IP_ADDRESS $PORT
|
||||
timing_exit run_spdk_tgt_tcp
|
||||
|
||||
killprocess $spdk_tgt_pid
|
||||
|
||||
report_test_completion spdkcli_tcp
|
||||
|
@ -142,5 +142,3 @@ rm -f /tmp/sample_aio
|
||||
timing_exit spdkcli_load_config
|
||||
|
||||
killprocess $vhost_tgt_pid
|
||||
|
||||
report_test_completion spdk_cli_vhost
|
||||
|
@ -99,7 +99,6 @@ timing_exit create_bdev_config
|
||||
timing_enter run_spdk_fio
|
||||
run_spdk_fio $testdir/bdev.fio --filename=$virtio_bdevs --section=job_randwrite --section=job_randrw \
|
||||
--section=job_write --section=job_rw --spdk_conf=$testdir/bdev.conf
|
||||
report_test_completion "vhost_run_spdk_fio"
|
||||
timing_exit run_spdk_fio
|
||||
|
||||
timing_enter run_spdk_fio_unmap
|
||||
|
@ -60,7 +60,6 @@ case $1 in
|
||||
--vm=3,$VM_IMAGE,Nvme0n1p6:Nvme0n1p7 \
|
||||
--test-type=spdk_vhost_scsi \
|
||||
--fio-jobs=$WORKDIR/hotplug/fio_jobs/default_integrity.job -x
|
||||
report_test_completion "vhost_hotplug"
|
||||
;;
|
||||
-shr|--scsi-hot-remove)
|
||||
echo 'Running scsi hotremove tests suite...'
|
||||
|
@ -30,10 +30,8 @@ DISKS_NUMBER=$(lspci -mm -n | grep 0108 | tr -d '"' | awk -F " " '{print "0000:"
|
||||
WORKDIR=$(readlink -f $(dirname $0))
|
||||
|
||||
run_test "vhost_negative" $WORKDIR/other/negative.sh
|
||||
report_test_completion "vhost_negative"
|
||||
|
||||
run_test "vhost_boot" $WORKDIR/vhost_boot/vhost_boot.sh --vm_image=$VM_IMAGE
|
||||
report_test_completion "vhost_boot"
|
||||
|
||||
if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
echo 'Running blk integrity suite...'
|
||||
@ -41,22 +39,18 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
--vm=0,$VM_IMAGE,Nvme0n1p0:RaidBdev0:RaidBdev1:RaidBdev2 \
|
||||
--test-type=spdk_vhost_blk \
|
||||
--fio-job=$WORKDIR/common/fio_jobs/default_integrity.job
|
||||
report_test_completion "nightly_vhost_integrity_blk"
|
||||
|
||||
echo 'Running SCSI integrity suite...'
|
||||
run_test "vhost_scsi_integrity" $WORKDIR/fiotest/fio.sh -x --fio-bin=$FIO_BIN \
|
||||
--vm=0,$VM_IMAGE,Nvme0n1p0:RaidBdev0:RaidBdev1:RaidBdev2 \
|
||||
--test-type=spdk_vhost_scsi \
|
||||
--fio-job=$WORKDIR/common/fio_jobs/default_integrity.job
|
||||
report_test_completion "nightly_vhost_integrity"
|
||||
|
||||
echo 'Running filesystem integrity suite with SCSI...'
|
||||
run_test "vhost_scsi_fs_integrity" $WORKDIR/integrity/integrity_start.sh --ctrl-type=spdk_vhost_scsi --fs="xfs ntfs btrfs ext4"
|
||||
report_test_completion "vhost_fs_integrity_scsi"
|
||||
|
||||
echo 'Running filesystem integrity suite with BLK...'
|
||||
run_test "vhost_blk_fs_integrity" $WORKDIR/integrity/integrity_start.sh --ctrl-type=spdk_vhost_blk --fs="xfs ntfs btrfs ext4"
|
||||
report_test_completion "vhost_fs_integrity_blk"
|
||||
|
||||
if [[ $DISKS_NUMBER -ge 2 ]]; then
|
||||
echo 'Running lvol integrity nightly suite with two cores and two controllers'
|
||||
@ -96,7 +90,6 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
|
||||
echo 'Running readonly tests suite...'
|
||||
run_test "vhost_readonly" $WORKDIR/readonly/readonly.sh --vm_image=$VM_IMAGE --disk=Nvme0n1 -x
|
||||
report_test_completion "vhost_readonly"
|
||||
|
||||
echo 'Running migration suite...'
|
||||
run_test "vhost_migration" $WORKDIR/migration/migration.sh -x \
|
||||
@ -106,11 +99,9 @@ fi
|
||||
echo 'Running lvol integrity suite...'
|
||||
run_test "vhost_scsi_lvol_integrity" $WORKDIR/lvol/lvol_test.sh -x --fio-bin=$FIO_BIN \
|
||||
--ctrl-type=spdk_vhost_scsi --thin-provisioning
|
||||
report_test_completion "vhost_integrity_lvol_scsi"
|
||||
|
||||
echo 'Running lvol integrity suite...'
|
||||
run_test "vhost_blk_lvol_integrity" $WORKDIR/lvol/lvol_test.sh -x --fio-bin=$FIO_BIN \
|
||||
--ctrl-type=spdk_vhost_blk
|
||||
report_test_completion "vhost_integrity_lvol_blk"
|
||||
|
||||
run_test "spdkcli_vhost" ./test/spdkcli/vhost.sh
|
||||
|
@ -30,7 +30,6 @@ function vmd_fio {
|
||||
PLUGIN_DIR=$rootdir/examples/nvme/fio_plugin
|
||||
for bdf in $pci_devs; do
|
||||
fio_nvme $testdir/config/config.fio --filename="trtype=PCIe traddr=${bdf//:/.} ns=1"
|
||||
report_test_completion "bdev_fio"
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user