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 BBB4343F49; Mon, 29 Apr 2024 12:02:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D98940695; Mon, 29 Apr 2024 12:02:18 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2040.outbound.protection.outlook.com [40.107.105.40]) by mails.dpdk.org (Postfix) with ESMTP id 71388402E0 for ; Mon, 29 Apr 2024 12:02:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a2XETLBg4iR9kAz1/puqmhtMkxZ73cGfPOs63uF/W6H4z1ueD+qjVlmJ6Z2f9ZEC6R/u+ioIbXMdhqByosJ27/gS+e213SylKj1q7oVmv5GZ8ES2Z0BcqSMVq+zLRmylSr1j3Z1P5fGNZZ1tLtp0yRiAGTGbigZy0MIhqusZaFrOmlmz0mKZC8/Pypd2NBg8bfiYHw3zQWNBKs1RDOt85T1EpFCudaIqVWw0rajvFqsjDl76DdRzC9vtrMzYSQJ1vGy4S7a0A3QV9qiRqM1iRXhX91B+9Dc4pj7HnpllmhNUga/1RFCs8l4SvpJ9eMUTtoRQdPRo4KAhpuCJvy7sDQ== 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=7W+hBC8l/Qn64JH916BuvIZUxAEc7QpzZspDnV8Kzho=; b=h9Uwb9qxZMncl8jXrjN6zQfexH0j+ICPoD6TOCNVieK/CI+VzUNvozzY0zw0W0jRstSHoSl4JeBrFQ2Q9rSsG7fLLxmZyc+Dolr8Lb8JINCeYUIYRuO8kjJw6VF5Ptld4GGBg1c2PSe14XK33MX/z4gyMpUXt/HfTqXxTFhwBU4cnRVtRPv1WuygsBTXXP/9e40NvDPXhDNG81K8Ic2lBlc0900fQHYrRizR4U2IthQ8C8l7OmyW1ceeng2kr7LJEsZibs3ibFvZvs/o+JT1gBmgOJjLsK5Px0qEX/ftlrDPeAGtWk4K2owij3qMnYPxYMQjM/2NMHHgeOol5eKPEA== 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=7W+hBC8l/Qn64JH916BuvIZUxAEc7QpzZspDnV8Kzho=; b=SjGbN5Pq70hx96aZdGI1kpjFJIQnLUClMuncg6vqAkU9Gd/LISta+2I3YVcwAm3K3jDmMyjvrWkXZyeMsGz/FKzI2iUbjXIU9CkZP6eVa1F8T92fkSbiLLR+xtvWljaGA21hTMM7Wilh4XFJpuvz02siUjaR90KM6Hzvc4QQFfDL5Bc4+Qf2Al1UVoCjYZ+ndb/ZPX7l6kT6I47bM6Jf/Mr4x4goPf7uEAXdGqLy43gdePe/WRV3DjKBdHH6HejKQzJif7ns1ppGXDBEy3/6oIcoQ6SaTXZlm6T3qbKoBpZWoSYgS7BWx5lGCOrXdIKk9i6KxkS9yPBzOPv0cKAVeg== Received: from DB9PR06CA0010.eurprd06.prod.outlook.com (2603:10a6:10:1db::15) by AS4PR07MB8507.eurprd07.prod.outlook.com (2603:10a6:20b:4e7::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 10:02:11 +0000 Received: from DB1PEPF0003922D.eurprd03.prod.outlook.com (2603:10a6:10:1db:cafe::9a) by DB9PR06CA0010.outlook.office365.com (2603:10a6:10:1db::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34 via Frontend Transport; Mon, 29 Apr 2024 10:02:10 +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 DB1PEPF0003922D.mail.protection.outlook.com (10.167.8.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Mon, 29 Apr 2024 10:02:10 +0000 Received: from seliicinfr00050.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; Mon, 29 Apr 2024 12:02:07 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id AC9A41C006A; Mon, 29 Apr 2024 12:02:07 +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 v3 4/6] eal: add unit tests for exactly-once bit access functions Date: Mon, 29 Apr 2024 11:51:36 +0200 Message-ID: <20240429095138.106849-5-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240429095138.106849-1-mattias.ronnblom@ericsson.com> References: <20240425085853.97888-2-mattias.ronnblom@ericsson.com> <20240429095138.106849-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: DB1PEPF0003922D:EE_|AS4PR07MB8507:EE_ X-MS-Office365-Filtering-Correlation-Id: 3537a863-e5d2-4e7f-ff6c-08dc68336f8c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|36860700004|1800799015|376005|82310400014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?U25HS0RMUTB4bVhxVWtPbG11eEMyN05BVTN2QUh3L0hhRjNFRFU3SG0zYW8z?= =?utf-8?B?UG95K2lJakFCN1hwcHlubjBieHNEQUpHUkJlVVpyeE56RzczRTlvYnhFZzlK?= =?utf-8?B?aGxTckpQZnBCcitNQTJmd1diNDNOWnl0RElJbGxNK21uWk9HZW94VFR2Mmt2?= =?utf-8?B?eGoxM00vU3RjeWJKNURjcEdDU0o3cnhuT2NOYTZ1MWZIR1BaNjBTU2NDN283?= =?utf-8?B?WjRPTkFacTlDZWN2eGx2dHh5K0NkSUM1dUpHOVZqdi9RQ3Q0TlNneGtTZlFT?= =?utf-8?B?WnRqbkgxOFRzV0d2SEVDVmV2Zk92aXlJZ1BvOVh3bW51dHMxUGtRZ1VjSnBk?= =?utf-8?B?ejlNRVhVNXBKSnFLd2xtTHVvSTJReUFYS0loQzI4WWRRcm1LU1BBdlRSYkFD?= =?utf-8?B?SG8zeTFlT2RvQ1Zva2NHckJ6ck1NUURRWkp3eStYWlNEazRCS2U0Zi9nYm5L?= =?utf-8?B?RWxrcEdTVUc2ZWpEL1Y2M3daWmt6WHlnbGp6eFFVb3JETkN2RDlETFBGL29R?= =?utf-8?B?d3JHWkxWWWNkQm9uUi92VTR0UldTMUxkclFQckw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TFp1djkwNjhhcEtKV2VVNnQyQUZ6bjBv?= =?utf-8?B?MnBnUzRmOWdERm1rcTBMNU50N1o1azdFVk5jSEJTYkx5UHp3VWg3TmE1ckhj?= =?utf-8?B?N0VXUE5CdHFucjlMejRtSEVIemk5TW9lcUJkNjE5QXFBdWtucmZGUXdnSlMr?= =?utf-8?B?eEE2T0tPZVNmNTBydHhldGYrNmVsd01GcWwreE4wRzRTT01TN283UzFwWFlt?= =?utf-8?B?Qmxqd1dteThOeFNFZ0Noci9la1BTTmJmSEZqcmhWejRXODFvYVhvWURwaXdN?= =?utf-8?B?dUVJQlVkVGZZMUFPRmNjYlBZSTNKeHRGUXczRHYrKzNNWjFRNWt1c3RweHRz?= =?utf-8?Q?fFb9jteeIf0mxyUiShW9/Y+34Qjhlkj8aWyrw=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)(36860700004)(1800799015)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 10:02:10.3118 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3537a863-e5d2-4e7f-ff6c-08dc68336f8c 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: DB1PEPF0003922D.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR07MB8507 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_[set|clear|assign|test]() family of functions. Signed-off-by: Mattias Rönnblom --- app/test/test_bitops.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/test/test_bitops.c b/app/test/test_bitops.c index f788b561a0..12c1027e36 100644 --- a/app/test/test_bitops.c +++ b/app/test/test_bitops.c @@ -46,12 +46,20 @@ return TEST_SUCCESS; \ } -GEN_TEST_BIT_ACCESS(test_bit_access_32, rte_bit_set, rte_bit_clear, \ +GEN_TEST_BIT_ACCESS(test_bit_access_32, rte_bit_set, rte_bit_clear, \ rte_bit_assign, rte_bit_test, 32) -GEN_TEST_BIT_ACCESS(test_bit_access_64, rte_bit_set, rte_bit_clear, \ +GEN_TEST_BIT_ACCESS(test_bit_access_64, rte_bit_set, rte_bit_clear, \ rte_bit_assign, rte_bit_test, 64) +GEN_TEST_BIT_ACCESS(test_bit_once_access_32, rte_bit_once_set, \ + rte_bit_once_clear, rte_bit_once_assign, \ + rte_bit_once_test, 32) + +GEN_TEST_BIT_ACCESS(test_bit_once_access_64, rte_bit_once_set, \ + rte_bit_once_clear, rte_bit_once_assign, \ + rte_bit_once_test, 64) + static uint32_t val32; static uint64_t val64; @@ -168,6 +176,8 @@ static struct unit_test_suite test_suite = { .unit_test_cases = { TEST_CASE(test_bit_access_32), TEST_CASE(test_bit_access_64), + TEST_CASE(test_bit_once_access_32), + TEST_CASE(test_bit_once_access_64), TEST_CASE(test_bit_relaxed_set), TEST_CASE(test_bit_relaxed_clear), TEST_CASE(test_bit_relaxed_test_set_clear), -- 2.34.1