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 CC4ED43F54; Tue, 30 Apr 2024 14:18:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9737402E3; Tue, 30 Apr 2024 14:18:38 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2061.outbound.protection.outlook.com [40.107.21.61]) by mails.dpdk.org (Postfix) with ESMTP id C3C37402BA for ; Tue, 30 Apr 2024 14:18:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ht291gZjHtzMiv5oSnWMZH+EKUKUVZx3TRgEJ5WcEJu0+EqJzfkPQr1TZYs5uG6/GoZvB20FDyniZLRM+wXbr/QnAtdUfKMztX4iA+nTmkEllh9rGq3sfuonZkpacgmb7aNW3BGVvZsyuBOyoxll0FKykmf8uJRLzenwSleshF1wcbrGMgE2d06csTTWe+0ERVc+K9gi11EtkprO2rDNVRCU04TihRYyQCqW+pegL8F0wifOw6LdaxJJQugHLv6uhRPQuabGXu1oHmHcoQ4O3IKGt2kB7ZQtl2tMBpgHrYUTFFg8WDXp+2WWF6fuWqefM5zEGzrT3GTVfKgMjiC8vA== 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=PtZZgIzCOyZPsSEt4EVXXsaa1DOr95HFYwjYlrTBYoM=; b=j/F+4MYnPGGOUYBfZT+Juw57MR06HATgGOVVz8EcMRZVBYq8u6Q/kFfDji4rUOh2hMlXrUO/3ZngWYYUxIALsMi8IgvCjbTMMaSOa3n38CLHavDE5NrnM+4oIxV9mXuSW9eBHsWerGc0tYvLz8nhBM6p9sckn5Yguvuz7TcvhUXgRcCjEeGB9eutLABKCvjJmHrv7mAW9QU9i1A/7sLUjSbjXhw+SUiSuJvj1ixyslnON/fRGNpCb8NbkoUHVvAvCH/xcJTdyY2MP2yyW6RYY8uEgpzFcmsonPI7aCcvYpke4lHqnZRfYw7MsgB6MlBy+0cxFyzcvAksv4A8WgGl1w== 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=PtZZgIzCOyZPsSEt4EVXXsaa1DOr95HFYwjYlrTBYoM=; b=YsMQgjSlleTSqkoUPsSTOzAGwKdmzssGJauuIFarp3GnGXv35haG/vg9DO33ZfWBTuwAy17GPKydphC1hfPhqsHrSqySd5ziQk3f19Uv82kbBXUT13NnQfW7f9BtGk2p2punuEscUhHOJsBRpmzBRIvN7vCfq6ipxDoZCwE53ez48V0oVHRl6d4IUZ3y7iT0//tLTLvgPExcmcCl4Ms9DqCkGnsEJ6AWIsiIc1+Bd6MIIOMfUoB/XlYH9NrBnPxeswFa1G0nFTULgPbA37f7v9Shl9xc6zq7iLTYyzpQuOARdAvGyJcnvLv12XmIj+yU54knZOP5IHcZh26ZBqbjnA== Received: from DB7PR05CA0071.eurprd05.prod.outlook.com (2603:10a6:10:2e::48) by DU2PR07MB8173.eurprd07.prod.outlook.com (2603:10a6:10:272::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.36; Tue, 30 Apr 2024 12:18:33 +0000 Received: from DU2PEPF00028D08.eurprd03.prod.outlook.com (2603:10a6:10:2e:cafe::ac) by DB7PR05CA0071.outlook.office365.com (2603:10a6:10:2e::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.36 via Frontend Transport; Tue, 30 Apr 2024 12:18:33 +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 DU2PEPF00028D08.mail.protection.outlook.com (10.167.242.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Tue, 30 Apr 2024 12:18:33 +0000 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.60) with Microsoft SMTP Server id 15.2.1544.9; Tue, 30 Apr 2024 14:18:32 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id 9C432380061; Tue, 30 Apr 2024 14:18:32 +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 v5 4/6] eal: add unit tests for exactly-once bit access functions Date: Tue, 30 Apr 2024 14:08:08 +0200 Message-ID: <20240430120810.108928-5-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240430120810.108928-1-mattias.ronnblom@ericsson.com> References: <20240430095523.108688-2-mattias.ronnblom@ericsson.com> <20240430120810.108928-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: DU2PEPF00028D08:EE_|DU2PR07MB8173:EE_ X-MS-Office365-Filtering-Correlation-Id: d7804440-d62d-4a68-76d2-08dc690fa7bc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|1800799015|82310400014|36860700004|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?VEJkRS9Za2hsdGxJOGtxekw1ODFiMUJLV3BWZjlCazQyVlZkalNNcUhWOHUr?= =?utf-8?B?bXErSklRS2RSUEl2ZU14YzJPd0hqT3B1aDF5UEl2dHliNVlHM0JDV2hhZ1J3?= =?utf-8?B?em9xQ0E2bkpwcURPZTlpNExycHBUS0xxNG83MWtzSC9tSXZHOWdMVy9WRzAx?= =?utf-8?B?UU9MN1VhNTl2R2dLalMzTmpmV0hoa096REc5Z0pKd1V4L2ttUGJWU0JTNjM0?= =?utf-8?B?WGxXUXFOQldkOGxQS0IyMXpaTHhhdVRNZCthZEZhYnVTSi9XNTlORmE4ck1k?= =?utf-8?B?YmlhM2U5U1dTbmZveUtVU2hUL2QvZUh2QlJCL21nQlBhUGlnTnZ2THhjbHV4?= =?utf-8?B?ajJQMjFBZFhYbitmSU5reGFVZjVRZmN3SzlFeFkzQUYwS1IwdjltMkovaWQy?= =?utf-8?B?WDFhRXV5bjVJUmxVVU5vNE9kYlZrYnlMbmFNQkh3b3Z6cUpsaXBzWUZrMmhs?= =?utf-8?B?L3BqN08vK1ZnYkw4V3JGbThMOHpjQ1RTVUlBU2ZhNHZRT0xoSy9wdm9ZRDk3?= =?utf-8?B?cmVqVjI2UFJscUNDRTVHZ3diZkRXRmdrTnhsT0xQNkZoN2w1MURLSDg4dFJY?= =?ut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f-8?B?eDhtRnh6aTNndzBoeEhaeXlpVERrZlkzVnNXL3dib1NTQnZGR3ArZ1RocnZ5?= =?utf-8?B?bDh1Z0xreStNeVVJbWhoRjU5cUZsdnNVMFB2L0E3RDVPM2kvOW5nYVBHQi9Q?= =?utf-8?B?YXc3T2taejBsOGplTGZ2M21iSkN2Sm5ib3pwYnUwcGZyMFVRTytpd1E3Sml5?= =?utf-8?B?SWMvRWE4TThyQXZJRmVCSHhwMzBSOFhCQzk0Unc1N1UyTlRxQzR2azVEMWYy?= =?utf-8?B?VmJUQ1FMYlg5eVhjcUxHZ2tsKzkzWWdEU21PNWVYeWtZS1V6TkR0QUJXSTJG?= =?utf-8?Q?pj2yl9z7QghyzAh861SLJhjFSUwk5eLLEj56s=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)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2024 12:18:33.8558 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7804440-d62d-4a68-76d2-08dc690fa7bc 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: DU2PEPF00028D08.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR07MB8173 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. 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 111f9b328e..615ec6e563 100644 --- a/app/test/test_bitops.c +++ b/app/test/test_bitops.c @@ -56,6 +56,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; @@ -172,6 +180,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