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 B358143F65; Thu, 2 May 2024 08:08:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5E46402E8; Thu, 2 May 2024 08:07:38 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2081.outbound.protection.outlook.com [40.107.6.81]) by mails.dpdk.org (Postfix) with ESMTP id CE67E402D7 for ; Thu, 2 May 2024 08:07:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AbB5QPaladELbQMbkafq9Q2FjEU9q0nQJKwwJY9AcvEBTsBrV3CNiqNac8Y0SDIon3J+3xevOj5IVnJz2C7Y2WM1hKKboAIOTCF7Ham7dw+VSk0epZM9U4hDLZ3HECei2qog6AGMexFHZR5d6/y7inaQEf2YgPtW7tYEl9vPXepag7VFLaPgwQ66KY/Sv44a1d+s11Fi43IGlEGk/by73jLsLwca7sstDc3hWEKVBkkRoMhV2kGI34zAyB+qonAssg1Yw+O/p3BtEZXkt7IMl/zpZGn44nxe/XAfFuIPhcbQSXF10Xpcm3ptZOMVjKFuGGnPvoFMo67amiPqkdULmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3sGw/xeCUCWn//mCtmdfD0/OHX4OH+QhKpNnji9Ybjc=; b=FLI+ewYxHwBn8/PanoBFOOJEiyo/yu0r2l0/CstuydlJz4G/XK1kXIIe00yNoAA755bBzFawXMKhGlgyW5VmCeQDzfJs/DKuM1sSAXpxQJnj/zwC6a5z/0z9iTUk5fE0CSeKEWi9+xL4Rsueo50JAGmEWyZttLHkHtVoni5WkmP5QrclVzQAg99WL8RWeRnrlimt/hVfrRhe+Mznp6jpHWt0XpWQra8gDwfzW1J4fUVoGgORR2Bf9+qLtm0YMCu7KDUSmdDfUzyp5AG87KtEEmwmCl4k57W9/81sLnR2WaWaAvbIitU/7QmNMorz1I1N0MITmq9vZVt0rIDun/foKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3sGw/xeCUCWn//mCtmdfD0/OHX4OH+QhKpNnji9Ybjc=; b=hGphjBaU+4ZfAop7/dAAlyobXY2l1+69xIm/wHt0s5DWVmIR3miDOYvRdXBtmCzutN2tFbtJm9p9Wy3qQD7E80lB6mgoyWj3Fo4ktujCEeURlgcGirIYInyRA+855QKydBcrA+khNxWNLTawP72hix2UaHeiMRM7B0h9CthsQwZtyTBwy27Hkogn3BLv0KvVUjPTriEDW5+aR9ndpjewi8pBeXWJME76wGofZYux/+mgqeuJ6Pce5ADQ6mSV2pJ+8QhBTjj3+F59bLiIzr/vqDA1I0h8tlYxk9ImP0U0gBr/A1MLLJ5PqX41wWtVQWMyKuW3TOu3GCjrbPRTzENENQ== Received: from DU2PR04CA0057.eurprd04.prod.outlook.com (2603:10a6:10:234::32) by GVXPR07MB9961.eurprd07.prod.outlook.com (2603:10a6:150:11f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.39; Thu, 2 May 2024 06:07:32 +0000 Received: from DB5PEPF00014B91.eurprd02.prod.outlook.com (2603:10a6:10:234:cafe::14) by DU2PR04CA0057.outlook.office365.com (2603:10a6:10:234::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.36 via Frontend Transport; Thu, 2 May 2024 06:07:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by DB5PEPF00014B91.mail.protection.outlook.com (10.167.8.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Thu, 2 May 2024 06:07:31 +0000 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.62) with Microsoft SMTP Server id 15.2.1544.9; Thu, 2 May 2024 08:07:30 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id 6FAEB380061; Thu, 2 May 2024 08:07:30 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: , Heng Wang , "Stephen Hemminger" , Tyler Retzlaff , =?UTF-8?q?Morten=20Br=C3=B8rup?= , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [RFC v6 4/6] eal: add unit tests for exactly-once bit access functions Date: Thu, 2 May 2024 07:57:04 +0200 Message-ID: <20240502055706.112443-5-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240502055706.112443-1-mattias.ronnblom@ericsson.com> References: <20240430120810.108928-2-mattias.ronnblom@ericsson.com> <20240502055706.112443-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B91:EE_|GVXPR07MB9961:EE_ X-MS-Office365-Filtering-Correlation-Id: 09e73556-e21d-4954-cd60-08dc6a6e2759 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|36860700004|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ZzJwSlpEMnJFL21PZGREbjBCUjY1TTU1WXkyQjFKRnZPTjVQRGdYU0NxdzRv?= =?utf-8?B?R0h2bHMwbmJzL2pqNGdJM0U2TjREcTN0N2ZMNy8xNWVOTWNtZ3d1SEdBc0hP?= =?utf-8?B?UzV6d3REaTNhWEtzcW1kbFpBZnN0UUI5Vll6Z29kNlFvR3V4WFlmWlkyRUNL?= =?utf-8?B?R2N0ZHRnZ3ljaFppYVF5QWxPbnczQ3o3QTRxbmREb09SR2x3YnhzWCtYbzZY?= =?utf-8?B?NXVXOGRldjBHcy9WSFoxWFFRUkVqczczcDBRaVA5N2JwRnBCWXV5eFhqeDBQ?= =?utf-8?B?aklmSlUyWStHQWZpV3JpUGhDd1pJcDJsT3MrKzB6UUZDVWl6VWJrMXJ6VjhX?= =?utf-8?B?RjAxOFZWRmY0ODBTOEdvZmgwL2tiL3NyZDFkRXJpa0dySlYwVERMaGdvRG9Y?= =?utf-8?B?ZHlHVDYvMEtGOUJPR3E0bk40aXVyWVdMTldaM2hOQVVYSUVreUVWNEZBNWF5?= =?utf-8?B?VGpoSW1ZekJqdDJTSDNFY3BXNnpSNjFjNGlDQ1lDcURqL2Y2UTVlcGRZTzFl?= =?utf-8?B?WlBTcm9ac2xTVk5ZUHFZdGhOLzQzb0daQWlqaitWdkdnRnQ1UXhOdDUxaEJh?= =?utf-8?B?VGRqMHdCTSs0VX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?= =?utf-8?B?cW9HbnFXOTI0cXFDdDZGNmhleHh4b2FGM3lDS3JsclcyRnZaa0pZeXNCZkly?= =?utf-8?B?R2NLWS9RSXl0b0EvOVJhY1ZBK05odXF0TDhsOFViOThDdXNkbVh2dzRpWVhE?= =?utf-8?B?TlJtZVZLSG1EUUJoL2RadFNvQ1Y1L3NMQ1BGN0twNHRaY1h4UTUrVVlra3JS?= =?utf-8?B?UFUySVJ5MExwWGlHekk2cGdVd29obDVnMkxSNEJUMHJSajB6emRzc3F6UDFi?= =?utf-8?B?YXd6eHIrRW9UWmlRUFZQL1ptNlh0LzdwL0g2WEVwclZUdTRGWmJpbUFIb1Yx?= =?utf-8?Q?R5Rspm1X+7TunnlrxQQ3ZGZKnGMCRzQvkGMJ8=3D?= X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(13230031)(1800799015)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2024 06:07:31.8130 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 09e73556-e21d-4954-cd60-08dc6a6e2759 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B91.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR07MB9961 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 Extend bitops tests to cover the rte_bit_once_*() family of functions. RFC v5: * Atomic bit op implementation moved from this patch to the proper patch in the series. (Morten Brørup) RFC v4: * Remove redundant continuations. Signed-off-by: Mattias Rönnblom Acked-by: Morten Brørup Acked-by: Tyler Retzlaff --- app/test/test_bitops.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test/test_bitops.c b/app/test/test_bitops.c index 322f58c066..9bffc4da14 100644 --- a/app/test/test_bitops.c +++ b/app/test/test_bitops.c @@ -61,6 +61,14 @@ GEN_TEST_BIT_ACCESS(test_bit_access32, rte_bit_set, rte_bit_clear, GEN_TEST_BIT_ACCESS(test_bit_access64, rte_bit_set, rte_bit_clear, rte_bit_assign, rte_bit_flip, rte_bit_test, 64) +GEN_TEST_BIT_ACCESS(test_bit_once_access32, rte_bit_once_set, + rte_bit_once_clear, rte_bit_once_assign, + rte_bit_once_flip, rte_bit_once_test, 32) + +GEN_TEST_BIT_ACCESS(test_bit_once_access64, rte_bit_once_set, + rte_bit_once_clear, rte_bit_once_assign, + rte_bit_once_flip, rte_bit_once_test, 64) + static uint32_t val32; static uint64_t val64; @@ -177,6 +185,8 @@ static struct unit_test_suite test_suite = { .unit_test_cases = { TEST_CASE(test_bit_access32), TEST_CASE(test_bit_access64), + TEST_CASE(test_bit_once_access32), + TEST_CASE(test_bit_once_access64), TEST_CASE(test_bit_relaxed_set), TEST_CASE(test_bit_relaxed_clear), TEST_CASE(test_bit_relaxed_test_set_clear), -- 2.34.1