From patchwork Tue Aug 15 15:10:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130366 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 9D28943074; Tue, 15 Aug 2023 17:22:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9254D43263; Tue, 15 Aug 2023 17:22:51 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 06A914114B; Tue, 15 Aug 2023 17:22: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=1692112969; x=1723648969; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GUo9vMeBsvyknhyGbkUIq/oRylxfk/palneosahIEMw=; b=AG9nVSGsXGWgi56Aup4AyZIWzv/L224xnZn6MQv/KKwdSyWS3+R7+Q0S /IK2KR02LqeLCpBqWJUaJ99PwfI5czL+SYrPBoDORoC261YtbjszXe01t X2zOwW1jHyiTKIbuKT2OuzpdsoQJOHvzfKvWi3KUp9E15VP6L+siOINC4 mrtsUczOjzepXbQCAwxIhTGmUw36pq/+Tivf3b4e+WVor4HDLxP3dtRsk rQoxvguBimILDFdfPF/U8Ob9AkeWfJ6+f+oaveWknfXDudvwuLajCNo4u wAZsH16IjcgT/ynAASILGxAXsghGlKVz5TFveOZ71+a2yHfAk5z1qzr0s A==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="357271505" X-IronPort-AV: E=Sophos;i="6.01,174,1684825200"; d="scan'208";a="357271505" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2023 08:10:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="803843779" X-IronPort-AV: E=Sophos;i="6.01,174,1684825200"; d="scan'208";a="803843779" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by fmsmga004.fm.intel.com with ESMTP; 15 Aug 2023 08:10:58 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ci@dpdk.org, Bruce Richardson , =?utf-8?q?Mo?= =?utf-8?q?rten_Br=C3=B8rup?= Subject: [PATCH v5 01/10] app/test: add new macros for various test types Date: Tue, 15 Aug 2023 16:10:45 +0100 Message-Id: <20230815151053.996469-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230815151053.996469-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230815151053.996469-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-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