From patchwork Wed Aug 16 15:34:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130418 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02F6643081; Wed, 16 Aug 2023 17:35:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4A8F4324F; Wed, 16 Aug 2023 17:35:33 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 318E64003C; Wed, 16 Aug 2023 17:35:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200132; x=1723736132; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+AyIjOXduHBzG5WxGVrasRlFgrXwzlKwK56VeX8q4Ws=; b=L+B/C2t8g7qK1OvghmgK62LbT4r8EKgxNaiQRV0V7pbaM4FXKI6GBcM+ JaBEqQNcVUlasC+3K6S43FT7VQh6L7qKWSaTDe4rU/h0nqnH9mkRzVn+2 NDlU9BNGWnZ2++Hf/zp85Q6g32rzG3eehETLFyjHL63RRVr0b7CJ5UHA1 NAInn8EeyZoBB+3wgKilDDjRoi6gDnjwtB6/zcnD9jxLNO0k82S/5P+RP qqKalT+aMR8yBaTIViIPKAXgGmuc7tV/H2oGiDlNf+VFN5CqkSjNuKfwq IWJCiG7o9xN7O/hIU/YFKyK9SnRvkjpqHgScRkLdktPK0xG4edjmO15Kb g==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458915935" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458915935" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856212" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856212" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:29 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, stable@dpdk.org, Bruce Richardson Subject: [PATCH v6 01/11] mempool: fix default ops for an empty mempool Date: Wed, 16 Aug 2023 16:34:29 +0100 Message-Id: <20230816153439.551501-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: David Marchand An empty mempool's ops were not initialised to a default value wrt to what the application requested via the flags parameter. As rte_mempool_create() relies on rte_mempool_create_empty(), simply move this ops initialisation to rte_mempool_create_empty(). Fixes: aa10457eb4c2 ("mempool: make mempool populate and free api public") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Bruce Richardson Reviewed-by: Morten Brørup --- lib/mempool/rte_mempool.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index 4d337fca8d..7a7a9bf6db 100644 --- a/lib/mempool/rte_mempool.c +++ b/lib/mempool/rte_mempool.c @@ -914,6 +914,22 @@ rte_mempool_create_empty(const char *name, unsigned n, unsigned elt_size, STAILQ_INIT(&mp->elt_list); STAILQ_INIT(&mp->mem_list); + /* + * Since we have 4 combinations of the SP/SC/MP/MC examine the flags to + * set the correct index into the table of ops structs. + */ + if ((flags & RTE_MEMPOOL_F_SP_PUT) && (flags & RTE_MEMPOOL_F_SC_GET)) + ret = rte_mempool_set_ops_byname(mp, "ring_sp_sc", NULL); + else if (flags & RTE_MEMPOOL_F_SP_PUT) + ret = rte_mempool_set_ops_byname(mp, "ring_sp_mc", NULL); + else if (flags & RTE_MEMPOOL_F_SC_GET) + ret = rte_mempool_set_ops_byname(mp, "ring_mp_sc", NULL); + else + ret = rte_mempool_set_ops_byname(mp, "ring_mp_mc", NULL); + + if (ret) + goto exit_unlock; + /* * local_cache pointer is set even if cache_size is zero. * The local_cache points to just past the elt_pa[] array. @@ -954,7 +970,6 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size, rte_mempool_obj_cb_t *obj_init, void *obj_init_arg, int socket_id, unsigned flags) { - int ret; struct rte_mempool *mp; mp = rte_mempool_create_empty(name, n, elt_size, cache_size, @@ -962,22 +977,6 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size, if (mp == NULL) return NULL; - /* - * Since we have 4 combinations of the SP/SC/MP/MC examine the flags to - * set the correct index into the table of ops structs. - */ - if ((flags & RTE_MEMPOOL_F_SP_PUT) && (flags & RTE_MEMPOOL_F_SC_GET)) - ret = rte_mempool_set_ops_byname(mp, "ring_sp_sc", NULL); - else if (flags & RTE_MEMPOOL_F_SP_PUT) - ret = rte_mempool_set_ops_byname(mp, "ring_sp_mc", NULL); - else if (flags & RTE_MEMPOOL_F_SC_GET) - ret = rte_mempool_set_ops_byname(mp, "ring_mp_sc", NULL); - else - ret = rte_mempool_set_ops_byname(mp, "ring_mp_mc", NULL); - - if (ret) - goto fail; - /* call the mempool priv initializer */ if (mp_init) mp_init(mp, mp_init_arg); From patchwork Wed Aug 16 15:34:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130419 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D5C9A43081; Wed, 16 Aug 2023 17:35:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 078E64325D; Wed, 16 Aug 2023 17:35:35 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 4651C4003C for ; Wed, 16 Aug 2023 17:35:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200133; x=1723736133; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GUo9vMeBsvyknhyGbkUIq/oRylxfk/palneosahIEMw=; b=XAHjbZnWJCso/aEOrDGr6SajlVT9yISsQWhMxvCffx4aQcNrtLlDgKsb aR11euTCBiyd4utAuQX0sDt8UMQp7mlo4eIhmzooAwhy/VA4TBenAFNAW d2S5NWysMtoBjPmip+D0uQ0NLZJ4S2OjC1dR7aimm8dRVA+lS3+lWHPlK MzMcRg2kh8nsVl05dxPTEKTpM5tjOV/e+6xHhNu64gR7IFrhuSRz5cl3b hWNAY1rvZQbNgRx9hYPYSs0JCcSGzv07O+q3uFskn1IzluR5N0cSo87al ACnrhectoOtBerstHLwwjfBkhk49sN9zR5a2UIxrjoyRmgzx20UqVDgBh Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458915940" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458915940" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856221" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856221" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:31 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 02/11] app/test: add new macros for various test types Date: Wed, 16 Aug 2023 16:34:30 +0100 Message-Id: <20230816153439.551501-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Rather than just registering all tests using a single generic macro, add macros which identify the test as being of a particular type. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup --- app/test/test.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/test/test.h b/app/test/test.h index 85f57efbc6..a91ded76af 100644 --- a/app/test/test.h +++ b/app/test/test.h @@ -190,7 +190,7 @@ struct test_command { void add_test_command(struct test_command *t); -/* Register a test function with its command string */ +/* Register a test function with its command string. Should not be used directly */ #define REGISTER_TEST_COMMAND(cmd, func) \ static struct test_command test_struct_##cmd = { \ .command = RTE_STR(cmd), \ @@ -201,4 +201,11 @@ void add_test_command(struct test_command *t); add_test_command(&test_struct_##cmd); \ } +/* Register a test function as a particular type. + * These can be used to build up test suites automatically + */ +#define REGISTER_FAST_TEST(cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func) +#define REGISTER_PERF_TEST REGISTER_TEST_COMMAND +#define REGISTER_DRIVER_TEST REGISTER_TEST_COMMAND + #endif From patchwork Wed Aug 16 15:34:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130420 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CFA5143081; Wed, 16 Aug 2023 17:35:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2132F43262; Wed, 16 Aug 2023 17:35:37 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id B4D6943261 for ; Wed, 16 Aug 2023 17:35:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200135; x=1723736135; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=W63R6HxN4W1zWeRKKBQEUaYOYyzpN2gR4031JZ7HrbU=; b=NbQyEfplmLIi7+cNx3kbK9CV0rA3VTvsdh2ZFc+D8pt8Xj4nw+eSw2ET RvakqHg/9avW6MH6oGfOgLIPQG0Yst3afQOTf4PGYg/1tQr36kVfsQImk +oPZOIpxLMq7ua1q4Fkk9josj7gSM23lHEOKGkAK7NVpQkfOTkV78pJsf n4nh6SEZznbNC+Q/Z2ROboM+6EjuboPrQ3aYi9QdH7k9wQHtJDhgbmm2o 8mfowxwgklQhPMtDB0usZrozYX/By5EJ3wDcLY9QwqtxgKJAJwlXiAucq mAMwH9D7AkrZfs5UHVAAU03pYK6vEASC+Z1TVHhJIpjl8CSiJ3D08tnbp g==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458915948" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458915948" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856229" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856229" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:32 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 03/11] app/test: tag tests with the test type Date: Wed, 16 Aug 2023 16:34:31 +0100 Message-Id: <20230816153439.551501-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Rather than having the test types called out in the meson.build file, we can use macros to identify the test type in the C file itself and then dynamically build up the tests lists at config time. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup --- app/test/test_acl.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_barrier.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bpf.c | 4 +-- app/test/test_byteorder.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cryptodev.c | 38 ++++++++++++------------ app/test/test_cryptodev_asym.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_distributor_perf.c | 2 +- app/test/test_dmadev.c | 2 +- app/test/test_eal_flags.c | 24 +++++++-------- app/test/test_eal_fs.c | 2 +- app/test/test_efd.c | 2 +- app/test/test_efd_perf.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_eventdev.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 4 +-- app/test/test_fib6.c | 4 +-- app/test/test_fib6_perf.c | 2 +- app/test/test_fib_perf.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_functions.c | 2 +- app/test/test_hash_multiwriter.c | 2 +- app/test/test_hash_perf.c | 2 +- app/test/test_hash_readwrite.c | 4 +-- app/test/test_hash_readwrite_lf_perf.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_perf.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_lpm6_perf.c | 2 +- app/test/test_lpm_perf.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_malloc_perf.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_member_perf.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memcpy_perf.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_mempool_perf.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 6 ++-- app/test/test_pmd_perf.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 2 +- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_rand_perf.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_rcu_qsbr_perf.c | 2 +- app/test/test_reassembly_perf.c | 2 +- app/test/test_reciprocal_division.c | 2 +- app/test/test_reciprocal_division_perf.c | 2 +- app/test/test_red.c | 4 +-- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 4 +-- app/test/test_rib6.c | 4 +-- app/test/test_ring.c | 2 +- app/test/test_ring_perf.c | 2 +- app/test/test_rwlock.c | 8 ++--- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 4 +-- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 +-- app/test/test_stack_perf.c | 4 +-- app/test/test_string_fns.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_thash_perf.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_perf.c | 2 +- app/test/test_timer_racecond.c | 2 +- app/test/test_trace.c | 2 +- app/test/test_trace_perf.c | 2 +- app/test/test_version.c | 2 +- 106 files changed, 150 insertions(+), 150 deletions(-) diff --git a/app/test/test_acl.c b/app/test/test_acl.c index 623f34682e..8011639ddd 100644 --- a/app/test/test_acl.c +++ b/app/test/test_acl.c @@ -1749,4 +1749,4 @@ test_acl(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(acl_autotest, test_acl); +REGISTER_FAST_TEST(acl_autotest, true, true, test_acl); diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c index e4b997827e..db07159e81 100644 --- a/app/test/test_atomic.c +++ b/app/test/test_atomic.c @@ -631,4 +631,4 @@ test_atomic(void) return 0; } -REGISTER_TEST_COMMAND(atomic_autotest, test_atomic); +REGISTER_FAST_TEST(atomic_autotest, false, true, test_atomic); diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index ec69af25bf..925a88b68a 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -285,4 +285,4 @@ test_barrier(void) return ret; } -REGISTER_TEST_COMMAND(barrier_autotest, test_barrier); +REGISTER_PERF_TEST(barrier_autotest, test_barrier); diff --git a/app/test/test_bitmap.c b/app/test/test_bitmap.c index e9c61590ae..9a0536c805 100644 --- a/app/test/test_bitmap.c +++ b/app/test/test_bitmap.c @@ -269,4 +269,4 @@ test_bitmap(void) return test_bitmap_all_set(); } -REGISTER_TEST_COMMAND(bitmap_autotest, test_bitmap); +REGISTER_FAST_TEST(bitmap_autotest, true, true, test_bitmap); diff --git a/app/test/test_bitops.c b/app/test/test_bitops.c index c21426bf2f..0d4ccfb468 100644 --- a/app/test/test_bitops.c +++ b/app/test/test_bitops.c @@ -135,4 +135,4 @@ test_bitops(void) return TEST_SUCCESS; } -REGISTER_TEST_COMMAND(bitops_autotest, test_bitops); +REGISTER_FAST_TEST(bitops_autotest, true, true, test_bitops); diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c index f5af5e8a3f..f83e72a9ad 100644 --- a/app/test/test_bpf.c +++ b/app/test/test_bpf.c @@ -3262,7 +3262,7 @@ test_bpf(void) #endif /* !RTE_LIB_BPF */ -REGISTER_TEST_COMMAND(bpf_autotest, test_bpf); +REGISTER_FAST_TEST(bpf_autotest, true, true, test_bpf); #ifndef RTE_HAS_LIBPCAP @@ -3473,4 +3473,4 @@ test_bpf_convert(void) #endif /* RTE_HAS_LIBPCAP */ -REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert); +REGISTER_FAST_TEST(bpf_convert_autotest, true, true, test_bpf_convert); diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c index de14ed539e..67ca7ebbc8 100644 --- a/app/test/test_byteorder.c +++ b/app/test/test_byteorder.c @@ -63,4 +63,4 @@ test_byteorder(void) return 0; } -REGISTER_TEST_COMMAND(byteorder_autotest, test_byteorder); +REGISTER_FAST_TEST(byteorder_autotest, true, true, test_byteorder); diff --git a/app/test/test_cksum.c b/app/test/test_cksum.c index 6c15de9a93..f2ab5af5a7 100644 --- a/app/test/test_cksum.c +++ b/app/test/test_cksum.c @@ -267,4 +267,4 @@ test_cksum(void) } #undef GOTO_FAIL -REGISTER_TEST_COMMAND(cksum_autotest, test_cksum); +REGISTER_FAST_TEST(cksum_autotest, true, true, test_cksum); diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c index 115bee966d..1d8020995c 100644 --- a/app/test/test_cmdline.c +++ b/app/test/test_cmdline.c @@ -60,4 +60,4 @@ test_cmdline(void) return 0; } -REGISTER_TEST_COMMAND(cmdline_autotest, test_cmdline); +REGISTER_FAST_TEST(cmdline_autotest, true, true, test_cmdline); diff --git a/app/test/test_common.c b/app/test/test_common.c index f89e1eb7ee..29452f0a49 100644 --- a/app/test/test_common.c +++ b/app/test/test_common.c @@ -350,4 +350,4 @@ test_common(void) return ret; } -REGISTER_TEST_COMMAND(common_autotest, test_common); +REGISTER_FAST_TEST(common_autotest, true, true, test_common); diff --git a/app/test/test_cpuflags.c b/app/test/test_cpuflags.c index a0e342ae48..4de06983d9 100644 --- a/app/test/test_cpuflags.c +++ b/app/test/test_cpuflags.c @@ -334,4 +334,4 @@ test_cpuflags(void) return 0; } -REGISTER_TEST_COMMAND(cpuflags_autotest, test_cpuflags); +REGISTER_FAST_TEST(cpuflags_autotest, true, true, test_cpuflags); diff --git a/app/test/test_crc.c b/app/test/test_crc.c index 5edc8fb13b..b85fca35fe 100644 --- a/app/test/test_crc.c +++ b/app/test/test_crc.c @@ -171,4 +171,4 @@ test_crc(void) return 0; } -REGISTER_TEST_COMMAND(crc_autotest, test_crc); +REGISTER_FAST_TEST(crc_autotest, true, true, test_crc); diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index fb2af40b99..956268bfcd 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -17535,33 +17535,33 @@ REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_raw_api_autotest, test_cryptodev_dpaa2_sec_raw_api); REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_raw_api_autotest, test_cryptodev_dpaa_sec_raw_api); -REGISTER_TEST_COMMAND(cryptodev_qat_raw_api_autotest, +REGISTER_DRIVER_TEST(cryptodev_qat_raw_api_autotest, test_cryptodev_qat_raw_api); -REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat); -REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb); -REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_mb_autotest, +REGISTER_DRIVER_TEST(cryptodev_qat_autotest, test_cryptodev_qat); +REGISTER_DRIVER_TEST(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb); +REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_mb_autotest, test_cryptodev_cpu_aesni_mb); -REGISTER_TEST_COMMAND(cryptodev_chacha_poly_mb_autotest, +REGISTER_DRIVER_TEST(cryptodev_chacha_poly_mb_autotest, test_cryptodev_chacha_poly_mb); -REGISTER_TEST_COMMAND(cryptodev_openssl_autotest, test_cryptodev_openssl); -REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm); -REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest, +REGISTER_DRIVER_TEST(cryptodev_openssl_autotest, test_cryptodev_openssl); +REGISTER_DRIVER_TEST(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm); +REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_gcm_autotest, test_cryptodev_cpu_aesni_gcm); REGISTER_TEST_COMMAND(cryptodev_mlx5_autotest, test_cryptodev_mlx5); -REGISTER_TEST_COMMAND(cryptodev_null_autotest, test_cryptodev_null); -REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g); -REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi); -REGISTER_TEST_COMMAND(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc); -REGISTER_TEST_COMMAND(cryptodev_sw_armv8_autotest, test_cryptodev_armv8); -REGISTER_TEST_COMMAND(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl); -REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec); -REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec); +REGISTER_DRIVER_TEST(cryptodev_null_autotest, test_cryptodev_null); +REGISTER_DRIVER_TEST(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g); +REGISTER_DRIVER_TEST(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi); +REGISTER_DRIVER_TEST(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc); +REGISTER_DRIVER_TEST(cryptodev_sw_armv8_autotest, test_cryptodev_armv8); +REGISTER_DRIVER_TEST(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl); +REGISTER_DRIVER_TEST(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec); +REGISTER_DRIVER_TEST(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec); REGISTER_TEST_COMMAND(cryptodev_ccp_autotest, test_cryptodev_ccp); -REGISTER_TEST_COMMAND(cryptodev_uadk_autotest, test_cryptodev_uadk); +REGISTER_DRIVER_TEST(cryptodev_uadk_autotest, test_cryptodev_uadk); REGISTER_TEST_COMMAND(cryptodev_virtio_autotest, test_cryptodev_virtio); REGISTER_TEST_COMMAND(cryptodev_octeontx_autotest, test_cryptodev_octeontx); REGISTER_TEST_COMMAND(cryptodev_caam_jr_autotest, test_cryptodev_caam_jr); REGISTER_TEST_COMMAND(cryptodev_nitrox_autotest, test_cryptodev_nitrox); REGISTER_TEST_COMMAND(cryptodev_bcmfs_autotest, test_cryptodev_bcmfs); -REGISTER_TEST_COMMAND(cryptodev_cn9k_autotest, test_cryptodev_cn9k); -REGISTER_TEST_COMMAND(cryptodev_cn10k_autotest, test_cryptodev_cn10k); +REGISTER_DRIVER_TEST(cryptodev_cn9k_autotest, test_cryptodev_cn9k); +REGISTER_DRIVER_TEST(cryptodev_cn10k_autotest, test_cryptodev_cn10k); diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 0ef2642fdd..3d5a73bf89 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -2828,7 +2828,7 @@ test_cryptodev_cn10k_asym(void) REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest, test_cryptodev_openssl_asym); -REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym); +REGISTER_DRIVER_TEST(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym); REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest, test_cryptodev_octeontx_asym); diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c index 66d11e6db8..a7654de176 100644 --- a/app/test/test_cycles.c +++ b/app/test/test_cycles.c @@ -53,4 +53,4 @@ test_user_delay_us(void) return 0; } -REGISTER_TEST_COMMAND(user_delay_us, test_user_delay_us); +REGISTER_FAST_TEST(user_delay_us, true, true, test_user_delay_us); diff --git a/app/test/test_debug.c b/app/test/test_debug.c index 2704f5b927..8ad6d40fcb 100644 --- a/app/test/test_debug.c +++ b/app/test/test_debug.c @@ -140,4 +140,4 @@ test_debug(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(debug_autotest, test_debug); +REGISTER_FAST_TEST(debug_autotest, true, true, test_debug); diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c index 0a4c34a1ad..f977d44448 100644 --- a/app/test/test_devargs.c +++ b/app/test/test_devargs.c @@ -213,4 +213,4 @@ test_devargs(void) return 0; } -REGISTER_TEST_COMMAND(devargs_autotest, test_devargs); +REGISTER_FAST_TEST(devargs_autotest, true, true, test_devargs); diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index 3efa4af104..6cb27f4de1 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -952,4 +952,4 @@ test_distributor(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(distributor_autotest, test_distributor); +REGISTER_FAST_TEST(distributor_autotest, false, true, test_distributor); diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c index ee4321486d..ca868451d7 100644 --- a/app/test/test_distributor_perf.c +++ b/app/test/test_distributor_perf.c @@ -277,4 +277,4 @@ test_distributor_perf(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf); +REGISTER_PERF_TEST(distributor_perf_autotest, test_distributor_perf); diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index 0736ff2a18..6ef875e545 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c @@ -941,4 +941,4 @@ test_dma(void) return 0; } -REGISTER_TEST_COMMAND(dmadev_autotest, test_dma); +REGISTER_DRIVER_TEST(dmadev_autotest, test_dma); diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 148e9098e8..6cb4b06757 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -1644,15 +1644,15 @@ test_memory_flags(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(eal_flags_c_opt_autotest, test_missing_c_flag); -REGISTER_TEST_COMMAND(eal_flags_main_opt_autotest, test_main_lcore_flag); -REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag); -REGISTER_TEST_COMMAND(eal_flags_hpet_autotest, test_no_hpet_flag); -REGISTER_TEST_COMMAND(eal_flags_no_huge_autotest, test_no_huge_flag); -REGISTER_TEST_COMMAND(eal_flags_a_opt_autotest, test_allow_flag); -REGISTER_TEST_COMMAND(eal_flags_b_opt_autotest, test_invalid_b_flag); -REGISTER_TEST_COMMAND(eal_flags_vdev_opt_autotest, test_invalid_vdev_flag); -REGISTER_TEST_COMMAND(eal_flags_r_opt_autotest, test_invalid_r_flag); -REGISTER_TEST_COMMAND(eal_flags_mem_autotest, test_memory_flags); -REGISTER_TEST_COMMAND(eal_flags_file_prefix_autotest, test_file_prefix); -REGISTER_TEST_COMMAND(eal_flags_misc_autotest, test_misc_flags); +REGISTER_FAST_TEST(eal_flags_c_opt_autotest, false, false, test_missing_c_flag); +REGISTER_FAST_TEST(eal_flags_main_opt_autotest, false, false, test_main_lcore_flag); +REGISTER_FAST_TEST(eal_flags_n_opt_autotest, false, false, test_invalid_n_flag); +REGISTER_FAST_TEST(eal_flags_hpet_autotest, false, false, test_no_hpet_flag); +REGISTER_FAST_TEST(eal_flags_no_huge_autotest, false, false, test_no_huge_flag); +REGISTER_FAST_TEST(eal_flags_a_opt_autotest, false, false, test_allow_flag); +REGISTER_FAST_TEST(eal_flags_b_opt_autotest, false, false, test_invalid_b_flag); +REGISTER_FAST_TEST(eal_flags_vdev_opt_autotest, false, false, test_invalid_vdev_flag); +REGISTER_FAST_TEST(eal_flags_r_opt_autotest, false, false, test_invalid_r_flag); +REGISTER_FAST_TEST(eal_flags_mem_autotest, false, false, test_memory_flags); +REGISTER_FAST_TEST(eal_flags_file_prefix_autotest, false, false, test_file_prefix); +REGISTER_FAST_TEST(eal_flags_misc_autotest, false, false, test_misc_flags); diff --git a/app/test/test_eal_fs.c b/app/test/test_eal_fs.c index b3686edcb4..8cd287fa9d 100644 --- a/app/test/test_eal_fs.c +++ b/app/test/test_eal_fs.c @@ -185,4 +185,4 @@ test_eal_fs(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs); +REGISTER_FAST_TEST(eal_fs_autotest, true, true, test_eal_fs); diff --git a/app/test/test_efd.c b/app/test/test_efd.c index fa29e8f97a..1c0986b9bc 100644 --- a/app/test/test_efd.c +++ b/app/test/test_efd.c @@ -473,4 +473,4 @@ test_efd(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(efd_autotest, test_efd); +REGISTER_PERF_TEST(efd_autotest, test_efd); diff --git a/app/test/test_efd_perf.c b/app/test/test_efd_perf.c index 4d04ed93e3..b212e96767 100644 --- a/app/test/test_efd_perf.c +++ b/app/test/test_efd_perf.c @@ -393,4 +393,4 @@ test_efd_perf(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(efd_perf_autotest, test_efd_perf); +REGISTER_PERF_TEST(efd_perf_autotest, test_efd_perf); diff --git a/app/test/test_errno.c b/app/test/test_errno.c index 0db4fbc8b3..b429962fb9 100644 --- a/app/test/test_errno.c +++ b/app/test/test_errno.c @@ -94,4 +94,4 @@ test_errno(void) return 0; } -REGISTER_TEST_COMMAND(errno_autotest, test_errno); +REGISTER_FAST_TEST(errno_autotest, true, true, test_errno); diff --git a/app/test/test_ethdev_link.c b/app/test/test_ethdev_link.c index ab52385a12..f063a5fe26 100644 --- a/app/test/test_ethdev_link.c +++ b/app/test/test_ethdev_link.c @@ -167,4 +167,4 @@ test_link_status(void) return unit_test_suite_runner(&link_status_testsuite); } -REGISTER_TEST_COMMAND(ethdev_link_status, test_link_status); +REGISTER_FAST_TEST(ethdev_link_status, true, true, test_link_status); diff --git a/app/test/test_event_ring.c b/app/test/test_event_ring.c index bc4a6e73f5..3bfb5109b7 100644 --- a/app/test/test_event_ring.c +++ b/app/test/test_event_ring.c @@ -256,4 +256,4 @@ test_event_ring(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(event_ring_autotest, test_event_ring); +REGISTER_FAST_TEST(event_ring_autotest, true, true, test_event_ring); diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c index 336529038e..29354a24c9 100644 --- a/app/test/test_eventdev.c +++ b/app/test/test_eventdev.c @@ -1256,7 +1256,7 @@ test_eventdev_selftest_cn10k(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(eventdev_common_autotest, test_eventdev_common); +REGISTER_FAST_TEST(eventdev_common_autotest, true, true, test_eventdev_common); #ifndef RTE_EXEC_ENV_WINDOWS REGISTER_TEST_COMMAND(eventdev_selftest_sw, test_eventdev_selftest_sw); diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c index a691bf4458..26a51e2a3e 100644 --- a/app/test/test_fbarray.c +++ b/app/test/test_fbarray.c @@ -733,4 +733,4 @@ test_fbarray(void) return unit_test_suite_runner(&fbarray_test_suite); } -REGISTER_TEST_COMMAND(fbarray_autotest, test_fbarray); +REGISTER_FAST_TEST(fbarray_autotest, true, true, test_fbarray); diff --git a/app/test/test_fib.c b/app/test/test_fib.c index eb69d6e2fd..45dccca1f6 100644 --- a/app/test/test_fib.c +++ b/app/test/test_fib.c @@ -415,5 +415,5 @@ test_slow_fib(void) return unit_test_suite_runner(&fib_slow_tests); } -REGISTER_TEST_COMMAND(fib_autotest, test_fib); -REGISTER_TEST_COMMAND(fib_slow_autotest, test_slow_fib); +REGISTER_FAST_TEST(fib_autotest, true, true, test_fib); +REGISTER_PERF_TEST(fib_slow_autotest, test_slow_fib); diff --git a/app/test/test_fib6.c b/app/test/test_fib6.c index 15ad09178a..2f836238fb 100644 --- a/app/test/test_fib6.c +++ b/app/test/test_fib6.c @@ -424,5 +424,5 @@ test_slow_fib6(void) return unit_test_suite_runner(&fib6_slow_tests); } -REGISTER_TEST_COMMAND(fib6_autotest, test_fib6); -REGISTER_TEST_COMMAND(fib6_slow_autotest, test_slow_fib6); +REGISTER_FAST_TEST(fib6_autotest, true, true, test_fib6); +REGISTER_PERF_TEST(fib6_slow_autotest, test_slow_fib6); diff --git a/app/test/test_fib6_perf.c b/app/test/test_fib6_perf.c index add20c2331..a7abc46af9 100644 --- a/app/test/test_fib6_perf.c +++ b/app/test/test_fib6_perf.c @@ -156,4 +156,4 @@ test_fib6_perf(void) return 0; } -REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf); +REGISTER_PERF_TEST(fib6_perf_autotest, test_fib6_perf); diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c index b56293e64f..a9119c1bb0 100644 --- a/app/test/test_fib_perf.c +++ b/app/test/test_fib_perf.c @@ -409,4 +409,4 @@ test_fib_perf(void) return 0; } -REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf); +REGISTER_PERF_TEST(fib_perf_autotest, test_fib_perf); diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c index ae9de6f93d..9296de23b7 100644 --- a/app/test/test_func_reentrancy.c +++ b/app/test/test_func_reentrancy.c @@ -507,4 +507,4 @@ test_func_reentrancy(void) return 0; } -REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy); +REGISTER_FAST_TEST(func_reentrancy_autotest, false, true, test_func_reentrancy); diff --git a/app/test/test_hash.c b/app/test/test_hash.c index 3e45afaa67..d586878a22 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -2264,4 +2264,4 @@ test_hash(void) return 0; } -REGISTER_TEST_COMMAND(hash_autotest, test_hash); +REGISTER_FAST_TEST(hash_autotest, true, true, test_hash); diff --git a/app/test/test_hash_functions.c b/app/test/test_hash_functions.c index 76d51b6e71..70820d1f19 100644 --- a/app/test/test_hash_functions.c +++ b/app/test/test_hash_functions.c @@ -290,4 +290,4 @@ test_hash_functions(void) return 0; } -REGISTER_TEST_COMMAND(hash_functions_autotest, test_hash_functions); +REGISTER_PERF_TEST(hash_functions_autotest, test_hash_functions); diff --git a/app/test/test_hash_multiwriter.c b/app/test/test_hash_multiwriter.c index 0c5a8ca186..dd5ca677b9 100644 --- a/app/test/test_hash_multiwriter.c +++ b/app/test/test_hash_multiwriter.c @@ -287,4 +287,4 @@ test_hash_multiwriter_main(void) return 0; } -REGISTER_TEST_COMMAND(hash_multiwriter_autotest, test_hash_multiwriter_main); +REGISTER_PERF_TEST(hash_multiwriter_autotest, test_hash_multiwriter_main); diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c index 14a1283aba..d66b96e5ce 100644 --- a/app/test/test_hash_perf.c +++ b/app/test/test_hash_perf.c @@ -757,4 +757,4 @@ test_hash_perf(void) return 0; } -REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf); +REGISTER_PERF_TEST(hash_perf_autotest, test_hash_perf); diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c index 6373e62d33..74ca13912f 100644 --- a/app/test/test_hash_readwrite.c +++ b/app/test/test_hash_readwrite.c @@ -760,5 +760,5 @@ test_hash_rw_func_main(void) return 0; } -REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main); -REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main); +REGISTER_FAST_TEST(hash_readwrite_func_autotest, false, true, test_hash_rw_func_main); +REGISTER_PERF_TEST(hash_readwrite_perf_autotest, test_hash_rw_perf_main); diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c index cf86046a2f..5d18850e19 100644 --- a/app/test/test_hash_readwrite_lf_perf.c +++ b/app/test/test_hash_readwrite_lf_perf.c @@ -1579,5 +1579,5 @@ test_hash_readwrite_lf_perf_main(void) return 0; } -REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest, +REGISTER_PERF_TEST(hash_readwrite_lf_perf_autotest, test_hash_readwrite_lf_perf_main); diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c index b59ab42699..3952f9685f 100644 --- a/app/test/test_interrupts.c +++ b/app/test/test_interrupts.c @@ -594,4 +594,4 @@ test_interrupt(void) return ret; } -REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt); +REGISTER_FAST_TEST(interrupt_autotest, true, true, test_interrupt); diff --git a/app/test/test_ipfrag.c b/app/test/test_ipfrag.c index 402ce361c1..8e4df220a2 100644 --- a/app/test/test_ipfrag.c +++ b/app/test/test_ipfrag.c @@ -510,4 +510,4 @@ test_ipfrag(void) } -REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag); +REGISTER_FAST_TEST(ipfrag_autotest, false, true, test_ipfrag); diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index c2a52ec305..6cb1bac1e7 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -2532,4 +2532,4 @@ test_ipsec(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(ipsec_autotest, test_ipsec); +REGISTER_FAST_TEST(ipsec_autotest, true, true, test_ipsec); diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c index b221b7fc32..a32a2086e9 100644 --- a/app/test/test_ipsec_perf.c +++ b/app/test/test_ipsec_perf.c @@ -631,4 +631,4 @@ test_libipsec_perf(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(ipsec_perf_autotest, test_libipsec_perf); +REGISTER_PERF_TEST(ipsec_perf_autotest, test_libipsec_perf); diff --git a/app/test/test_kvargs.c b/app/test/test_kvargs.c index b7b97a0dd9..7a60cac4c1 100644 --- a/app/test/test_kvargs.c +++ b/app/test/test_kvargs.c @@ -292,4 +292,4 @@ test_kvargs(void) return 0; } -REGISTER_TEST_COMMAND(kvargs_autotest, test_kvargs); +REGISTER_FAST_TEST(kvargs_autotest, true, true, test_kvargs); diff --git a/app/test/test_lcores.c b/app/test/test_lcores.c index 2c945b0136..87dcf0590e 100644 --- a/app/test/test_lcores.c +++ b/app/test/test_lcores.c @@ -412,4 +412,4 @@ test_lcores(void) return TEST_SUCCESS; } -REGISTER_TEST_COMMAND(lcores_autotest, test_lcores); +REGISTER_FAST_TEST(lcores_autotest, true, true, test_lcores); diff --git a/app/test/test_logs.c b/app/test/test_logs.c index 8da8824bee..43b09704a3 100644 --- a/app/test/test_logs.c +++ b/app/test/test_logs.c @@ -158,4 +158,4 @@ test_logs(void) return 0; } -REGISTER_TEST_COMMAND(logs_autotest, test_logs); +REGISTER_FAST_TEST(logs_autotest, true, true, test_logs); diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c index 37b460af3a..b93e11d700 100644 --- a/app/test/test_lpm.c +++ b/app/test/test_lpm.c @@ -1584,4 +1584,4 @@ test_lpm(void) return global_status; } -REGISTER_TEST_COMMAND(lpm_autotest, test_lpm); +REGISTER_FAST_TEST(lpm_autotest, true, true, test_lpm); diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c index b6b6f8615e..1d8a0afa11 100644 --- a/app/test/test_lpm6.c +++ b/app/test/test_lpm6.c @@ -1793,4 +1793,4 @@ test_lpm6(void) return global_status; } -REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6); +REGISTER_FAST_TEST(lpm6_autotest, true, true, test_lpm6); diff --git a/app/test/test_lpm6_perf.c b/app/test/test_lpm6_perf.c index 5b684686a6..8a49f74c84 100644 --- a/app/test/test_lpm6_perf.c +++ b/app/test/test_lpm6_perf.c @@ -161,4 +161,4 @@ test_lpm6_perf(void) return 0; } -REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf); +REGISTER_PERF_TEST(lpm6_perf_autotest, test_lpm6_perf); diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c index e72437ba38..15ff396dd0 100644 --- a/app/test/test_lpm_perf.c +++ b/app/test/test_lpm_perf.c @@ -760,4 +760,4 @@ test_lpm_perf(void) return 0; } -REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf); +REGISTER_PERF_TEST(lpm_perf_autotest, test_lpm_perf); diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c index ff081dd931..cd579c503c 100644 --- a/app/test/test_malloc.c +++ b/app/test/test_malloc.c @@ -1091,4 +1091,4 @@ test_malloc(void) return 0; } -REGISTER_TEST_COMMAND(malloc_autotest, test_malloc); +REGISTER_FAST_TEST(malloc_autotest, false, true, test_malloc); diff --git a/app/test/test_malloc_perf.c b/app/test/test_malloc_perf.c index 9bd1662981..a99bfd8531 100644 --- a/app/test/test_malloc_perf.c +++ b/app/test/test_malloc_perf.c @@ -171,4 +171,4 @@ test_malloc_perf(void) return 0; } -REGISTER_TEST_COMMAND(malloc_perf_autotest, test_malloc_perf); +REGISTER_PERF_TEST(malloc_perf_autotest, test_malloc_perf); diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index efac01806b..d7393df7eb 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -2955,4 +2955,4 @@ test_mbuf(void) } #undef GOTO_FAIL -REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf); +REGISTER_FAST_TEST(mbuf_autotest, false, true, test_mbuf); diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c index 52e45e7e2a..d522fc6ece 100644 --- a/app/test/test_mcslock.c +++ b/app/test/test_mcslock.c @@ -241,4 +241,4 @@ test_mcslock(void) return ret; } -REGISTER_TEST_COMMAND(mcslock_autotest, test_mcslock); +REGISTER_FAST_TEST(mcslock_autotest, false, true, test_mcslock); diff --git a/app/test/test_member.c b/app/test/test_member.c index 4a93f8bff4..5a4d2750db 100644 --- a/app/test/test_member.c +++ b/app/test/test_member.c @@ -996,4 +996,4 @@ test_member(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(member_autotest, test_member); +REGISTER_FAST_TEST(member_autotest, true, true, test_member); diff --git a/app/test/test_member_perf.c b/app/test/test_member_perf.c index 2f79888fbd..db6b8a18ef 100644 --- a/app/test/test_member_perf.c +++ b/app/test/test_member_perf.c @@ -780,4 +780,4 @@ test_member_perf(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(member_perf_autotest, test_member_perf); +REGISTER_PERF_TEST(member_perf_autotest, test_member_perf); diff --git a/app/test/test_memcpy.c b/app/test/test_memcpy.c index 1ab86f4967..802dc4631b 100644 --- a/app/test/test_memcpy.c +++ b/app/test/test_memcpy.c @@ -129,4 +129,4 @@ test_memcpy(void) return 0; } -REGISTER_TEST_COMMAND(memcpy_autotest, test_memcpy); +REGISTER_FAST_TEST(memcpy_autotest, true, true, test_memcpy); diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c index 3727c160e6..5c05a84619 100644 --- a/app/test/test_memcpy_perf.c +++ b/app/test/test_memcpy_perf.c @@ -348,4 +348,4 @@ test_memcpy_perf(void) return 0; } -REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf); +REGISTER_PERF_TEST(memcpy_perf_autotest, test_memcpy_perf); diff --git a/app/test/test_memory.c b/app/test/test_memory.c index 440e5ef838..ea37f62338 100644 --- a/app/test/test_memory.c +++ b/app/test/test_memory.c @@ -110,4 +110,4 @@ test_memory(void) return 0; } -REGISTER_TEST_COMMAND(memory_autotest, test_memory); +REGISTER_FAST_TEST(memory_autotest, false, true, test_memory); diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c index 8e493eda47..ad7ebd6363 100644 --- a/app/test/test_mempool.c +++ b/app/test/test_mempool.c @@ -1043,4 +1043,4 @@ test_mempool(void) return ret; } -REGISTER_TEST_COMMAND(mempool_autotest, test_mempool); +REGISTER_FAST_TEST(mempool_autotest, false, true, test_mempool); diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c index ce7c6241ab..96de347f04 100644 --- a/app/test/test_mempool_perf.c +++ b/app/test/test_mempool_perf.c @@ -437,4 +437,4 @@ test_mempool_perf(void) return ret; } -REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf); +REGISTER_PERF_TEST(mempool_perf_autotest, test_mempool_perf); diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c index f10f4fd9cd..37ae7afc95 100644 --- a/app/test/test_memzone.c +++ b/app/test/test_memzone.c @@ -1163,4 +1163,4 @@ test_memzone(void) return 0; } -REGISTER_TEST_COMMAND(memzone_autotest, test_memzone); +REGISTER_FAST_TEST(memzone_autotest, false, true, test_memzone); diff --git a/app/test/test_meter.c b/app/test/test_meter.c index 15d5a4839b..6241b75ba0 100644 --- a/app/test/test_meter.c +++ b/app/test/test_meter.c @@ -713,4 +713,4 @@ test_meter(void) } -REGISTER_TEST_COMMAND(meter_autotest, test_meter); +REGISTER_FAST_TEST(meter_autotest, true, true, test_meter); diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c index ad47d578f2..f3694530a8 100644 --- a/app/test/test_mp_secondary.c +++ b/app/test/test_mp_secondary.c @@ -223,4 +223,4 @@ test_mp_secondary(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary); +REGISTER_FAST_TEST(multiprocess_autotest, false, false, test_mp_secondary); diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c index 129578d1a3..63c5c80c24 100644 --- a/app/test/test_per_lcore.c +++ b/app/test/test_per_lcore.c @@ -105,4 +105,4 @@ test_per_lcore(void) return 0; } -REGISTER_TEST_COMMAND(per_lcore_autotest, test_per_lcore); +REGISTER_FAST_TEST(per_lcore_autotest, true, true, test_per_lcore); diff --git a/app/test/test_pflock.c b/app/test/test_pflock.c index 38da6bce27..5f77b158c8 100644 --- a/app/test/test_pflock.c +++ b/app/test/test_pflock.c @@ -193,4 +193,4 @@ test_pflock(void) return 0; } -REGISTER_TEST_COMMAND(pflock_autotest, test_pflock); +REGISTER_FAST_TEST(pflock_autotest, true, true, test_pflock); diff --git a/app/test/test_pie.c b/app/test/test_pie.c index a3c0f97c9d..8036bac1e6 100644 --- a/app/test/test_pie.c +++ b/app/test/test_pie.c @@ -1087,6 +1087,6 @@ test_pie_all(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(pie_autotest, test_pie); -REGISTER_TEST_COMMAND(pie_perf, test_pie_perf); -REGISTER_TEST_COMMAND(pie_all, test_pie_all); +REGISTER_FAST_TEST(pie_autotest, true, true, test_pie); +REGISTER_PERF_TEST(pie_perf, test_pie_perf); +REGISTER_PERF_TEST(pie_all, test_pie_all); diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index 3ef590cb51..f6d97f21c9 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -899,4 +899,4 @@ test_set_rxtx_sc(cmdline_fixed_string_t type) return -1; } -REGISTER_TEST_COMMAND(pmd_perf_autotest, test_pmd_perf); +REGISTER_PERF_TEST(pmd_perf_autotest, test_pmd_perf); diff --git a/app/test/test_power.c b/app/test/test_power.c index b7b5561348..02ebc54d19 100644 --- a/app/test/test_power.c +++ b/app/test/test_power.c @@ -172,4 +172,4 @@ test_power(void) } #endif -REGISTER_TEST_COMMAND(power_autotest, test_power); +REGISTER_FAST_TEST(power_autotest, true, true, test_power); diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c index 4d013cd7bb..10755a0d41 100644 --- a/app/test/test_power_cpufreq.c +++ b/app/test/test_power_cpufreq.c @@ -703,5 +703,5 @@ test_power_caps(void) #endif -REGISTER_TEST_COMMAND(power_cpufreq_autotest, test_power_cpufreq); +REGISTER_FAST_TEST(power_cpufreq_autotest, false, true, test_power_cpufreq); REGISTER_TEST_COMMAND(power_caps_autotest, test_power_caps); diff --git a/app/test/test_power_intel_uncore.c b/app/test/test_power_intel_uncore.c index 31163af84e..6fc7f23bbf 100644 --- a/app/test/test_power_intel_uncore.c +++ b/app/test/test_power_intel_uncore.c @@ -298,4 +298,4 @@ test_power_intel_uncore(void) } #endif -REGISTER_TEST_COMMAND(power_intel_uncore_autotest, test_power_intel_uncore); +REGISTER_FAST_TEST(power_intel_uncore_autotest, true, true, test_power_intel_uncore); diff --git a/app/test/test_power_kvm_vm.c b/app/test/test_power_kvm_vm.c index cc66b7a8a0..464e06002e 100644 --- a/app/test/test_power_kvm_vm.c +++ b/app/test/test_power_kvm_vm.c @@ -299,4 +299,4 @@ test_power_kvm_vm(void) } #endif -REGISTER_TEST_COMMAND(power_kvm_vm_autotest, test_power_kvm_vm); +REGISTER_FAST_TEST(power_kvm_vm_autotest, false, true, test_power_kvm_vm); diff --git a/app/test/test_prefetch.c b/app/test/test_prefetch.c index 7b4a8e4144..46e6828e6a 100644 --- a/app/test/test_prefetch.c +++ b/app/test/test_prefetch.c @@ -35,4 +35,4 @@ test_prefetch(void) return 0; } -REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch); +REGISTER_FAST_TEST(prefetch_autotest, true, true, test_prefetch); diff --git a/app/test/test_rand_perf.c b/app/test/test_rand_perf.c index 26fb1d9a58..30204e12c0 100644 --- a/app/test/test_rand_perf.c +++ b/app/test/test_rand_perf.c @@ -96,4 +96,4 @@ test_rand_perf(void) return 0; } -REGISTER_TEST_COMMAND(rand_perf_autotest, test_rand_perf); +REGISTER_PERF_TEST(rand_perf_autotest, test_rand_perf); diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index 70404e89e6..72d8e0377e 100644 --- a/app/test/test_rcu_qsbr.c +++ b/app/test/test_rcu_qsbr.c @@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void) return -1; } -REGISTER_TEST_COMMAND(rcu_qsbr_autotest, test_rcu_qsbr_main); +REGISTER_FAST_TEST(rcu_qsbr_autotest, true, true, test_rcu_qsbr_main); diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.c index b15e5cef88..ce88a7333c 100644 --- a/app/test/test_rcu_qsbr_perf.c +++ b/app/test/test_rcu_qsbr_perf.c @@ -690,4 +690,4 @@ test_rcu_qsbr_main(void) return -1; } -REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main); +REGISTER_PERF_TEST(rcu_qsbr_perf_autotest, test_rcu_qsbr_main); diff --git a/app/test/test_reassembly_perf.c b/app/test/test_reassembly_perf.c index c11b65291f..4b4929d777 100644 --- a/app/test/test_reassembly_perf.c +++ b/app/test/test_reassembly_perf.c @@ -1000,4 +1000,4 @@ test_reassembly_perf(void) return TEST_SUCCESS; } -REGISTER_TEST_COMMAND(reassembly_perf_autotest, test_reassembly_perf); +REGISTER_PERF_TEST(reassembly_perf_autotest, test_reassembly_perf); diff --git a/app/test/test_reciprocal_division.c b/app/test/test_reciprocal_division.c index 8ea9b1d24d..fb52b2d5a1 100644 --- a/app/test/test_reciprocal_division.c +++ b/app/test/test_reciprocal_division.c @@ -164,4 +164,4 @@ test_reciprocal(void) return result; } -REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal); +REGISTER_PERF_TEST(reciprocal_division, test_reciprocal); diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c index 4f625873e5..cf96d46a22 100644 --- a/app/test/test_reciprocal_division_perf.c +++ b/app/test/test_reciprocal_division_perf.c @@ -205,4 +205,4 @@ test_reciprocal_division_perf(void) return result; } -REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf); +REGISTER_PERF_TEST(reciprocal_division_perf, test_reciprocal_division_perf); diff --git a/app/test/test_red.c b/app/test/test_red.c index 84c292f8d8..aa7538d51a 100644 --- a/app/test/test_red.c +++ b/app/test/test_red.c @@ -1878,5 +1878,5 @@ test_red_all(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ REGISTER_TEST_COMMAND(red_autotest, test_red); -REGISTER_TEST_COMMAND(red_perf, test_red_perf); -REGISTER_TEST_COMMAND(red_all, test_red_all); +REGISTER_PERF_TEST(red_perf, test_red_perf); +REGISTER_PERF_TEST(red_all, test_red_all); diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c index c188f6ce67..501780cb26 100644 --- a/app/test/test_reorder.c +++ b/app/test/test_reorder.c @@ -548,4 +548,4 @@ test_reorder(void) } -REGISTER_TEST_COMMAND(reorder_autotest, test_reorder); +REGISTER_FAST_TEST(reorder_autotest, true, true, test_reorder); diff --git a/app/test/test_rib.c b/app/test/test_rib.c index 65b6856410..c7454f2c47 100644 --- a/app/test/test_rib.c +++ b/app/test/test_rib.c @@ -363,5 +363,5 @@ test_slow_rib(void) return unit_test_suite_runner(&rib_slow_tests); } -REGISTER_TEST_COMMAND(rib_autotest, test_rib); -REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib); +REGISTER_FAST_TEST(rib_autotest, true, true, test_rib); +REGISTER_PERF_TEST(rib_slow_autotest, test_slow_rib); diff --git a/app/test/test_rib6.c b/app/test/test_rib6.c index 336b779d2e..33596fddb4 100644 --- a/app/test/test_rib6.c +++ b/app/test/test_rib6.c @@ -367,5 +367,5 @@ test_slow_rib6(void) return unit_test_suite_runner(&rib6_slow_tests); } -REGISTER_TEST_COMMAND(rib6_autotest, test_rib6); -REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6); +REGISTER_FAST_TEST(rib6_autotest, true, true, test_rib6); +REGISTER_PERF_TEST(rib6_slow_autotest, test_slow_rib6); diff --git a/app/test/test_ring.c b/app/test/test_ring.c index bde33ab4a1..ba1fec1de3 100644 --- a/app/test/test_ring.c +++ b/app/test/test_ring.c @@ -1241,4 +1241,4 @@ test_ring(void) return -1; } -REGISTER_TEST_COMMAND(ring_autotest, test_ring); +REGISTER_FAST_TEST(ring_autotest, true, true, test_ring); diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c index 3972fd9db3..d7c5a4c30b 100644 --- a/app/test/test_ring_perf.c +++ b/app/test/test_ring_perf.c @@ -579,4 +579,4 @@ test_ring_perf(void) return 0; } -REGISTER_TEST_COMMAND(ring_perf_autotest, test_ring_perf); +REGISTER_PERF_TEST(ring_perf_autotest, test_ring_perf); diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c index 4ae0bf8deb..50798958d7 100644 --- a/app/test/test_rwlock.c +++ b/app/test/test_rwlock.c @@ -506,7 +506,7 @@ try_rwlock_test_rde_wro(void) return process_try_lcore_stats(); } -REGISTER_TEST_COMMAND(rwlock_test1_autotest, rwlock_test1); -REGISTER_TEST_COMMAND(rwlock_rda_autotest, try_rwlock_test_rda); -REGISTER_TEST_COMMAND(rwlock_rds_wrm_autotest, try_rwlock_test_rds_wrm); -REGISTER_TEST_COMMAND(rwlock_rde_wro_autotest, try_rwlock_test_rde_wro); +REGISTER_FAST_TEST(rwlock_test1_autotest, true, true, rwlock_test1); +REGISTER_FAST_TEST(rwlock_rda_autotest, true, true, try_rwlock_test_rda); +REGISTER_FAST_TEST(rwlock_rds_wrm_autotest, true, true, try_rwlock_test_rds_wrm); +REGISTER_FAST_TEST(rwlock_rde_wro_autotest, true, true, try_rwlock_test_rde_wro); diff --git a/app/test/test_sched.c b/app/test/test_sched.c index ddec572447..6daee90bca 100644 --- a/app/test/test_sched.c +++ b/app/test/test_sched.c @@ -215,4 +215,4 @@ test_sched(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(sched_autotest, test_sched); +REGISTER_FAST_TEST(sched_autotest, true, true, test_sched); diff --git a/app/test/test_security.c b/app/test/test_security.c index 4783cd0663..23fc7ffb4f 100644 --- a/app/test/test_security.c +++ b/app/test/test_security.c @@ -2314,4 +2314,4 @@ test_security(void) return unit_test_suite_runner(&security_testsuite); } -REGISTER_TEST_COMMAND(security_autotest, test_security); +REGISTER_FAST_TEST(security_autotest, false, true, test_security); diff --git a/app/test/test_seqlock.c b/app/test/test_seqlock.c index d26d2c010e..873bd60453 100644 --- a/app/test/test_seqlock.c +++ b/app/test/test_seqlock.c @@ -187,4 +187,4 @@ test_seqlock(void) return rc; } -REGISTER_TEST_COMMAND(seqlock_autotest, test_seqlock); +REGISTER_FAST_TEST(seqlock_autotest, true, true, test_seqlock); diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c index 422d2a83e8..c12d52d8f1 100644 --- a/app/test/test_service_cores.c +++ b/app/test/test_service_cores.c @@ -1040,7 +1040,7 @@ test_service_common(void) return unit_test_suite_runner(&service_tests); } -REGISTER_TEST_COMMAND(service_autotest, test_service_common); +REGISTER_FAST_TEST(service_autotest, true, true, test_service_common); static struct unit_test_suite service_perf_tests = { .suite_name = "service core performance test suite", @@ -1062,4 +1062,4 @@ test_service_perf(void) return unit_test_suite_runner(&service_perf_tests); } -REGISTER_TEST_COMMAND(service_perf_autotest, test_service_perf); +REGISTER_PERF_TEST(service_perf_autotest, test_service_perf); diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c index 3f59372300..9a481f2718 100644 --- a/app/test/test_spinlock.c +++ b/app/test/test_spinlock.c @@ -302,4 +302,4 @@ test_spinlock(void) return ret; } -REGISTER_TEST_COMMAND(spinlock_autotest, test_spinlock); +REGISTER_FAST_TEST(spinlock_autotest, true, true, test_spinlock); diff --git a/app/test/test_stack.c b/app/test/test_stack.c index bc38961433..9150cc9fed 100644 --- a/app/test/test_stack.c +++ b/app/test/test_stack.c @@ -379,5 +379,5 @@ test_lf_stack(void) #endif } -REGISTER_TEST_COMMAND(stack_autotest, test_stack); -REGISTER_TEST_COMMAND(stack_lf_autotest, test_lf_stack); +REGISTER_FAST_TEST(stack_autotest, false, true, test_stack); +REGISTER_FAST_TEST(stack_lf_autotest, false, true, test_lf_stack); diff --git a/app/test/test_stack_perf.c b/app/test/test_stack_perf.c index 1eae00a334..c5e1caa036 100644 --- a/app/test/test_stack_perf.c +++ b/app/test/test_stack_perf.c @@ -354,5 +354,5 @@ test_lf_stack_perf(void) #endif } -REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf); -REGISTER_TEST_COMMAND(stack_lf_perf_autotest, test_lf_stack_perf); +REGISTER_PERF_TEST(stack_perf_autotest, test_stack_perf); +REGISTER_PERF_TEST(stack_lf_perf_autotest, test_lf_stack_perf); diff --git a/app/test/test_string_fns.c b/app/test/test_string_fns.c index 5e105d2bb9..ad41106df1 100644 --- a/app/test/test_string_fns.c +++ b/app/test/test_string_fns.c @@ -182,4 +182,4 @@ test_string_fns(void) return 0; } -REGISTER_TEST_COMMAND(string_autotest, test_string_fns); +REGISTER_FAST_TEST(string_autotest, true, true, test_string_fns); diff --git a/app/test/test_tailq.c b/app/test/test_tailq.c index 9520219b0a..2ff2877344 100644 --- a/app/test/test_tailq.c +++ b/app/test/test_tailq.c @@ -125,4 +125,4 @@ test_tailq(void) return ret; } -REGISTER_TEST_COMMAND(tailq_autotest, test_tailq); +REGISTER_FAST_TEST(tailq_autotest, true, true, test_tailq); diff --git a/app/test/test_thash.c b/app/test/test_thash.c index 53d9611e18..65d42fd900 100644 --- a/app/test/test_thash.c +++ b/app/test/test_thash.c @@ -966,4 +966,4 @@ test_thash(void) return unit_test_suite_runner(&thash_tests); } -REGISTER_TEST_COMMAND(thash_autotest, test_thash); +REGISTER_FAST_TEST(thash_autotest, true, true, test_thash); diff --git a/app/test/test_thash_perf.c b/app/test/test_thash_perf.c index 687582aa32..9dfd5d3c21 100644 --- a/app/test/test_thash_perf.c +++ b/app/test/test_thash_perf.c @@ -135,4 +135,4 @@ test_thash_perf(void) return 0; } -REGISTER_TEST_COMMAND(thash_perf_autotest, test_thash_perf); +REGISTER_PERF_TEST(thash_perf_autotest, test_thash_perf); diff --git a/app/test/test_threads.c b/app/test/test_threads.c index a4c4f651a4..526eaa5bf3 100644 --- a/app/test/test_threads.c +++ b/app/test/test_threads.c @@ -279,4 +279,4 @@ test_threads(void) return unit_test_suite_runner(&threads_test_suite); } -REGISTER_TEST_COMMAND(threads_autotest, test_threads); +REGISTER_FAST_TEST(threads_autotest, true, true, test_threads); diff --git a/app/test/test_ticketlock.c b/app/test/test_ticketlock.c index 242c136478..1fbbedb33b 100644 --- a/app/test/test_ticketlock.c +++ b/app/test/test_ticketlock.c @@ -314,4 +314,4 @@ test_ticketlock(void) return ret; } -REGISTER_TEST_COMMAND(ticketlock_autotest, test_ticketlock); +REGISTER_FAST_TEST(ticketlock_autotest, true, true, test_ticketlock); diff --git a/app/test/test_timer.c b/app/test/test_timer.c index 0c36dc9010..cac8fc0114 100644 --- a/app/test/test_timer.c +++ b/app/test/test_timer.c @@ -594,4 +594,4 @@ test_timer(void) return TEST_SUCCESS; } -REGISTER_TEST_COMMAND(timer_autotest, test_timer); +REGISTER_FAST_TEST(timer_autotest, false, true, test_timer); diff --git a/app/test/test_timer_perf.c b/app/test/test_timer_perf.c index 0ede4b3e40..d2d74ebbc6 100644 --- a/app/test/test_timer_perf.c +++ b/app/test/test_timer_perf.c @@ -131,4 +131,4 @@ test_timer_perf(void) return 0; } -REGISTER_TEST_COMMAND(timer_perf_autotest, test_timer_perf); +REGISTER_PERF_TEST(timer_perf_autotest, test_timer_perf); diff --git a/app/test/test_timer_racecond.c b/app/test/test_timer_racecond.c index bb56ae8324..6f8b448ff8 100644 --- a/app/test/test_timer_racecond.c +++ b/app/test/test_timer_racecond.c @@ -172,4 +172,4 @@ test_timer_racecond(void) return TEST_SUCCESS; } -REGISTER_TEST_COMMAND(timer_racecond_autotest, test_timer_racecond); +REGISTER_PERF_TEST(timer_racecond_autotest, test_timer_racecond); diff --git a/app/test/test_trace.c b/app/test/test_trace.c index ad4a394a29..00809f433b 100644 --- a/app/test/test_trace.c +++ b/app/test/test_trace.c @@ -250,4 +250,4 @@ test_trace(void) #endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND(trace_autotest, test_trace); +REGISTER_FAST_TEST(trace_autotest, true, true, test_trace); diff --git a/app/test/test_trace_perf.c b/app/test/test_trace_perf.c index 46ae7d8074..a6dd075722 100644 --- a/app/test/test_trace_perf.c +++ b/app/test/test_trace_perf.c @@ -179,4 +179,4 @@ test_trace_perf(void) return TEST_SUCCESS; } -REGISTER_TEST_COMMAND(trace_perf_autotest, test_trace_perf); +REGISTER_PERF_TEST(trace_perf_autotest, test_trace_perf); diff --git a/app/test/test_version.c b/app/test/test_version.c index 1e1ff18656..52f269fb9c 100644 --- a/app/test/test_version.c +++ b/app/test/test_version.c @@ -25,4 +25,4 @@ test_version(void) return 0; } -REGISTER_TEST_COMMAND(version_autotest, test_version); +REGISTER_FAST_TEST(version_autotest, true, true, test_version); From patchwork Wed Aug 16 15:34:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130421 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FB1243081; Wed, 16 Aug 2023 17:35:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E6DB43271; Wed, 16 Aug 2023 17:35:38 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 049B842B8B for ; Wed, 16 Aug 2023 17:35:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200137; x=1723736137; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HHP7ViyhFhLzkjpmXQOpckgtuQR6fkUcGsxT4YFC2aM=; b=SdkQreoWGLjHA375figgpHCv/sO/cL3BVcv51BA1J+qQ2buLk7NvA0l8 Qz5xFHQDL6Nu44XVP5B8muzP3Npb1do7IdqloJJqVrkiTyOwMACck9WcK dRWE5aRPRQBmPoQZeNvHa3RyaNAGeecKbtiPTQ7+GPZmD5GvAKjL/oU6W GhkU12PagsrBEK6dJd6AFaFpJQecAJV/0M72x62OEOSAqavNA+9sWajBZ gGoOfgMLYacx527wMojvLvFaUtb/OOCi40i/khpkedUNV9WxRzLAHys1w PnyIfqTWI5IVBPM/XhZKcxT0hElBcqCLxNRJLm6TejKUbl88x1xLMhrV7 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458915961" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458915961" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856233" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856233" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:35 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 04/11] app/test: make telemetry data test buildable on windows Date: Wed, 16 Aug 2023 16:34:32 +0100 Message-Id: <20230816153439.551501-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org To enable the building of the telemetry data tests file when building on windows, we need to provide a stub implementation. That way, the test file is buildable any time the library itself is built. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup Acked-by: Tyler Retzlaff --- app/test/test_telemetry_data.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c index a960f44c1b..b2dc1d75db 100644 --- a/app/test/test_telemetry_data.c +++ b/app/test/test_telemetry_data.c @@ -2,11 +2,20 @@ * Copyright 2020 Intel Corporation */ +#ifdef RTE_EXEC_ENV_WINDOWS +#include "test.h" + +static int +telemetry_data_autotest(void) +{ + return TEST_SKIPPED; +} + +#else + #include #include -#ifndef RTE_EXEC_ENV_WINDOWS #include -#endif #include #include @@ -604,5 +613,6 @@ telemetry_data_autotest(void) close(sock); return 0; } +#endif /* windows/non-windows */ REGISTER_TEST_COMMAND(telemetry_data_autotest, telemetry_data_autotest); From patchwork Wed Aug 16 15:34:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130422 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58B4843081; Wed, 16 Aug 2023 17:36:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B054943264; Wed, 16 Aug 2023 17:35:41 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id E070043273 for ; Wed, 16 Aug 2023 17:35:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200140; x=1723736140; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=30S8V47qNzcODZ3D/d1ETyhaRHwmEngkt19O4pgfzL8=; b=AYgJBMlFfdbu/Y+VV7OvF5mFt37xaWQntpHE2dwlDUkpHGbDMKsOqw19 QYZ0ksToh2wtNbKX4SPgAzVj25rWw9AbPk3TAYYX/eyTxzmb7+hHfbF5D +yOm2qnixCgeapcGXqcHkXzPAXaLG+WnAD6QaHoNO7fQ2TBjjEvv3KNEO Vau5bP3CXqsHM9uwXrdfd8jdh7NeZyiZd4iMeqxzcReONQyTFGnHB/Exs deiFbQSq+RsIDp5koxnzJFX28XcOEdxZs31aGFV3Zm+vDbq0Hh3nZN30g P4CRNISNR/RA6kgScxEkNVpAejKqV+GTQw7OXpJxvx1HzEvSp6F2Exn2h w==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458915992" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458915992" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856247" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856247" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:36 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 05/11] app/test: build using per-file dependency matrix Date: Wed, 16 Aug 2023 16:34:33 +0100 Message-Id: <20230816153439.551501-6-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Rather than using if-else constructs to selectively add or remove files from the UT build, switch to a table-based approach where each file lists out what libs or drivers it depends upon. Initial version of this table was generated via analysis of the header files included in each C file. The basic dependencies of the test binary [cmdline, ring, mempool and mbuf] were then removed from the per-file lists, as there is no point in checking them as the whole app will be disabled if they are not present. With the file list, the dependencies for the "utility" C-files are kept separate, so that other tests which depend on the functions provided by those files can have that dependency recorded properly. The basic cryptodev tests also fall into this category as functions from the main cryptodev test file are used by other crypto tests. As well as the main table for internal dependencies, some test files have separate external components too. A second, much smaller table lists these dependencies. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup --- app/meson.build | 8 +- app/test/meson.build | 823 ++++++++++++------------------------------- 2 files changed, 238 insertions(+), 593 deletions(-) diff --git a/app/meson.build b/app/meson.build index 4fc1a83eba..0d8b618e7f 100644 --- a/app/meson.build +++ b/app/meson.build @@ -32,6 +32,11 @@ apps = [ 'test-security-perf', ] +if get_option('tests') +# build the auto test app if enabled. + apps += 'test' +endif + default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API'] default_ldflags = [] if get_option('default_library') == 'static' and not is_windows @@ -106,6 +111,3 @@ foreach app:apps install_rpath: join_paths(get_option('prefix'), driver_install_path), install: true) endforeach - -# special case the autotests -subdir('test') diff --git a/app/test/meson.build b/app/test/meson.build index 66897c14a3..2b885ae273 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -1,446 +1,230 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation - -if not get_option('tests') - subdir_done() -endif - -test_sources = files( - 'commands.c', - 'packet_burst_generator.c', - 'test.c', - 'test_acl.c', - 'test_alarm.c', - 'test_atomic.c', - 'test_barrier.c', - 'test_bitops.c', - 'test_bitmap.c', - 'test_bpf.c', - 'test_byteorder.c', - 'test_cksum.c', - 'test_cksum_perf.c', - 'test_cmdline.c', - 'test_cmdline_cirbuf.c', - 'test_cmdline_etheraddr.c', - 'test_cmdline_ipaddr.c', - 'test_cmdline_lib.c', - 'test_cmdline_num.c', - 'test_cmdline_portlist.c', - 'test_cmdline_string.c', - 'test_common.c', - 'test_cpuflags.c', - 'test_crc.c', - 'test_cryptodev.c', - 'test_cryptodev_asym.c', - 'test_cryptodev_blockcipher.c', - 'test_cryptodev_crosscheck.c', - 'test_cryptodev_security_ipsec.c', - 'test_cryptodev_security_pdcp.c', - 'test_cycles.c', - 'test_debug.c', - 'test_devargs.c', - 'test_distributor.c', - 'test_distributor_perf.c', - 'test_dmadev.c', - 'test_dmadev_api.c', - 'test_eal_flags.c', - 'test_eal_fs.c', - 'test_efd.c', - 'test_efd_perf.c', - 'test_errno.c', - 'test_ethdev_link.c', - 'test_event_crypto_adapter.c', - 'test_event_eth_rx_adapter.c', - 'test_event_ring.c', - 'test_event_timer_adapter.c', - 'test_eventdev.c', - 'test_external_mem.c', - 'test_fbarray.c', - 'test_fib.c', - 'test_fib_perf.c', - 'test_fib6.c', - 'test_fib6_perf.c', - 'test_func_reentrancy.c', - 'test_hash.c', - 'test_hash_functions.c', - 'test_hash_multiwriter.c', - 'test_hash_readwrite.c', - 'test_hash_perf.c', - 'test_hash_readwrite_lf_perf.c', - 'test_interrupts.c', - 'test_ipfrag.c', - 'test_ipsec.c', - 'test_ipsec_sad.c', - 'test_ipsec_perf.c', - 'test_kvargs.c', - 'test_lcores.c', - 'test_logs.c', - 'test_lpm.c', - 'test_lpm6.c', - 'test_lpm6_perf.c', - 'test_lpm_perf.c', - 'test_malloc.c', - 'test_malloc_perf.c', - 'test_mbuf.c', - 'test_member.c', - 'test_member_perf.c', - 'test_memcpy.c', - 'test_memcpy_perf.c', - 'test_memory.c', - 'test_mempool.c', - 'test_mempool_perf.c', - 'test_memzone.c', - 'test_meter.c', - 'test_mcslock.c', - 'test_mp_secondary.c', - 'test_per_lcore.c', - 'test_pflock.c', - 'test_pmd_perf.c', - 'test_power.c', - 'test_power_cpufreq.c', - 'test_power_kvm_vm.c', - 'test_power_intel_uncore.c', - 'test_prefetch.c', - 'test_rand_perf.c', - 'test_rawdev.c', - 'test_rcu_qsbr.c', - 'test_rcu_qsbr_perf.c', - 'test_reassembly_perf.c', - 'test_reciprocal_division.c', - 'test_reciprocal_division_perf.c', - 'test_red.c', - 'test_pie.c', - 'test_reorder.c', - 'test_rib.c', - 'test_rib6.c', - 'test_ring.c', - 'test_ring_mpmc_stress.c', - 'test_ring_hts_stress.c', - 'test_ring_mt_peek_stress.c', - 'test_ring_mt_peek_stress_zc.c', - 'test_ring_perf.c', - 'test_ring_rts_stress.c', - 'test_ring_st_peek_stress.c', - 'test_ring_st_peek_stress_zc.c', - 'test_ring_stress.c', - 'test_rwlock.c', - 'test_sched.c', - 'test_security.c', - 'test_security_inline_macsec.c', - 'test_security_inline_proto.c', - 'test_seqlock.c', - 'test_service_cores.c', - 'test_spinlock.c', - 'test_stack.c', - 'test_stack_perf.c', - 'test_string_fns.c', - 'test_tailq.c', - 'test_thash.c', - 'test_thash_perf.c', - 'test_threads.c', - 'test_timer.c', - 'test_timer_perf.c', - 'test_timer_racecond.c', - 'test_timer_secondary.c', - 'test_ticketlock.c', - 'test_trace.c', - 'test_trace_register.c', - 'test_trace_perf.c', - 'test_version.c', - 'virtual_pmd.c', -) - -test_deps = dpdk_libs_enabled -# as well as libs, the pci and vdev bus drivers are needed for a lot of tests -test_deps += ['bus_pci', 'bus_vdev'] - -# Each test is marked with flags: -# - the first flag indicates whether the test can run in no-huge mode, -# - the second flag indicates whether the test can run with ASan enabled, -fast_tests = [ - ['acl_autotest', true, true], - ['atomic_autotest', false, true], - ['bitmap_autotest', true, true], - ['bpf_autotest', true, true], - ['bpf_convert_autotest', true, true], - ['bitops_autotest', true, true], - ['byteorder_autotest', true, true], - ['cksum_autotest', true, true], - ['cmdline_autotest', true, true], - ['common_autotest', true, true], - ['cpuflags_autotest', true, true], - ['debug_autotest', true, true], - ['devargs_autotest', true, true], - ['eal_flags_c_opt_autotest', false, false], - ['eal_flags_main_opt_autotest', false, false], - ['eal_flags_n_opt_autotest', false, false], - ['eal_flags_hpet_autotest', false, false], - ['eal_flags_no_huge_autotest', false, false], - ['eal_flags_a_opt_autotest', false, false], - ['eal_flags_b_opt_autotest', false, false], - ['eal_flags_vdev_opt_autotest', false, false], - ['eal_flags_r_opt_autotest', false, false], - ['eal_flags_mem_autotest', false, false], - ['eal_flags_file_prefix_autotest', false, false], - ['eal_flags_misc_autotest', false, false], - ['eal_fs_autotest', true, true], - ['errno_autotest', true, true], - ['ethdev_link_status', true, true], - ['event_ring_autotest', true, true], - ['fib_autotest', true, true], - ['fib6_autotest', true, true], - ['func_reentrancy_autotest', false, true], - ['hash_autotest', true, true], - ['interrupt_autotest', true, true], - ['ipfrag_autotest', false, true], - ['lcores_autotest', true, true], - ['logs_autotest', true, true], - ['lpm_autotest', true, true], - ['lpm6_autotest', true, true], - ['malloc_autotest', false, true], - ['mbuf_autotest', false, true], - ['mcslock_autotest', false, true], - ['memcpy_autotest', true, true], - ['memory_autotest', false, true], - ['mempool_autotest', false, true], - ['memzone_autotest', false, true], - ['meter_autotest', true, true], - ['multiprocess_autotest', false, false], - ['per_lcore_autotest', true, true], - ['pflock_autotest', true, true], - ['prefetch_autotest', true, true], - ['rcu_qsbr_autotest', true, true], - ['pie_autotest', true, true], - ['rib_autotest', true, true], - ['rib6_autotest', true, true], - ['ring_autotest', true, true], - ['rwlock_test1_autotest', true, true], - ['rwlock_rda_autotest', true, true], - ['rwlock_rds_wrm_autotest', true, true], - ['rwlock_rde_wro_autotest', true, true], - ['sched_autotest', true, true], - ['security_autotest', false, true], - ['seqlock_autotest', true, true], - ['spinlock_autotest', true, true], - ['stack_autotest', false, true], - ['stack_lf_autotest', false, true], - ['string_autotest', true, true], - ['tailq_autotest', true, true], - ['ticketlock_autotest', true, true], - ['timer_autotest', false, true], - ['user_delay_us', true, true], - ['version_autotest', true, true], - ['crc_autotest', true, true], - ['distributor_autotest', false, true], - ['eventdev_common_autotest', true, true], - ['fbarray_autotest', true, true], - ['hash_readwrite_func_autotest', false, true], - ['ipsec_autotest', true, true], - ['kvargs_autotest', true, true], - ['member_autotest', true, true], - ['power_cpufreq_autotest', false, true], - ['power_autotest', true, true], - ['power_kvm_vm_autotest', false, true], - ['power_intel_uncore_autotest', true, true], - ['reorder_autotest', true, true], - ['service_autotest', true, true], - ['thash_autotest', true, true], - ['threads_autotest', true, true], - ['trace_autotest', true, true], -] - -# Tests known to have issues or which don't belong in other tests lists. -extra_test_names = [ - 'alarm_autotest', # ee00af60170b ("test: remove strict timing requirements some tests") - 'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826 -] - -perf_test_names = [ - 'ring_perf_autotest', - 'malloc_perf_autotest', - 'mempool_perf_autotest', - 'memcpy_perf_autotest', - 'hash_perf_autotest', - 'timer_perf_autotest', - 'reciprocal_division', - 'reciprocal_division_perf', - 'lpm_perf_autotest', - 'rib_slow_autotest', - 'fib_slow_autotest', - 'fib_perf_autotest', - 'red_all', - 'pie_all', - 'barrier_autotest', - 'hash_multiwriter_autotest', - 'timer_racecond_autotest', - 'efd_autotest', - 'hash_functions_autotest', - 'member_perf_autotest', - 'efd_perf_autotest', - 'lpm6_perf_autotest', - 'rib6_slow_autotest', - 'fib6_slow_autotest', - 'fib6_perf_autotest', - 'rcu_qsbr_perf_autotest', - 'red_perf', - 'pie_perf', - 'distributor_perf_autotest', - 'pmd_perf_autotest', - 'service_perf_autotest', - 'stack_perf_autotest', - 'stack_lf_perf_autotest', - 'rand_perf_autotest', - 'hash_readwrite_perf_autotest', - 'hash_readwrite_lf_perf_autotest', - 'trace_perf_autotest', - 'ipsec_perf_autotest', - 'thash_perf_autotest', - 'reassembly_perf_autotest', -] - -driver_test_names = [ - 'cryptodev_aesni_gcm_autotest', - 'cryptodev_aesni_mb_autotest', - 'cryptodev_chacha_poly_mb_autotest', - 'cryptodev_cn10k_autotest', - 'cryptodev_cn9k_autotest', - 'cryptodev_cpu_aesni_mb_autotest', - 'cryptodev_cpu_aesni_gcm_autotest', - 'cryptodev_dpaa2_sec_autotest', - 'cryptodev_dpaa_sec_autotest', - 'cryptodev_null_autotest', - 'cryptodev_openssl_autotest', - 'cryptodev_qat_autotest', - 'cryptodev_qat_asym_autotest', - 'cryptodev_qat_raw_api_autotest', - 'cryptodev_sw_armv8_autotest', - 'cryptodev_sw_kasumi_autotest', - 'cryptodev_sw_mvsam_autotest', - 'cryptodev_sw_snow3g_autotest', - 'cryptodev_sw_zuc_autotest', - 'cryptodev_uadk_autotest', - 'dmadev_autotest', -] - -dump_test_names = [] - -if not is_windows - driver_test_names += [ - 'cryptodev_openssl_asym_autotest', - 'eventdev_selftest_octeontx', - 'eventdev_selftest_sw', - ] - - dump_test_names += [ - 'dump_struct_sizes', - 'dump_mempool', - 'dump_malloc_stats', - 'dump_devargs', - 'dump_log_types', - 'dump_ring', - 'dump_physmem', - 'dump_memzone', - ] -endif - -# The following linkages are an exception to allow running the -# unit tests without requiring that the developer install the -# DPDK libraries. Explicit linkage of drivers (plugin libraries) -# in applications should not be used. -if dpdk_conf.has('RTE_MEMPOOL_RING') - test_deps += 'mempool_ring' -endif -if dpdk_conf.has('RTE_MEMPOOL_STACK') - test_deps += 'mempool_stack' -endif -if dpdk_conf.has('RTE_EVENT_SKELETON') - test_deps += 'event_skeleton' -endif - -if dpdk_conf.has('RTE_LIB_GRAPH') - test_sources += 'test_graph.c' - fast_tests += [['graph_autotest', true, true]] - fast_tests += [['node_list_dump', true, true]] - test_sources += 'test_graph_perf.c' - perf_test_names += 'graph_perf_autotest' -endif -if dpdk_conf.has('RTE_LIB_METRICS') - test_sources += ['test_metrics.c'] - fast_tests += [['metrics_autotest', true, true]] -endif -if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') - test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] - fast_tests += [['telemetry_json_autotest', true, true]] - fast_tests += [['telemetry_data_autotest', true, true]] -endif -if dpdk_conf.has('RTE_LIB_PIPELINE') -# pipeline lib depends on port and table libs, so those must be present -# if pipeline library is. - test_sources += [ - 'test_table.c', - 'test_table_acl.c', - 'test_table_combined.c', - 'test_table_pipeline.c', - 'test_table_ports.c', - 'test_table_tables.c', - ] - fast_tests += [['table_autotest', true, true]] -endif - -# The following linkages of drivers are required because -# they are used via a driver-specific API. -if dpdk_conf.has('RTE_NET_BOND') - test_deps += 'net_bond' - test_sources += ['test_link_bonding.c', 'test_link_bonding_rssconf.c'] - driver_test_names += ['link_bonding_autotest', 'link_bonding_rssconf_autotest'] - if dpdk_conf.has('RTE_NET_RING') - test_sources += 'test_link_bonding_mode4.c' - driver_test_names += 'link_bonding_mode4_autotest' - endif -endif -if dpdk_conf.has('RTE_LIB_EVENTDEV') and dpdk_conf.has('RTE_NET_RING') - test_deps += 'net_ring' - test_sources += 'test_pmd_ring_perf.c' - test_sources += 'test_pmd_ring.c' - test_sources += 'test_event_eth_tx_adapter.c' - test_sources += 'sample_packet_forward.c' - fast_tests += [['ring_pmd_autotest', true, true]] - perf_test_names += 'ring_pmd_perf_autotest' - fast_tests += [['event_eth_tx_adapter_autotest', false, true]] - if dpdk_conf.has('RTE_LIB_BITRATESTATS') - test_sources += 'test_bitratestats.c' - fast_tests += [['bitratestats_autotest', true, true]] - endif - if dpdk_conf.has('RTE_LIB_LATENCYSTATS') - test_sources += 'test_latencystats.c' - fast_tests += [['latencystats_autotest', true, true]] - endif - if dpdk_conf.has('RTE_LIB_PDUMP') - test_sources += 'test_pdump.c' - fast_tests += [['pdump_autotest', true, false]] - endif -endif -if dpdk_conf.has('RTE_NET_NULL') - test_deps += 'net_null' - test_sources += 'test_vdev.c' - fast_tests += [['vdev_autotest', true, true]] -endif -if dpdk_conf.has('RTE_RAW_SKELETON') - test_deps += 'raw_skeleton' - fast_tests += [['rawdev_autotest', true, true]] -endif - -if dpdk_conf.has('RTE_HAS_LIBPCAP') - ext_deps += pcap_dep - if dpdk_conf.has('RTE_LIB_PCAPNG') - test_sources += 'test_pcapng.c' +# Copyright(c) 2017-2023 Intel Corporation + +# the main test files [test.c and commands.c] relies on these libraries +deps += ['cmdline', 'ring', 'mempool', 'mbuf'] +sources += files('commands.c', 'test.c') + +# some other utility C files, providing functions used by various tests +# so we need to include these deps in the dependency list for the files using those fns. +packet_burst_generator_deps = ['net'] +sample_packet_forward_deps = ['net_ring', 'ethdev', 'bus_vdev'] +virtual_pmd_deps = ['ethdev', 'net', 'bus_pci'] +# test_cryptodev has material that other crypto tests need +test_cryptodev_deps = ['bus_vdev', 'net', 'cryptodev', 'crypto_scheduler', 'security'] + +source_file_deps = { + # The C files providing functionality to other test cases + 'packet_burst_generator.c': packet_burst_generator_deps, +# 'resource.c': [], # unused currently. + 'sample_packet_forward.c': sample_packet_forward_deps, + 'virtual_pmd.c': virtual_pmd_deps, + + # the various test_*.c files + 'test_acl.c': ['net', 'acl'], + 'test_alarm.c': [], + 'test_atomic.c': ['hash'], + 'test_barrier.c': [], + 'test_bitmap.c': [], + 'test_bitops.c': [], + 'test_bitratestats.c': ['metrics', 'bitratestats', 'ethdev'] + sample_packet_forward_deps, + 'test_bpf.c': ['bpf', 'net'], + 'test_byteorder.c': [], +# 'test_cfgfile.c': ['cfgfile'], + 'test_cksum.c': ['net'], + 'test_cksum_perf.c': ['net'], + 'test_cmdline.c': [], + 'test_cmdline_cirbuf.c': [], + 'test_cmdline_etheraddr.c': ['net'], + 'test_cmdline_ipaddr.c': [], + 'test_cmdline_lib.c': [], + 'test_cmdline_num.c': [], + 'test_cmdline_portlist.c': [], + 'test_cmdline_string.c': [], + 'test_common.c': [], + 'test_compressdev.c': ['compressdev'], + 'test_cpuflags.c': [], + 'test_crc.c': ['net'], + 'test_cryptodev.c': test_cryptodev_deps, + 'test_cryptodev_asym.c': ['bus_vdev'] + test_cryptodev_deps, + 'test_cryptodev_blockcipher.c': test_cryptodev_deps, + 'test_cryptodev_crosscheck.c': test_cryptodev_deps, + 'test_cryptodev_security_ipsec.c': test_cryptodev_deps, + 'test_cryptodev_security_pdcp.c': test_cryptodev_deps, + 'test_cycles.c': [], + 'test_debug.c': [], + 'test_devargs.c': ['kvargs'], + 'test_distributor.c': ['distributor'], + 'test_distributor_perf.c': ['distributor'], + 'test_dmadev.c': ['dmadev', 'bus_vdev'], + 'test_dmadev_api.c': ['dmadev'], + 'test_eal_flags.c': [], + 'test_eal_fs.c': [], + 'test_efd.c': ['efd', 'net'], + 'test_efd_perf.c': ['efd', 'hash'], + 'test_errno.c': [], + 'test_ethdev_link.c': ['ethdev'], + 'test_event_crypto_adapter.c': ['cryptodev', 'eventdev', 'bus_vdev'], + 'test_event_eth_rx_adapter.c': ['ethdev', 'eventdev', 'bus_vdev'], + 'test_event_eth_tx_adapter.c': ['bus_vdev', 'ethdev', 'net_ring', 'eventdev'], + 'test_event_ring.c': ['eventdev'], + 'test_event_timer_adapter.c': ['ethdev', 'eventdev', 'bus_vdev'], + 'test_eventdev.c': ['eventdev', 'bus_vdev'], + 'test_external_mem.c': [], + 'test_fbarray.c': [], + 'test_fib.c': ['net', 'fib'], + 'test_fib6.c': ['rib', 'fib'], + 'test_fib6_perf.c': ['fib'], + 'test_fib_perf.c': ['net', 'fib'], + 'test_flow_classify.c': ['net', 'acl', 'table', 'ethdev', 'flow_classify'], + 'test_func_reentrancy.c': ['hash', 'lpm'], + 'test_graph.c': ['graph'], + 'test_graph_perf.c': ['graph'], + 'test_hash.c': ['net', 'hash'], + 'test_hash_functions.c': ['hash'], + 'test_hash_multiwriter.c': ['hash'], + 'test_hash_perf.c': ['hash'], + 'test_hash_readwrite.c': ['hash'], + 'test_hash_readwrite_lf_perf.c': ['hash'], + 'test_interrupts.c': [], + 'test_ipfrag.c': ['net', 'ip_frag'], + 'test_ipsec.c': ['bus_vdev', 'net', 'cryptodev', 'ipsec', 'security'], + 'test_ipsec_perf.c': ['net', 'ipsec'], + 'test_ipsec_sad.c': ['ipsec'], + 'test_kvargs.c': ['kvargs'], + 'test_latencystats.c': ['ethdev', 'latencystats', 'metrics'] + sample_packet_forward_deps, + 'test_lcores.c': [], + 'test_link_bonding.c': ['ethdev', 'net_bond', + 'net'] + packet_burst_generator_deps + virtual_pmd_deps, + 'test_link_bonding_mode4.c': ['ethdev', 'net_ring', 'net_bond', + 'net'] + packet_burst_generator_deps, + 'test_link_bonding_rssconf.c': ['ethdev', 'bus_vdev', 'net_bond'], + 'test_logs.c': [], + 'test_lpm.c': ['net', 'lpm'], + 'test_lpm6.c': ['lpm'], + 'test_lpm6_perf.c': ['lpm'], + 'test_lpm_perf.c': ['net', 'lpm'], + 'test_malloc.c': [], + 'test_malloc_perf.c': [], + 'test_mbuf.c': ['net'], + 'test_mcslock.c': [], + 'test_member.c': ['member', 'net'], + 'test_member_perf.c': ['hash', 'member'], + 'test_memcpy.c': [], + 'test_memcpy_perf.c': [], + 'test_memory.c': [], + 'test_mempool.c': [], + 'test_mempool_perf.c': [], + 'test_memzone.c': [], + 'test_meter.c': ['meter'], + 'test_metrics.c': ['metrics'], + 'test_mp_secondary.c': ['hash', 'lpm'], + 'test_pcapng.c': ['ethdev', 'net', 'pcapng'], + 'test_pdcp.c': ['eventdev', 'pdcp', 'net', 'timer', 'security'], + 'test_pdump.c': ['pdump'] + sample_packet_forward_deps, + 'test_per_lcore.c': [], + 'test_pflock.c': [], + 'test_pie.c': ['sched'], + 'test_pmd_perf.c': ['ethdev', 'net'] + packet_burst_generator_deps, + 'test_pmd_ring.c': ['net_ring', 'ethdev', 'bus_vdev'], + 'test_pmd_ring_perf.c': ['ethdev', 'net_ring', 'bus_vdev'], + 'test_power.c': ['power'], + 'test_power_cpufreq.c': ['power'], + 'test_power_intel_uncore.c': ['power'], + 'test_power_kvm_vm.c': ['power'], + 'test_prefetch.c': [], + 'test_rand_perf.c': [], + 'test_rawdev.c': ['rawdev', 'bus_vdev'], + 'test_rcu_qsbr.c': ['rcu', 'hash'], + 'test_rcu_qsbr_perf.c': ['rcu', 'hash'], + 'test_reassembly_perf.c': ['net', 'ip_frag'], + 'test_reciprocal_division.c': [], + 'test_reciprocal_division_perf.c': [], + 'test_red.c': ['sched'], + 'test_reorder.c': ['reorder'], +# 'test_resource.c': [], + 'test_rib.c': ['net', 'rib'], + 'test_rib6.c': ['net', 'rib'], + 'test_ring.c': [], + 'test_ring_hts_stress.c': [], + 'test_ring_mpmc_stress.c': [], + 'test_ring_mt_peek_stress.c': [], + 'test_ring_mt_peek_stress_zc.c': [], + 'test_ring_perf.c': [], + 'test_ring_rts_stress.c': [], + 'test_ring_st_peek_stress.c': [], + 'test_ring_st_peek_stress_zc.c': [], + 'test_ring_stress.c': [], + 'test_rwlock.c': [], + 'test_sched.c': ['net', 'sched'], + 'test_security.c': ['net', 'security'], + 'test_security_inline_macsec.c': ['ethdev', 'security'], + 'test_security_inline_proto.c': ['ethdev', 'security', 'eventdev'] + test_cryptodev_deps, + 'test_seqlock.c': [], + 'test_service_cores.c': [], + 'test_spinlock.c': [], + 'test_stack.c': ['stack'], + 'test_stack_perf.c': ['stack'], + 'test_string_fns.c': [], + 'test_table.c': ['table', 'pipeline', 'port'], + 'test_table_acl.c': ['net', 'table', 'pipeline', 'port'], + 'test_table_combined.c': ['table', 'pipeline', 'port'], + 'test_table_pipeline.c': ['pipeline', 'table', 'port'], + 'test_table_ports.c': ['table', 'pipeline', 'port'], + 'test_table_tables.c': ['table', 'pipeline', 'port'], + 'test_tailq.c': [], + 'test_telemetry_data.c': ['telemetry'], + 'test_telemetry_json.c': ['telemetry'], + 'test_thash.c': ['net', 'hash'], + 'test_thash_perf.c': ['hash'], + 'test_threads.c': [], + 'test_ticketlock.c': [], + 'test_timer.c': ['timer'], + 'test_timer_perf.c': ['timer'], + 'test_timer_racecond.c': ['timer'], + 'test_timer_secondary.c': ['timer'], + 'test_trace.c': [], + 'test_trace_perf.c': [], + 'test_trace_register.c': [], + 'test_vdev.c': ['kvargs', 'bus_vdev'], + 'test_version.c': [], +} + +source_file_ext_deps = { + 'test_compressdev.c': ['zlib'], + 'test_pcapng.c': ['pcap'], +} + +def_lib = get_option('default_library') +foreach f, f_deps : source_file_deps + has_deps = true + foreach d : f_deps + if not is_variable(def_lib + '_rte_' + d) + has_deps = false + break + else + # technically we might not need this dep, but adding it is harmless + if d not in deps + deps += d + endif + endif + endforeach + # check for any external dependencies for this file + if source_file_ext_deps.has_key(f) + foreach d: source_file_ext_deps.get(f) + dep = dependency(d, required: false, method: 'pkg-config') + if not dep.found() + message('Skipping test file @0@ due to missing external dependency @1@'.format(f, d)) + has_deps = false + else + ext_deps += dep + endif + endforeach + endif + if has_deps + sources += files(f) endif -endif - -if dpdk_conf.has('RTE_LIB_PDCP') - test_sources += 'test_pdcp.c' - fast_tests += [['pdcp_autotest', false, true]] -endif +endforeach if cc.has_argument('-Wno-format-truncation') cflags += '-Wno-format-truncation' @@ -450,154 +234,13 @@ endif cflags += '-fno-strict-aliasing' # Enable using internal APIs in unit tests -cflags += ['-DALLOW_INTERNAL_API'] - -test_dep_objs = [] -if dpdk_conf.has('RTE_LIB_COMPRESSDEV') - compress_test_dep = dependency('zlib', required: false, method: 'pkg-config') - if compress_test_dep.found() - test_dep_objs += compress_test_dep - test_sources += 'test_compressdev.c' - fast_tests += [['compressdev_autotest', false, true]] - endif -endif - -if dpdk_conf.has('RTE_CRYPTO_SCHEDULER') - driver_test_names += 'cryptodev_scheduler_autotest' - test_deps += 'crypto_scheduler' -endif - -foreach d:test_deps - def_lib = get_option('default_library') - test_dep_objs += get_variable(def_lib + '_rte_' + d) -endforeach - -link_libs = [] -if get_option('default_library') == 'static' - link_libs = dpdk_static_libraries + dpdk_drivers -endif - -dpdk_test = executable('dpdk-test', - test_sources, - link_whole: link_libs, - dependencies: test_dep_objs + ext_deps, - c_args: cflags, - install_rpath: join_paths(get_option('prefix'), - driver_install_path), - install: true) - -has_hugepage = run_command(py3, files('has_hugepage.py'), check: true).stdout().strip() != '0' -message('hugepage availability: @0@'.format(has_hugepage)) - -# some perf tests (eg: memcpy perf autotest)take very long -# to complete, so timeout to 10 minutes -timeout_seconds = 600 -timeout_seconds_fast = 10 - -test_no_huge_args = ['--no-huge', '-m', '2048'] - -foreach arg : fast_tests - test_args = [] - run_test = true - if not has_hugepage - if arg[1] - test_args += test_no_huge_args - else - run_test = false - endif - endif - - if get_option('b_sanitize') == 'address' or get_option('b_sanitize') == 'address,undefined' - if not arg[2] - run_test = false - endif - endif - - if (get_option('default_library') == 'shared' and - arg[0] == 'event_eth_tx_adapter_autotest') - test_args += ['-d', dpdk_drivers_build_dir] - endif - if is_linux - test_args += ['--file-prefix=@0@'.format(arg[0])] - endif - - if run_test - test(arg[0], dpdk_test, - env : ['DPDK_TEST=' + arg[0]], - args : test_args, - timeout : timeout_seconds_fast, - is_parallel : false, - suite : 'fast-tests') - if not is_windows and arg[0] == 'trace_autotest' - test_args += ['--trace=.*'] - test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())] - test(arg[0] + '_with_traces', dpdk_test, - env : ['DPDK_TEST=' + arg[0]], - args : test_args, - timeout : timeout_seconds_fast, - is_parallel : false, - suite : 'fast-tests') - endif - endif -endforeach +cflags += '-DALLOW_INTERNAL_API' -if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') - test_args = [dpdk_test] - test_args += test_no_huge_args - if get_option('default_library') == 'shared' - test_args += ['-d', dpdk_drivers_build_dir] - endif - if dpdk_conf.has('RTE_CRYPTO_NULL') - test_args += ['--vdev=crypto_null0'] - endif - if dpdk_conf.has('RTE_DMA_SKELETON') - test_args += ['--vdev=dma_skeleton0'] - endif - if dpdk_conf.has('RTE_EVENT_SKELETON') - test_args += ['--vdev=event_skeleton0'] - endif - if dpdk_conf.has('RTE_NET_NULL') - test_args += ['--vdev=net_null0'] - endif - if dpdk_conf.has('RTE_RAW_SKELETON') - test_args += ['--vdev=rawdev_skeleton0'] - endif - test_args += ['-a', '0000:00:00.0'] - test('telemetry_all', find_program('test_telemetry.sh'), - args: test_args, - timeout : timeout_seconds_fast, - is_parallel : false, - suite : 'fast-tests') +# create a symlink in the app/test directory for the binary, for backward compatibility +if not is_windows + custom_target('test_symlink', + output: 'dpdk-test', + command: ['ln', '-sf', '../dpdk-test', '@OUTPUT@'], + build_by_default: true, + install: false) endif - -foreach arg : perf_test_names - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - timeout : timeout_seconds, - is_parallel : false, - suite : 'perf-tests') -endforeach - -foreach arg : driver_test_names - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - timeout : timeout_seconds, - is_parallel : false, - suite : 'driver-tests') -endforeach - -foreach arg : dump_test_names - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - timeout : timeout_seconds, - is_parallel : false, - suite : 'debug-tests') -endforeach - -foreach arg : extra_test_names - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - timeout : timeout_seconds, - is_parallel : false, - suite : 'extra-tests') -endforeach From patchwork Wed Aug 16 15:34:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130423 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5350343081; Wed, 16 Aug 2023 17:36:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CAB3243274; Wed, 16 Aug 2023 17:35:42 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 0B0DE43269 for ; Wed, 16 Aug 2023 17:35:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200141; x=1723736141; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FLjWuoHFXCWLiqqNhZV7SA8/gq5E/j9uEWQQaginUTI=; b=D3gTphOBewvAXlNOzO+yvLq4ifgJNDLAkFyI70SrYOJQ43SfHJciDLBJ /kiiiLkKgoUkcknT15s96xZHChtjtLNohZ8S0hWq6aZ4oYOpNmfeszl7m XYzUMIqCF3sKBpK7Jwe3BV4iHyEo7KZh6NXsLJi8XKb7YOH9tbZXginVC /kCPDLbI3qMrqFeuTSAUHlccO+WhcilJfNfrv68x4cFxSvOH6WbpgpwlX 02Hu6UPPrPxnBimJglDgzDDpTmepyt0nQhF5n6uQKmqshi3vLNCOY8gFP WMy6aFxqHPzbU4kc3mEqdZqJlWXh3kIDixR3Trq6lOlDHaOtuViuAg+2X g==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458916004" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458916004" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856275" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856275" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:38 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 06/11] app/test: define unit tests suites based on test macros Date: Wed, 16 Aug 2023 16:34:34 +0100 Message-Id: <20230816153439.551501-7-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Rather than having the test suites listed out in the meson.build files and having to have them enabled/disabled selectively based on what libs are being built, pull the tests to run from the source files which were added to the build. Most test suites require no additional info other than the list of test names in the suite. However the fast-test are special that they have additional parameters associated with them. This requires some additional work in the test extraction script and in the meson.build file for processing the output. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup --- MAINTAINERS | 3 +- app/meson.build | 7 +- app/test/suites/meson.build | 74 +++++++++++++++++++ buildtools/get-test-suites.py | 33 +++++++++ .../has-hugepages.py | 0 buildtools/meson.build | 2 + 6 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 app/test/suites/meson.build create mode 100644 buildtools/get-test-suites.py rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 8c3f2c993f..c4ce661b6e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1731,7 +1731,6 @@ Test Applications Unit tests framework F: app/test/commands.c -F: app/test/has_hugepage.py F: app/test/packet_burst_generator.c F: app/test/packet_burst_generator.h F: app/test/process.h @@ -1742,6 +1741,8 @@ F: app/test/test_pmd_perf.c F: app/test/test_resource.c F: app/test/virtual_pmd.c F: app/test/virtual_pmd.h +F: buildtools/has-hugepages.py +F: buildtools/get-test-suites.py Sample packet helper functions for unit test M: Reshma Pattan diff --git a/app/meson.build b/app/meson.build index 0d8b618e7f..c14dc80892 100644 --- a/app/meson.build +++ b/app/meson.build @@ -101,7 +101,7 @@ foreach app:apps link_libs = dpdk_static_libraries + dpdk_drivers endif - executable('dpdk-' + name, + exec = executable('dpdk-' + name, sources, c_args: cflags, link_args: ldflags, @@ -110,4 +110,9 @@ foreach app:apps include_directories: includes, install_rpath: join_paths(get_option('prefix'), driver_install_path), install: true) + if name == 'test' + dpdk_test = exec + autotest_sources = sources + subdir('test/suites') # define the pre-canned test suites + endif endforeach diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build new file mode 100644 index 0000000000..5cdf7c200c --- /dev/null +++ b/app/test/suites/meson.build @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2023 Intel Corporation + +# some perf tests (eg: memcpy perf autotest) take a very long +# to complete, so timeout to 10 minutes +timeout_seconds = 600 +timeout_seconds_fast = 10 + +test_no_huge_args = ['--no-huge', '-m', '2048'] +has_hugepage = run_command(has_hugepages_cmd, check: true).stdout().strip() != '0' +message('hugepage availability: @0@'.format(has_hugepage)) + +# process source files to determine the different unit test suites +# - fast_tests +# - perf_tests +# - driver_tests +test_suites = run_command(get_test_suites_cmd, autotest_sources, + check: true).stdout().strip().split() +foreach suite:test_suites + # simple cases - tests without parameters or special handling + suite = suite.split('=') + suite_name = suite[0] + suite_tests = suite[1].split(',') + if suite_name != 'fast-tests' + # simple cases - tests without parameters or special handling + foreach t: suite_tests + test(t, dpdk_test, + env: ['DPDK_TEST=' + t], + timeout: timeout_seconds, + is_parallel: false, + suite: suite_name) + endforeach + else + # special fast-test handling here + foreach t: suite_tests + params = t.split(':') + test_name = params[0] + nohuge = params[1] == 'true' + asan = params[2] == 'true' + + test_args = [] + if nohuge + test_args += test_no_huge_args + elif not has_hugepage + continue #skip this tests + endif + if not asan and (get_option('b_sanitize') == 'address' + or get_option('b_sanitize') == 'address,undefined') + continue # skip this test + endif + + if get_option('default_library') == 'shared' + test_args += ['-d', dpdk_drivers_build_dir] + endif + + test(test_name, dpdk_test, + args : test_args, + env: ['DPDK_TEST=' + test_name], + timeout : timeout_seconds_fast, + is_parallel : false, + suite : 'fast-tests') + if not is_windows and test_name == 'trace_autotest' + test_args += ['--trace=.*'] + test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())] + test(test_name + '_with_traces', dpdk_test, + args : test_args, + env: ['DPDK_TEST=' + test_name], + timeout : timeout_seconds_fast, + is_parallel : false, + suite : 'fast-tests') + endif + endforeach + endif +endforeach diff --git a/buildtools/get-test-suites.py b/buildtools/get-test-suites.py new file mode 100644 index 0000000000..95a9cad4c8 --- /dev/null +++ b/buildtools/get-test-suites.py @@ -0,0 +1,33 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2023 Intel Corporation + +import sys +import re + +input_list = sys.argv[1:] +test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)") +test_suites = {} + +def get_fast_test_params(test_name, ln): + "Extract the extra fast-test parameters from the line" + #print(f"ln: {ln.rstrip()}, test_name: {test_name}, split: {ln.split(test_name, 1)}") + (_, rest_of_line) = ln.split(test_name, 1) + (_, nohuge, asan, _func) = rest_of_line.split(',', 3) + return f":{nohuge.strip().lower()}:{asan.strip().lower()}" + +for fname in input_list: + with open(fname) as f: + contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())] + for ln in contents: + (test_suite, test_name) = test_def_regex.match(ln).group(1, 2) + suite_name = f"{test_suite.lower()}-tests" + if suite_name in test_suites: + test_suites[suite_name].append(test_name) + else: + test_suites[suite_name] = [test_name] + if suite_name == "fast-tests": + test_suites["fast-tests"][-1] += get_fast_test_params(test_name, ln) + +for suite in test_suites.keys(): + print(f"{suite}={','.join(test_suites[suite])}") diff --git a/app/test/has_hugepage.py b/buildtools/has-hugepages.py similarity index 100% rename from app/test/has_hugepage.py rename to buildtools/has-hugepages.py diff --git a/buildtools/meson.build b/buildtools/meson.build index e1c600e40f..ac5e4dcf08 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -18,6 +18,8 @@ map_to_win_cmd = py3 + files('map_to_win.py') sphinx_wrapper = py3 + files('call-sphinx-build.py') get_cpu_count_cmd = py3 + files('get-cpu-count.py') get_numa_count_cmd = py3 + files('get-numa-count.py') +get_test_suites_cmd = py3 + files('get-test-suites.py') +has_hugepages_cmd = py3 + files('has-hugepages.py') binutils_avx512_check = (py3 + files('binutils-avx512-check.py') + [objdump] + cc.cmd_array()) From patchwork Wed Aug 16 15:34:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130424 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DAC2D43081; Wed, 16 Aug 2023 17:36:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47A3D4327D; Wed, 16 Aug 2023 17:35:45 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id CCF1F43275 for ; Wed, 16 Aug 2023 17:35:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200143; x=1723736143; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=82GQQzzfgd3S9lmruDsdwsPwemXae04BzIG+wJEpClM=; b=bO43W2ojpiatYqZQ7o2eWP/khC5OIicoihDZ552FJbn4xKjfzB+RFevR NhHd3vdMvZ+qL0JCVzXMAUjFxZcyIMC+NXleE/UJFs2o9LI2k9WCUt3IX uqE5uuyy2O2HZgOQLkqiL5eo6Bp5DbMGbWjFtbxndHA761dqkotz291dk diy/F+CqalAmb0YaW50K5WvX9Zz7Q55lu/bOjl1L0tLTVJ98GXVF4qtUz P2QJoJbQBiu+jCzssTtlYOUUu1suxMB214PYPyrHryzN4SeyMefNmN7Ni YEHn03JOrIKHNw3tUa5YTHwoKJNycU5dbyMU5cAzFBcm4ARTOTZMMx0t6 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458916013" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458916013" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856288" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856288" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:40 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 07/11] app/test: add test case for scripted telemetry commands Date: Wed, 16 Aug 2023 16:34:35 +0100 Message-Id: <20230816153439.551501-8-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The test script for calling all telemetry commands is not discoverable by checking the C files for the build. Therefore we need to add it in as a special-case test in the fast-tests group. Signed-off-by: Bruce Richardson --- app/test/suites/meson.build | 30 +++++++++++++++++++++++++ app/test/{ => suites}/test_telemetry.sh | 0 2 files changed, 30 insertions(+) rename app/test/{ => suites}/test_telemetry.sh (100%) diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build index 5cdf7c200c..eddf332156 100644 --- a/app/test/suites/meson.build +++ b/app/test/suites/meson.build @@ -72,3 +72,33 @@ foreach suite:test_suites endforeach endif endforeach + +# standalone test for telemetry +if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') + test_args = [dpdk_test] + test_args += test_no_huge_args + if get_option('default_library') == 'shared' + test_args += ['-d', dpdk_drivers_build_dir] + endif + if dpdk_conf.has('RTE_CRYPTO_NULL') + test_args += ['--vdev=crypto_null0'] + endif + if dpdk_conf.has('RTE_DMA_SKELETON') + test_args += ['--vdev=dma_skeleton0'] + endif + if dpdk_conf.has('RTE_EVENT_SKELETON') + test_args += ['--vdev=event_skeleton0'] + endif + if dpdk_conf.has('RTE_NET_NULL') + test_args += ['--vdev=net_null0'] + endif + if dpdk_conf.has('RTE_RAW_SKELETON') + test_args += ['--vdev=rawdev_skeleton0'] + endif + test_args += ['-a', '0000:00:00.0'] + test('telemetry_all', find_program('test_telemetry.sh'), + args: test_args, + timeout : timeout_seconds_fast, + is_parallel : false, + suite : 'fast-tests') +endif diff --git a/app/test/test_telemetry.sh b/app/test/suites/test_telemetry.sh similarity index 100% rename from app/test/test_telemetry.sh rename to app/test/suites/test_telemetry.sh From patchwork Wed Aug 16 15:34:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130425 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 081AC43081; Wed, 16 Aug 2023 17:36:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53A0C43285; Wed, 16 Aug 2023 17:35:46 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id D8C6143275 for ; Wed, 16 Aug 2023 17:35:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200144; x=1723736144; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mHczh3BeYh4ON1J+EGQD1yhuCmseyN24giOwStz9vU8=; b=Ky/HraOLi4JehH7QsGRsBCpGraoEPI2YuELfzeKYCxNEjOTOgKbgTljw c87D9G4L/jKc9vChY0H0W6OZcKQqVg4GWI1shRFzKO24AQxNtNKGLno7/ ftZ5iqDLFBupskFKexxeXrcyXQjupFxTFBtG3qucRky1/s2/w5W10yi+0 1ZPtHS/xgRwJlvetbv8OXpgNJ8sb1ZexnGMt5BKw2xGSeryIjljJ/N/LS +G8hgq0shWJl7Pnabk0CNUoKM663G5h8rvHWICcXdw+r22vFymVmu7LTM HaoDaN7rRnq9GApZA85geZI36JD1FldnRQEt6+E76avCBd+nRGyQISD2L A==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458916018" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458916018" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856305" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856305" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:42 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 08/11] app/test: add debug test suite Date: Wed, 16 Aug 2023 16:34:36 +0100 Message-Id: <20230816153439.551501-9-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add in for all platforms, the suite of tests to dump out the structure information available. Since the commands are defined in commands.c on all OS's, do not limit their presence to just the non-windows OS's. Signed-off-by: Bruce Richardson --- app/test/suites/meson.build | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build index eddf332156..19a6b902fa 100644 --- a/app/test/suites/meson.build +++ b/app/test/suites/meson.build @@ -102,3 +102,23 @@ if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') is_parallel : false, suite : 'fast-tests') endif + +# dump tests are defined in commands.c, and not easily extractable +dump_test_names = [ + 'dump_devargs', + 'dump_log_types', + 'dump_malloc_heaps', + 'dump_malloc_stats', + 'dump_mempool', + 'dump_memzone', + 'dump_physmem', + 'dump_ring', + 'dump_struct_sizes', +] +foreach arg : dump_test_names + test(arg, dpdk_test, + env : ['DPDK_TEST=' + arg], + timeout : timeout_seconds_fast, + is_parallel : false, + suite : 'debug-tests') +endforeach From patchwork Wed Aug 16 15:34:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130426 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 57AD343081; Wed, 16 Aug 2023 17:36:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 588BB43276; Wed, 16 Aug 2023 17:35:48 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id CD4CD43282 for ; Wed, 16 Aug 2023 17:35:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200146; x=1723736146; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vB7nDDCjGgEGBFlr+bsWXaeR/tcHHmklM2FTlTFK+Do=; b=hMbqxCFx5JRoEVbqVOE1UYZgPxIkTtyUGkowO38PVAzXdrib7BstbXo+ VdU6m+G8UJjDVezBpaW1kxE9vZqL7B5zyr0JObPcOHlrQr1zgZVnMnDvV vEN2bRVcbwDAyrLJAkXhVHE8hdKBnYmXqzx8wjeC0JmlOsuccw0J7KmSb Kpw9ndh7AHiMMlhYFRPb03wx0Ja57Bcz5sj9CFfkXNHixUs5qO2H+ZgWe bKgx/3jbQCadOrmg0GW9RlXPg3h2ZxoCQZNEhTltEd1mUTumx8h9h7qLc kFYNyuVImrEMFCJ+70uRugbshnYH+7Cjow/ospmBlFofQrBeivkAhzUpc A==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458916032" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458916032" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856321" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856321" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:43 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 09/11] examples/l3fwd: make eventdev an optional dependency Date: Wed, 16 Aug 2023 16:34:37 +0100 Message-Id: <20230816153439.551501-10-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org With l3fwd being a very commonly used example app, and built as part of our CI tests, we need to ensure it's buildable with just about all supported DPDK configurations. To enable l3fwd application to be built when the eventdev library is disabled, we need to compile in the eventdev support conditionally. Thankfully, the eventdev support is pretty self-contained, with only the main.c file having more than a couple of ifdefs. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup --- examples/l3fwd/l3fwd_em.c | 2 + examples/l3fwd/l3fwd_em_hlm.h | 2 + examples/l3fwd/l3fwd_event.c | 2 + examples/l3fwd/l3fwd_event.h | 7 ++- examples/l3fwd/l3fwd_event_generic.c | 2 + examples/l3fwd/l3fwd_event_internal_port.c | 2 + examples/l3fwd/l3fwd_fib.c | 2 + examples/l3fwd/l3fwd_lpm.c | 2 + examples/l3fwd/main.c | 65 +++++++++++++++++----- examples/l3fwd/meson.build | 5 +- 10 files changed, 74 insertions(+), 17 deletions(-) diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c index 476ac0c54f..40e102b38a 100644 --- a/examples/l3fwd/l3fwd_em.c +++ b/examples/l3fwd/l3fwd_em.c @@ -663,6 +663,7 @@ em_main_loop(__rte_unused void *dummy) return 0; } +#ifdef RTE_LIB_EVENTDEV static __rte_always_inline void em_event_loop_single(struct l3fwd_event_resources *evt_rsrc, const uint8_t flags) @@ -959,6 +960,7 @@ em_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy) em_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ); return 0; } +#endif /* Initialize exact match (hash) parameters. 8< */ void diff --git a/examples/l3fwd/l3fwd_em_hlm.h b/examples/l3fwd/l3fwd_em_hlm.h index 2e11eefad7..31cda9ddc1 100644 --- a/examples/l3fwd/l3fwd_em_hlm.h +++ b/examples/l3fwd/l3fwd_em_hlm.h @@ -255,6 +255,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid, send_packets_multi(qconf, pkts_burst, dst_port, nb_rx); } +#ifdef RTE_LIB_EVENTDEV /* * Buffer optimized handling of events, invoked * from main_loop. @@ -347,5 +348,6 @@ l3fwd_em_process_event_vector(struct rte_event_vector *vec, process_event_vector(vec, dst_port); } +#endif /* RTE_LIB_EVENTDEV */ #endif /* __L3FWD_EM_HLM_H__ */ diff --git a/examples/l3fwd/l3fwd_event.c b/examples/l3fwd/l3fwd_event.c index 32906ab08d..d72a4138cc 100644 --- a/examples/l3fwd/l3fwd_event.c +++ b/examples/l3fwd/l3fwd_event.c @@ -2,6 +2,7 @@ * Copyright(C) 2019 Marvell International Ltd. */ +#ifdef RTE_LIB_EVENTDEV #include #include @@ -341,3 +342,4 @@ l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id, rte_event_port_quiesce(event_d_id, event_p_id, l3fwd_event_port_flush, NULL); } +#endif /* #ifdef RTE_LIB_EVENTDEV */ diff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h index e21817c36b..1fd6fe4a78 100644 --- a/examples/l3fwd/l3fwd_event.h +++ b/examples/l3fwd/l3fwd_event.h @@ -6,11 +6,13 @@ #define __L3FWD_EVENTDEV_H__ #include +#include +#include + +#ifdef RTE_LIB_EVENTDEV #include #include #include -#include -#include #include "l3fwd.h" @@ -164,4 +166,5 @@ void l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id, struct rte_event events[], uint16_t nb_enq, uint16_t nb_deq, uint8_t is_vector); +#endif /* ifdef RTE_LIB_EVENTDEV */ #endif /* __L3FWD_EVENTDEV_H__ */ diff --git a/examples/l3fwd/l3fwd_event_generic.c b/examples/l3fwd/l3fwd_event_generic.c index c80573fc58..ddb6e5c38d 100644 --- a/examples/l3fwd/l3fwd_event_generic.c +++ b/examples/l3fwd/l3fwd_event_generic.c @@ -2,6 +2,7 @@ * Copyright(C) 2019 Marvell International Ltd. */ +#ifdef RTE_LIB_EVENTDEV #include #include "l3fwd.h" @@ -309,3 +310,4 @@ l3fwd_event_set_generic_ops(struct l3fwd_event_setup_ops *ops) ops->event_port_setup = l3fwd_event_port_setup_generic; ops->adapter_setup = l3fwd_rx_tx_adapter_setup_generic; } +#endif /* RTE_LIB_EVENTDEV */ diff --git a/examples/l3fwd/l3fwd_event_internal_port.c b/examples/l3fwd/l3fwd_event_internal_port.c index 32cf657148..cb49a8b9fa 100644 --- a/examples/l3fwd/l3fwd_event_internal_port.c +++ b/examples/l3fwd/l3fwd_event_internal_port.c @@ -2,6 +2,7 @@ * Copyright(C) 2019 Marvell International Ltd. */ +#ifdef RTE_LIB_EVENTDEV #include #include "l3fwd.h" @@ -311,3 +312,4 @@ l3fwd_event_set_internal_port_ops(struct l3fwd_event_setup_ops *ops) ops->event_port_setup = l3fwd_event_port_setup_internal_port; ops->adapter_setup = l3fwd_rx_tx_adapter_setup_internal_port; } +#endif /* RTE_LIB_EVENTDEV */ diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c index 18398492ae..6a21984415 100644 --- a/examples/l3fwd/l3fwd_fib.c +++ b/examples/l3fwd/l3fwd_fib.c @@ -253,6 +253,7 @@ fib_main_loop(__rte_unused void *dummy) return 0; } +#ifdef RTE_LIB_EVENTDEV /* One eventdev loop for single and burst using fib. */ static __rte_always_inline void fib_event_loop(struct l3fwd_event_resources *evt_rsrc, @@ -635,6 +636,7 @@ fib_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy) fib_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ); return 0; } +#endif /* Function to setup fib. 8< */ void diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c index 4ac1925c84..a484a33089 100644 --- a/examples/l3fwd/l3fwd_lpm.c +++ b/examples/l3fwd/l3fwd_lpm.c @@ -226,6 +226,7 @@ lpm_main_loop(__rte_unused void *dummy) return 0; } +#ifdef RTE_LIB_EVENTDEV static __rte_always_inline uint16_t lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf) { @@ -554,6 +555,7 @@ lpm_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy) lpm_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ); return 0; } +#endif void setup_lpm(const int socketid) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index a4f061537e..6063eb1399 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -135,8 +135,10 @@ static struct rte_eth_conf port_conf = { uint32_t max_pkt_len; -static struct rte_mempool *pktmbuf_pool[RTE_MAX_ETHPORTS][NB_SOCKETS]; +#ifdef RTE_LIB_EVENTDEV static struct rte_mempool *vector_pool[RTE_MAX_ETHPORTS]; +#endif +static struct rte_mempool *pktmbuf_pool[RTE_MAX_ETHPORTS][NB_SOCKETS]; static uint8_t lkp_per_socket[NB_SOCKETS]; struct l3fwd_lkp_mode { @@ -398,8 +400,10 @@ print_usage(const char *prgname) " [--parse-ptype]" " [--per-port-pool]" " [--mode]" +#ifdef RTE_LIB_EVENTDEV " [--eventq-sched]" " [--event-vector [--event-vector-size SIZE] [--event-vector-tmo NS]]" +#endif " [-E]" " [-L]\n\n" @@ -422,6 +426,7 @@ print_usage(const char *prgname) " --per-port-pool: Use separate buffer pool per port\n" " --mode: Packet transfer mode for I/O, poll or eventdev\n" " Default mode = poll\n" +#ifdef RTE_LIB_EVENTDEV " --eventq-sched: Event queue synchronization method\n" " ordered, atomic or parallel.\n" " Default: atomic\n" @@ -432,6 +437,7 @@ print_usage(const char *prgname) " --event-vector: Enable event vectorization.\n" " --event-vector-size: Max vector size if event vectorization is enabled.\n" " --event-vector-tmo: Max timeout to form vector in nanoseconds if event vectorization is enabled\n" +#endif " -E : Enable exact match, legacy flag please use --lookup=em instead\n" " -L : Enable longest prefix match, legacy flag please use --lookup=lpm instead\n" " --rule_ipv4=FILE: Specify the ipv4 rules entries file.\n" @@ -559,14 +565,16 @@ parse_eth_dest(const char *optarg) } static void -parse_mode(const char *optarg) +parse_mode(const char *optarg __rte_unused) { +#ifdef RTE_LIB_EVENTDEV struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc(); if (!strcmp(optarg, "poll")) evt_rsrc->enabled = false; else if (!strcmp(optarg, "eventdev")) evt_rsrc->enabled = true; +#endif } static void @@ -601,6 +609,7 @@ parse_queue_size(const char *queue_size_arg, uint16_t *queue_size, int rx) *queue_size = value; } +#ifdef RTE_LIB_EVENTDEV static void parse_eventq_sched(const char *optarg) { @@ -631,6 +640,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues) evt_rsrc->eth_rx_queues = num_eth_rx_queues; } +#endif static int parse_lookup(const char *optarg) @@ -756,9 +766,11 @@ parse_args(int argc, char **argv) int option_index; char *prgname = argv[0]; uint8_t lcore_params = 0; +#ifdef RTE_LIB_EVENTDEV uint8_t eventq_sched = 0; uint8_t eth_rx_q = 0; struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc(); +#endif argvopt = argv; @@ -850,6 +862,7 @@ parse_args(int argc, char **argv) parse_mode(optarg); break; +#ifdef RTE_LIB_EVENTDEV case CMD_LINE_OPT_EVENTQ_SYNC_NUM: parse_eventq_sched(optarg); eventq_sched = 1; @@ -860,6 +873,20 @@ parse_args(int argc, char **argv) eth_rx_q = 1; break; + case CMD_LINE_OPT_ENABLE_VECTOR_NUM: + printf("event vectorization is enabled\n"); + evt_rsrc->vector_enabled = 1; + break; + + case CMD_LINE_OPT_VECTOR_SIZE_NUM: + evt_rsrc->vector_size = strtol(optarg, NULL, 10); + break; + + case CMD_LINE_OPT_VECTOR_TMO_NS_NUM: + evt_rsrc->vector_tmo_ns = strtoull(optarg, NULL, 10); + break; +#endif + case CMD_LINE_OPT_LOOKUP_NUM: if (lookup_mode != L3FWD_LOOKUP_DEFAULT) { fprintf(stderr, "Only one lookup mode is allowed at a time!\n"); @@ -875,16 +902,6 @@ parse_args(int argc, char **argv) return -1; break; - case CMD_LINE_OPT_ENABLE_VECTOR_NUM: - printf("event vectorization is enabled\n"); - evt_rsrc->vector_enabled = 1; - break; - case CMD_LINE_OPT_VECTOR_SIZE_NUM: - evt_rsrc->vector_size = strtol(optarg, NULL, 10); - break; - case CMD_LINE_OPT_VECTOR_TMO_NS_NUM: - evt_rsrc->vector_tmo_ns = strtoull(optarg, NULL, 10); - break; case CMD_LINE_OPT_RULE_IPV4_NUM: l3fwd_set_rule_ipv4_name(optarg); break; @@ -900,6 +917,8 @@ parse_args(int argc, char **argv) } } + RTE_SET_USED(lcore_params); /* needed if no eventdev block */ +#ifdef RTE_LIB_EVENTDEV if (evt_rsrc->enabled && lcore_params) { fprintf(stderr, "lcore config is not valid when event mode is selected\n"); return -1; @@ -927,6 +946,7 @@ parse_args(int argc, char **argv) "vector timeout set to default (%" PRIu64 " ns)\n", evt_rsrc->vector_tmo_ns); } +#endif /* * Nothing is selected, pick longest-prefix match @@ -962,7 +982,9 @@ print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr) int init_mem(uint16_t portid, unsigned int nb_mbuf) { +#ifdef RTE_LIB_EVENTDEV struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc(); +#endif struct lcore_conf *qconf; int socketid; unsigned lcore_id; @@ -1007,6 +1029,7 @@ init_mem(uint16_t portid, unsigned int nb_mbuf) } } +#ifdef RTE_LIB_EVENTDEV if (evt_rsrc->vector_enabled && vector_pool[portid] == NULL) { unsigned int nb_vec; @@ -1025,6 +1048,7 @@ init_mem(uint16_t portid, unsigned int nb_mbuf) printf("Allocated vector pool for port %d\n", portid); } +#endif qconf = &lcore_conf[lcore_id]; qconf->ipv4_lookup_struct = @@ -1406,6 +1430,7 @@ l3fwd_service_enable(uint32_t service_id) return 0; } +#ifdef RTE_LIB_EVENTDEV static void l3fwd_event_service_setup(void) { @@ -1458,16 +1483,20 @@ l3fwd_event_service_setup(void) l3fwd_service_enable(service_id); } } +#endif int main(int argc, char **argv) { +#ifdef RTE_LIB_EVENTDEV struct l3fwd_event_resources *evt_rsrc; + int i; +#endif struct lcore_conf *qconf; uint16_t queueid, portid; unsigned int lcore_id; uint8_t queue; - int i, ret; + int ret; /* init EAL */ ret = rte_eal_init(argc, argv); @@ -1487,7 +1516,9 @@ main(int argc, char **argv) *(uint64_t *)(val_eth + portid) = dest_eth_addr[portid]; } +#ifdef RTE_LIB_EVENTDEV evt_rsrc = l3fwd_get_eventdev_rsrc(); +#endif /* parse application arguments (after the EAL ones) */ ret = parse_args(argc, argv); if (ret < 0) @@ -1499,6 +1530,7 @@ main(int argc, char **argv) /* Add the config file rules */ l3fwd_lkp.read_config_files(); +#ifdef RTE_LIB_EVENTDEV evt_rsrc->per_port_pool = per_port_pool; evt_rsrc->pkt_pool = pktmbuf_pool; evt_rsrc->vec_pool = vector_pool; @@ -1514,6 +1546,7 @@ main(int argc, char **argv) l3fwd_lkp.main_loop = evt_rsrc->ops.lpm_event_loop; l3fwd_event_service_setup(); } else +#endif l3fwd_poll_resource_setup(); /* start ports */ @@ -1562,6 +1595,8 @@ main(int argc, char **argv) ret = 0; /* launch per-lcore init on every lcore */ rte_eal_mp_remote_launch(l3fwd_lkp.main_loop, NULL, CALL_MAIN); + +#ifdef RTE_LIB_EVENTDEV if (evt_rsrc->enabled) { for (i = 0; i < evt_rsrc->rx_adptr.nb_rx_adptr; i++) rte_event_eth_rx_adapter_stop( @@ -1589,7 +1624,9 @@ main(int argc, char **argv) rte_event_dev_stop(evt_rsrc->event_d_id); rte_event_dev_close(evt_rsrc->event_d_id); - } else { + } else +#endif + { rte_eal_mp_wait_lcore(); RTE_ETH_FOREACH_DEV(portid) { diff --git a/examples/l3fwd/meson.build b/examples/l3fwd/meson.build index b40244a941..c25de77bba 100644 --- a/examples/l3fwd/meson.build +++ b/examples/l3fwd/meson.build @@ -7,7 +7,7 @@ # DPDK instance, use 'make' allow_experimental_apis = true -deps += ['acl', 'hash', 'lpm', 'fib', 'eventdev'] +deps += ['acl', 'hash', 'lpm', 'fib'] sources = files( 'l3fwd_acl.c', 'l3fwd_em.c', @@ -18,3 +18,6 @@ sources = files( 'l3fwd_lpm.c', 'main.c', ) +if dpdk_conf.has('RTE_LIB_EVENTDEV') + deps += 'eventdev' +endif From patchwork Wed Aug 16 15:34:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130427 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D5BD43081; Wed, 16 Aug 2023 17:36:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 606264328B; Wed, 16 Aug 2023 17:35:49 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 296C943280 for ; Wed, 16 Aug 2023 17:35:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200147; x=1723736147; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/aubjjtmNTHfcLoV01FtIX5ii38xHE8a204GN0Tde/Q=; b=GRObQlhxQnXo9lmZds3YGctoPOY4JxQ0HNZIIKZPiJ+n5dUY64/D6e3/ F8dsYF/IVnFk/cTvvaVNEc+Dc8Vti2ygwfzKR5y//9zxekuCwslHBXkIf jqsloRlEMt0dRZrLkONw1jGEAnxgFkGBX+YtTd42zCu00cO1IQv9Ox//M NU6Wfi0I+IMloqGVD3ijHINudZjOq/WGld7bcsBP/RfNVObz5nsa81Zyn n8BHb9nBcBny2ns1sYaFwoFFRLSlWKV8DZouHqEEQm2mfoUDQ0nZnuM0y mvKmUiJuEqZhT3cLYwtWxeDidDwTyJxhuwJxzHgIZJcbbhIo1GoMp2EXM Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458916041" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458916041" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856329" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856329" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:45 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 10/11] build: make most device classes optional Date: Wed, 16 Aug 2023 16:34:38 +0100 Message-Id: <20230816153439.551501-11-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Apart from ethdev and cryptodev, which have lots of components and tests which depend on them, we can make the device class libraries optional without too much work. This patch marks: * bbdev, * compressdev, * dmadev, * eventdev, * mldev, * rawdev, * regexdev optional, and ensures that DPDK - including tests - can be built with these components disabled. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup --- lib/meson.build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/meson.build b/lib/meson.build index 92cbd6bb66..1a78c8c984 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -67,8 +67,12 @@ libraries = [ ] optional_libs = [ + 'bbdev', 'bitratestats', 'cfgfile', + 'compressdev', + 'dmadev', + 'eventdev', 'gpudev', 'graph', 'gro', @@ -76,11 +80,14 @@ optional_libs = [ 'jobstats', 'latencystats', 'metrics', + 'mldev', 'node', 'pdump', 'pipeline', 'port', 'power', + 'rawdev', + 'regexdev', 'table', 'vhost', ] From patchwork Wed Aug 16 15:34:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130428 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4217C43081; Wed, 16 Aug 2023 17:36:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D638C43296; Wed, 16 Aug 2023 17:35:50 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 13F9E43288 for ; Wed, 16 Aug 2023 17:35:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692200149; x=1723736149; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TFgoVm/DWbcEr963rLqUSAhJsS4zNSQCBgIZKDvvqZg=; b=SBgIUv4yUdSDFvJkbKLAYB6QVFxQcQaDcZEWxaTDJNwbQqq3jY4hl6MT qCuwqww+KVVDAnRESVjpyq76JtQa4symhvwjeo9hf4z3jtX0+dPAjCgxr KKZid63Ubh6KhUf27XnyHLxsLXpSFVf6zLdvRqeFFQurdXofWGMZ+T8s3 y7ozYXiUbD7lvkn69rxZEiAsv1NMOTE5x55PlXQ8XY0OJcYlTve2DImoB qOUka0E0rOMeZdVy7C4cRapUvO+GiHzRoGfwkoowfWEU3aIURPTTK1ioB ZjfyDewql8IyVAfkh4/830fgfD5CxbUKnZ/FK+ArxsUln3Q2tq2dv9Vo9 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458916051" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="458916051" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 08:35:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="857856339" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="857856339" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga004.jf.intel.com with ESMTP; 16 Aug 2023 08:35:46 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, probb@iol.unh.edu, mb@smartsharesystems.com, Bruce Richardson Subject: [PATCH v6 11/11] build: expand list of optional libraries Date: Wed, 16 Aug 2023 16:34:39 +0100 Message-Id: <20230816153439.551501-12-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230816153439.551501-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230816153439.551501-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org With the unit test build now with individual per-file dependencies, we can more easily expand the list of optional libraries. Add 8 new libraries to the optional list. Signed-off-by: Bruce Richardson Acked-by: Morten Brørup --- lib/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/meson.build b/lib/meson.build index 1a78c8c984..0c9dc8b3b6 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -69,25 +69,33 @@ libraries = [ optional_libs = [ 'bbdev', 'bitratestats', + 'bpf', 'cfgfile', 'compressdev', + 'distributor', 'dmadev', + 'efd', 'eventdev', 'gpudev', 'graph', 'gro', 'gso', + 'ip_frag', 'jobstats', 'latencystats', + 'member', 'metrics', 'mldev', 'node', + 'pcapng', 'pdump', 'pipeline', 'port', 'power', 'rawdev', 'regexdev', + 'reorder', + 'sched', 'table', 'vhost', ]