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