From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D18042ED9; Fri, 21 Jul 2023 13:51:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6597A42BFE; Fri, 21 Jul 2023 13:51:36 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 657F942BFE for ; Fri, 21 Jul 2023 13:51: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=1689940295; x=1721476295; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xdo0l5GXS19yPeG8kdUUcbUABk11qat6WN2U/QjeZMI=; b=Yggs9qcY9ZNMFrTFnUOI/X9qUGK8m0a/bT17dOAIrt5WMdASR9uuHdEo ero9VqPP3vpSVGdEglvTn1y0IAF40c6togkNcgvaWR9NbwPeC/KOAgr1J AsVLmxZYmz8P9EIYAvXneMDLStuy3/SqMl/yhpnTyrig4mmc7c9DhBkSE ftsGxEvaRynpID0n8wMO2tKnBx6trdFya+Zv1mMImBte80/ZpVSBNiShr ODsdLRGYW4t7xPk8l1Zx+K/8bK4/SzYroyb0IZLyYlDlqKLe/X63pqR/y yMAfD9qTY2uwVQFIbkq7TkFKHJzxmicaL0nm8BW+NbWENBTCtTgq2C9Qo A==; X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="346599161" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="346599161" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2023 04:51:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="971420527" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="971420527" Received: from silpixa00401385.ir.intel.com ([10.237.214.156]) by fmsmga006.fm.intel.com with ESMTP; 21 Jul 2023 04:51:34 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [RFC PATCH 1/5] app/test: add new macros for various test types Date: Fri, 21 Jul 2023 12:51:21 +0100 Message-Id: <20230721115125.55137-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230721115125.55137-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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 -- 2.39.2