112e840b9SSeth Howell#!/usr/bin/env bash 2eb53c232Spaul luse# SPDX-License-Identifier: BSD-3-Clause 3eb53c232Spaul luse# Copyright (C) 2018 Intel Corporation 4eb53c232Spaul luse# All rights reserved. 5c74b8b60SMike Gerdts# Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 612e840b9SSeth Howell# 712e840b9SSeth Howell# Environment variables: 812e840b9SSeth Howell# $valgrind Specify the valgrind command line, if not 912e840b9SSeth Howell# then a default command line is used 1012e840b9SSeth Howell 1112e840b9SSeth Howellset -xe 1212e840b9SSeth Howell 1312e840b9SSeth Howelltestdir=$(readlink -f $(dirname $0)) 14f565a9fbSDaniel Verkamprootdir=$(readlink -f $(dirname $0)/../..) 15986c9155SSeth Howellsource "$rootdir/test/common/autotest_common.sh" 1612e840b9SSeth Howell 17f1acfee3SDaniel Verkampcd "$rootdir" 18f1acfee3SDaniel Verkamp 19844c8ec3SMichal Bergerfunction unittest_bdev() { 20986c9155SSeth Howell $valgrind $testdir/lib/bdev/bdev.c/bdev_ut 21d7cdcbf0SShuhei Matsumoto $valgrind $testdir/lib/bdev/nvme/bdev_nvme.c/bdev_nvme_ut 2211495b5cSArtur Paszkiewicz $valgrind $testdir/lib/bdev/raid/bdev_raid.c/bdev_raid_ut 2377b8f7b6SArtur Paszkiewicz $valgrind $testdir/lib/bdev/raid/bdev_raid_sb.c/bdev_raid_sb_ut 2464eebbd1Syupeng $valgrind $testdir/lib/bdev/raid/concat.c/concat_ut 25698da718SArtur Paszkiewicz $valgrind $testdir/lib/bdev/raid/raid0.c/raid0_ut 2669038a94SKrzysztof Smolinski $valgrind $testdir/lib/bdev/raid/raid1.c/raid1_ut 27986c9155SSeth Howell $valgrind $testdir/lib/bdev/bdev_zone.c/bdev_zone_ut 28986c9155SSeth Howell $valgrind $testdir/lib/bdev/gpt/gpt.c/gpt_ut 29986c9155SSeth Howell $valgrind $testdir/lib/bdev/part.c/part_ut 30986c9155SSeth Howell $valgrind $testdir/lib/bdev/scsi_nvme.c/scsi_nvme_ut 31986c9155SSeth Howell $valgrind $testdir/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut 32986c9155SSeth Howell $valgrind $testdir/lib/bdev/vbdev_zone_block.c/vbdev_zone_block_ut 33986c9155SSeth Howell $valgrind $testdir/lib/bdev/mt/bdev.c/bdev_ut 34986c9155SSeth Howell} 35c5467556SPawel Wodkowski 36844c8ec3SMichal Bergerfunction unittest_blob() { 3747c45d24SJim Harris # We do not compile blob_ut on systems with too old Cunit, so do 3847c45d24SJim Harris # not try to execute it if it doesn't exist 3947c45d24SJim Harris if [[ -e $testdir/lib/blob/blob.c/blob_ut ]]; then 4038cde5bcSSeth Howell $valgrind $testdir/lib/blob/blob.c/blob_ut 4147c45d24SJim Harris fi 42c74b8b60SMike Gerdts $valgrind $testdir/lib/blob/blob_bdev.c/blob_bdev_ut 4338cde5bcSSeth Howell $valgrind $testdir/lib/blobfs/tree.c/tree_ut 4438cde5bcSSeth Howell $valgrind $testdir/lib/blobfs/blobfs_async_ut/blobfs_async_ut 4538cde5bcSSeth Howell # blobfs_sync_ut hangs when run under valgrind, so don't use $valgrind 4638cde5bcSSeth Howell $testdir/lib/blobfs/blobfs_sync_ut/blobfs_sync_ut 4738cde5bcSSeth Howell $valgrind $testdir/lib/blobfs/blobfs_bdev.c/blobfs_bdev_ut 4838cde5bcSSeth Howell} 4938cde5bcSSeth Howell 50844c8ec3SMichal Bergerfunction unittest_event() { 5141c30a72SSeth Howell $valgrind $testdir/lib/event/app.c/app_ut 5241c30a72SSeth Howell $valgrind $testdir/lib/event/reactor.c/reactor_ut 5341c30a72SSeth Howell} 5441c30a72SSeth Howell 55293cdc48SArtur Paszkiewiczfunction unittest_ftl() { 56a05d3047SArtur Paszkiewicz $valgrind $testdir/lib/ftl/ftl_band.c/ftl_band_ut 57f1b079b4SArtur Paszkiewicz $valgrind $testdir/lib/ftl/ftl_bitmap.c/ftl_bitmap_ut 58950cce2cSKozlowski Mateusz $valgrind $testdir/lib/ftl/ftl_io.c/ftl_io_ut 59293cdc48SArtur Paszkiewicz $valgrind $testdir/lib/ftl/ftl_mngt/ftl_mngt_ut 600da057a4SKozlowski Mateusz $valgrind $testdir/lib/ftl/ftl_mempool.c/ftl_mempool_ut 61ae6a3525SKozlowski Mateusz $valgrind $testdir/lib/ftl/ftl_l2p/ftl_l2p_ut 622bb1753bSLukasz Lasek $valgrind $testdir/lib/ftl/ftl_sb/ftl_sb_ut 632bb1753bSLukasz Lasek $valgrind $testdir/lib/ftl/ftl_layout_upgrade/ftl_layout_upgrade_ut 644061ed11SMateusz Kozlowski $valgrind $testdir/lib/ftl/ftl_p2l.c/ftl_p2l_ut 65293cdc48SArtur Paszkiewicz} 66293cdc48SArtur Paszkiewicz 67844c8ec3SMichal Bergerfunction unittest_iscsi() { 68d7241356SSeth Howell $valgrind $testdir/lib/iscsi/conn.c/conn_ut 69d7241356SSeth Howell $valgrind $testdir/lib/iscsi/param.c/param_ut 7002d4c2b3STomasz Zawadzki $valgrind $testdir/lib/iscsi/tgt_node.c/tgt_node_ut 71d7241356SSeth Howell $valgrind $testdir/lib/iscsi/iscsi.c/iscsi_ut 7202d4c2b3STomasz Zawadzki $valgrind $testdir/lib/iscsi/init_grp.c/init_grp_ut 7302d4c2b3STomasz Zawadzki $valgrind $testdir/lib/iscsi/portal_grp.c/portal_grp_ut 74d7241356SSeth Howell} 75d7241356SSeth Howell 76844c8ec3SMichal Bergerfunction unittest_json() { 7744616ea5SSeth Howell $valgrind $testdir/lib/json/json_parse.c/json_parse_ut 7844616ea5SSeth Howell $valgrind $testdir/lib/json/json_util.c/json_util_ut 7944616ea5SSeth Howell $valgrind $testdir/lib/json/json_write.c/json_write_ut 8044616ea5SSeth Howell $valgrind $testdir/lib/jsonrpc/jsonrpc_server.c/jsonrpc_server_ut 8144616ea5SSeth Howell} 8244616ea5SSeth Howell 831ab3531eSChengqiangMengfunction unittest_rpc() { 841ab3531eSChengqiangMeng $valgrind $testdir/lib/rpc/rpc.c/rpc_ut 851ab3531eSChengqiangMeng} 861ab3531eSChengqiangMeng 87844c8ec3SMichal Bergerfunction unittest_nvme() { 88ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme.c/nvme_ut 89ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut 90ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_ctrlr_cmd.c/nvme_ctrlr_cmd_ut 91ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_ctrlr_ocssd_cmd.c/nvme_ctrlr_ocssd_cmd_ut 92ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_ns.c/nvme_ns_ut 93ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_ns_cmd.c/nvme_ns_cmd_ut 94ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_ns_ocssd_cmd.c/nvme_ns_ocssd_cmd_ut 95ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_qpair.c/nvme_qpair_ut 96ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_pcie.c/nvme_pcie_ut 97ccf0fd4eSSeth Howell $valgrind $testdir/lib/nvme/nvme_poll_group.c/nvme_poll_group_ut 98ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_quirks.c/nvme_quirks_ut 99ad73816cSSeth Howell $valgrind $testdir/lib/nvme/nvme_tcp.c/nvme_tcp_ut 100504031d8SMao Jiang $valgrind $testdir/lib/nvme/nvme_transport.c/nvme_transport_ut 1012b2a297dSMao Jiang $valgrind $testdir/lib/nvme/nvme_io_msg.c/nvme_io_msg_ut 102550a0b95SMao Jiang $valgrind $testdir/lib/nvme/nvme_pcie_common.c/nvme_pcie_common_ut 103d88ccda6SMao Jiang $valgrind $testdir/lib/nvme/nvme_fabric.c/nvme_fabric_ut 104e9d964bdSMao Jiang $valgrind $testdir/lib/nvme/nvme_opal.c/nvme_opal_ut 105ad73816cSSeth Howell} 106ad73816cSSeth Howell 107844c8ec3SMichal Bergerfunction unittest_nvmf() { 1080c697720SSeth Howell $valgrind $testdir/lib/nvmf/ctrlr.c/ctrlr_ut 1090c697720SSeth Howell $valgrind $testdir/lib/nvmf/ctrlr_bdev.c/ctrlr_bdev_ut 1100c697720SSeth Howell $valgrind $testdir/lib/nvmf/ctrlr_discovery.c/ctrlr_discovery_ut 1110c697720SSeth Howell $valgrind $testdir/lib/nvmf/subsystem.c/subsystem_ut 1120c697720SSeth Howell $valgrind $testdir/lib/nvmf/tcp.c/tcp_ut 1132ddc2b3cSMao Jiang $valgrind $testdir/lib/nvmf/nvmf.c/nvmf_ut 1140c697720SSeth Howell} 1150c697720SSeth Howell 116844c8ec3SMichal Bergerfunction unittest_scsi() { 117d6050f9bSSeth Howell $valgrind $testdir/lib/scsi/dev.c/dev_ut 118d6050f9bSSeth Howell $valgrind $testdir/lib/scsi/lun.c/lun_ut 119d6050f9bSSeth Howell $valgrind $testdir/lib/scsi/scsi.c/scsi_ut 120d6050f9bSSeth Howell $valgrind $testdir/lib/scsi/scsi_bdev.c/scsi_bdev_ut 121d6050f9bSSeth Howell $valgrind $testdir/lib/scsi/scsi_pr.c/scsi_pr_ut 122d6050f9bSSeth Howell} 123d6050f9bSSeth Howell 124844c8ec3SMichal Bergerfunction unittest_sock() { 125c515a7caSZiye Yang $valgrind $testdir/lib/sock/sock.c/sock_ut 126c515a7caSZiye Yang $valgrind $testdir/lib/sock/posix.c/posix_ut 127cd8b9455SZiye Yang # Check whether uring is configured 128ab79d382SMichal Berger if [[ $CONFIG_URING == y ]]; then 129cd8b9455SZiye Yang $valgrind $testdir/lib/sock/uring.c/uring_ut 130cd8b9455SZiye Yang fi 131c515a7caSZiye Yang} 132c515a7caSZiye Yang 133844c8ec3SMichal Bergerfunction unittest_util() { 134cb57725fSSeth Howell $valgrind $testdir/lib/util/base64.c/base64_ut 135cb57725fSSeth Howell $valgrind $testdir/lib/util/bit_array.c/bit_array_ut 136cb57725fSSeth Howell $valgrind $testdir/lib/util/cpuset.c/cpuset_ut 137cb57725fSSeth Howell $valgrind $testdir/lib/util/crc16.c/crc16_ut 138cb57725fSSeth Howell $valgrind $testdir/lib/util/crc32_ieee.c/crc32_ieee_ut 139cb57725fSSeth Howell $valgrind $testdir/lib/util/crc32c.c/crc32c_ut 14086d0b37cSSlawomir Ptak $valgrind $testdir/lib/util/crc64.c/crc64_ut 141cb57725fSSeth Howell $valgrind $testdir/lib/util/string.c/string_ut 142cb57725fSSeth Howell $valgrind $testdir/lib/util/dif.c/dif_ut 143cb57725fSSeth Howell $valgrind $testdir/lib/util/iov.c/iov_ut 144ded6d2c7SShuhei Matsumoto $valgrind $testdir/lib/util/math.c/math_ut 145cb57725fSSeth Howell $valgrind $testdir/lib/util/pipe.c/pipe_ut 146*1239ea17SAnkit Kumar if [ $(uname -s) = Linux ]; then 147*1239ea17SAnkit Kumar $valgrind $testdir/lib/util/fd_group.c/fd_group_ut 148*1239ea17SAnkit Kumar fi 149cb57725fSSeth Howell} 150cb57725fSSeth Howell 151fe5061e1SAnton Nayshtutfunction unittest_fsdev() { 152fe5061e1SAnton Nayshtut $valgrind $testdir/lib/fsdev/fsdev.c/fsdev_ut 153fe5061e1SAnton Nayshtut} 154fe5061e1SAnton Nayshtut 155af935f76SBen Walkerfunction unittest_init() { 156af935f76SBen Walker $valgrind $testdir/lib/init/subsystem.c/subsystem_ut 157af935f76SBen Walker} 158af935f76SBen Walker 159492cd954SKamil Godzwonif [ $SPDK_RUN_VALGRIND -eq 1 ] && [ $SPDK_RUN_ASAN -eq 1 ]; then 160492cd954SKamil Godzwon echo "ERR: Tests cannot be run if both SPDK_RUN_VALGRIND and SPDK_RUN_ASAN options are selected simultaneously" 161492cd954SKamil Godzwon exit 1 162492cd954SKamil Godzwonfi 163492cd954SKamil Godzwon 16412e840b9SSeth Howell# if ASAN is enabled, use it. If not use valgrind if installed but allow 16512e840b9SSeth Howell# the env variable to override the default shown below. 16612e840b9SSeth Howellif [ -z ${valgrind+x} ]; then 167ab79d382SMichal Berger if [[ $CONFIG_ASAN == n ]] && hash valgrind; then 1681f4a8945SMichal Berger valgrind='valgrind --leak-check=full --error-exitcode=2 --verbose' 16912e840b9SSeth Howell else 17012e840b9SSeth Howell valgrind='' 17112e840b9SSeth Howell fi 17212e840b9SSeth Howellfi 173492cd954SKamil Godzwonif [ $SPDK_RUN_VALGRIND -eq 1 ]; then 174492cd954SKamil Godzwon if [ -n "$valgrind" ]; then 175492cd954SKamil Godzwon run_test "valgrind" echo "Using valgrind for unit tests" 176492cd954SKamil Godzwon else 177492cd954SKamil Godzwon echo "ERR: SPDK_RUN_VALGRIND option is enabled but valgrind is not available" 178492cd954SKamil Godzwon exit 1 179492cd954SKamil Godzwon fi 180492cd954SKamil Godzwonfi 18112e840b9SSeth Howell 18211abc273SMichal Bergerif [[ $CONFIG_COVERAGE == y ]]; then 183fa030043SMichal Berger UT_COVERAGE=$output_dir/ut_coverage 1846f2b8056SMichal Berger mkdir -p "$UT_COVERAGE" 18512e840b9SSeth Howell # zero out coverage data 186125c6010SJim Harris $LCOV -q -c --no-external -i -d . -t "Baseline" -o $UT_COVERAGE/ut_cov_base.info 18712e840b9SSeth Howellfi 188fda97cffStone.zhang 189fda97cffStone.zhang# workaround for valgrind v3.13 on arm64 190fda97cffStone.zhangif [ $(uname -m) = "aarch64" ]; then 191fda97cffStone.zhang export LD_HWCAP_MASK=1 192fda97cffStone.zhangfi 193fda97cffStone.zhang 1941e58cb9eSJin Yurun_test "unittest_pci_event" $valgrind $testdir/lib/env_dpdk/pci_event.c/pci_event_ut 195005d87edSSeth Howellrun_test "unittest_include" $valgrind $testdir/include/spdk/histogram_data.h/histogram_ut 196986c9155SSeth Howellrun_test "unittest_bdev" unittest_bdev 197ab79d382SMichal Bergerif [[ $CONFIG_CRYPTO == y ]]; then 198986c9155SSeth Howell run_test "unittest_bdev_crypto" $valgrind $testdir/lib/bdev/crypto.c/crypto_ut 199bf8e0656SAlexey Marchuk run_test "unittest_bdev_crypto" $valgrind $testdir/lib/accel/dpdk_cryptodev.c/accel_dpdk_cryptodev_ut 20051606ed4SPaul Lusefi 20151606ed4SPaul Luse 202ab79d382SMichal Bergerif [[ $CONFIG_VBDEV_COMPRESS == y ]]; then 20319e2dc38Spaul luse run_test "unittest_bdev_compress" $valgrind $testdir/lib/bdev/compress.c/compress_ut 2047e55f977Spaul luse run_test "unittest_lib_reduce" $valgrind $testdir/lib/reduce/reduce.c/reduce_ut 205b95d2597Spaul lusefi 206b95d2597Spaul luse 207ab79d382SMichal Bergerif [[ $CONFIG_DPDK_COMPRESSDEV == y ]]; then 208de8fb128Spaul luse run_test "unittest_dpdk_compressdev" $valgrind $testdir/lib/accel/dpdk_compressdev.c/accel_dpdk_compressdev_ut 209de8fb128Spaul lusefi 210de8fb128Spaul luse 211ab79d382SMichal Bergerif [[ $CONFIG_RAID5F == y ]]; then 21283a4b155SArtur Paszkiewicz run_test "unittest_bdev_raid5f" $valgrind $testdir/lib/bdev/raid/raid5f.c/raid5f_ut 21373763d40SArtur Paszkiewiczfi 21473763d40SArtur Paszkiewicz 21538cde5bcSSeth Howellrun_test "unittest_blob_blobfs" unittest_blob 21641c30a72SSeth Howellrun_test "unittest_event" unittest_event 217293cdc48SArtur Paszkiewiczif [ $(uname -s) = Linux ]; then 218293cdc48SArtur Paszkiewicz run_test "unittest_ftl" unittest_ftl 219293cdc48SArtur Paszkiewiczfi 22012e840b9SSeth Howell 22134c48f1bSBen Walkerrun_test "unittest_accel" $valgrind $testdir/lib/accel/accel.c/accel_ut 222543bb88cSSeth Howellrun_test "unittest_ioat" $valgrind $testdir/lib/ioat/ioat.c/ioat_ut 223ab79d382SMichal Bergerif [[ $CONFIG_IDXD == y ]]; then 22420698a4aSZiye Yang run_test "unittest_idxd_user" $valgrind $testdir/lib/idxd/idxd_user.c/idxd_user_ut 225f603c272Spaul lusefi 226d7241356SSeth Howellrun_test "unittest_iscsi" unittest_iscsi 22744616ea5SSeth Howellrun_test "unittest_json" unittest_json 2281ab3531eSChengqiangMengrun_test "unittest_rpc" unittest_rpc 229543bb88cSSeth Howellrun_test "unittest_notify" $valgrind $testdir/lib/notify/notify.c/notify_ut 230ad73816cSSeth Howellrun_test "unittest_nvme" unittest_nvme 231543bb88cSSeth Howellrun_test "unittest_log" $valgrind $testdir/lib/log/log.c/log_ut 232543bb88cSSeth Howellrun_test "unittest_lvol" $valgrind $testdir/lib/lvol/lvol.c/lvol_ut 233ab79d382SMichal Bergerif [[ $CONFIG_RDMA == y ]]; then 234ad73816cSSeth Howell run_test "unittest_nvme_rdma" $valgrind $testdir/lib/nvme/nvme_rdma.c/nvme_rdma_ut 23530964540SJim Harris run_test "unittest_nvmf_transport" $valgrind $testdir/lib/nvmf/transport.c/transport_ut 236b5f360c4SShuhei Matsumoto run_test "unittest_rdma" $valgrind $testdir/lib/rdma/common.c/common_ut 237ab79d382SMichal Berger run_test "unittest_nvmf_rdma" $valgrind $testdir/lib/nvmf/rdma.c/rdma_ut 238460cf3e6SSeth Howellfi 23912e840b9SSeth Howell 240ab79d382SMichal Bergerif [[ $CONFIG_NVME_CUSE == y ]]; then 2417f3090bbSJim Harris run_test "unittest_nvme_cuse" $valgrind $testdir/lib/nvme/nvme_cuse.c/nvme_cuse_ut 24211f119e2SMao Jiangfi 24311f119e2SMao Jiang 2440c697720SSeth Howellrun_test "unittest_nvmf" unittest_nvmf 245ab79d382SMichal Bergerif [[ $CONFIG_FC == y ]]; then 2460c697720SSeth Howell run_test "unittest_nvmf_fc" $valgrind $testdir/lib/nvmf/fc.c/fc_ut 2470c697720SSeth Howell run_test "unittest_nvmf_fc_ls" $valgrind $testdir/lib/nvmf/fc_ls.c/fc_ls_ut 2480c697720SSeth Howellfi 2490c697720SSeth Howell 250ab79d382SMichal Bergerif [[ $CONFIG_VFIO_USER == y ]]; then 251fa6039abSTomasz Zawadzki run_test "unittest_nvmf_vfio_user" $valgrind $testdir/lib/nvmf/vfio_user.c/vfio_user_ut 252fa6039abSTomasz Zawadzkifi 253fa6039abSTomasz Zawadzki 254543bb88cSSeth Howellrun_test "unittest_scsi" unittest_scsi 255fe5061e1SAnton Nayshtutif [ $(uname -s) = Linux ]; then 2561922700eSJim Harris # There are several intermittent sock_ut failures on FreeBSD that need to be debugged. 2571922700eSJim Harris # So just disable running it on FreeBSD for now. See issue #2943. 258c515a7caSZiye Yang run_test "unittest_sock" unittest_sock 2591922700eSJim Harrisfi 260005d87edSSeth Howellrun_test "unittest_thread" $valgrind $testdir/lib/thread/thread.c/thread_ut 261a9bcb7f2SBen Walkerrun_test "unittest_iobuf" $valgrind $testdir/lib/thread/iobuf.c/iobuf_ut 262cb57725fSSeth Howellrun_test "unittest_util" unittest_util 263ab79d382SMichal Bergerif [[ $CONFIG_FSDEV == y ]]; then 264d4767026SJim Harris run_test "unittest_fsdev" unittest_fsdev 265d4767026SJim Harrisfi 266ab79d382SMichal Bergerif [[ $CONFIG_VHOST == y ]]; then 267005d87edSSeth Howell run_test "unittest_vhost" $valgrind $testdir/lib/vhost/vhost.c/vhost_ut 26870b86ec9SWojciech Malikowskifi 2694e527910SAlexey Marchukrun_test "unittest_dma" $valgrind $testdir/lib/dma/dma.c/dma_ut 27070b86ec9SWojciech Malikowski 271af935f76SBen Walkerrun_test "unittest_init" unittest_init 272de8e38bdSKonrad Sztyberrun_test "unittest_keyring" $valgrind "$testdir/lib/keyring/keyring.c/keyring_ut" 273af935f76SBen Walker 27411abc273SMichal Bergerif [[ $CONFIG_COVERAGE == y ]]; then 275125c6010SJim Harris $LCOV -q -d . -c --no-external -t "$(hostname)" -o $UT_COVERAGE/ut_cov_test.info 27612e840b9SSeth Howell $LCOV -q -a $UT_COVERAGE/ut_cov_base.info -a $UT_COVERAGE/ut_cov_test.info -o $UT_COVERAGE/ut_cov_total.info 27712e840b9SSeth Howell $LCOV -q -a $UT_COVERAGE/ut_cov_total.info -o $UT_COVERAGE/ut_cov_unit.info 278f565a9fbSDaniel Verkamp $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info "$rootdir/app/*" -o $UT_COVERAGE/ut_cov_unit.info 279764616bcSDaniel Verkamp $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info "$rootdir/dpdk/*" -o $UT_COVERAGE/ut_cov_unit.info 280f565a9fbSDaniel Verkamp $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info "$rootdir/examples/*" -o $UT_COVERAGE/ut_cov_unit.info 281f565a9fbSDaniel Verkamp $LCOV -q -r $UT_COVERAGE/ut_cov_unit.info "$rootdir/test/*" -o $UT_COVERAGE/ut_cov_unit.info 28212e840b9SSeth Howell rm -f $UT_COVERAGE/ut_cov_base.info $UT_COVERAGE/ut_cov_test.info 28312e840b9SSeth Howell genhtml $UT_COVERAGE/ut_cov_unit.info --output-directory $UT_COVERAGE 28450438d3eSMichal Berger echo "Note: coverage report is here: $UT_COVERAGE" 28512e840b9SSeth Howellfi 28612e840b9SSeth Howell 28712e840b9SSeth Howellset +x 28812e840b9SSeth Howell 28912e840b9SSeth Howellecho 29012e840b9SSeth Howellecho 29112e840b9SSeth Howellecho "=====================" 29212e840b9SSeth Howellecho "All unit tests passed" 29312e840b9SSeth Howellecho "=====================" 294ab79d382SMichal Bergerif [[ $CONFIG_ASAN == n && $valgrind = "" ]]; then 29512e840b9SSeth Howell echo "WARN: neither valgrind nor ASAN is enabled!" 29612e840b9SSeth Howellfi 29712e840b9SSeth Howell 29812e840b9SSeth Howellecho 29912e840b9SSeth Howellecho 300