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 07D5743F04; Thu, 25 Apr 2024 11:10:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA4DA436BF; Thu, 25 Apr 2024 11:10:00 +0200 (CEST) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2060.outbound.protection.outlook.com [40.107.247.60]) by mails.dpdk.org (Postfix) with ESMTP id 19086436BE for ; Thu, 25 Apr 2024 11:10:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mf4CFp7KUxjnv3LUe15drJuofdq1VBE4xQ0ng0EyL3M5k/jJxtRhs2SyqZlkobWloFWxhTi+SnawoTAFNXWHmoZFEJ4eO9ynNrui+pex1Q5Yy+j62Q+qTigjzZrdiBq/NgNPh4fEwLPlnI+cBHoneca8mCfi7ERkbdct1GZCYFAxijIQVRFN5ITsWlfHYqAnjGPAd8PKTsqU2x2vgkJRIQZxnVvQeIi7gkkt3IJ/+MEOsvTZOBe4l/RGWB3qyl5efl/kKtovqwqWdE9DtdLeJpNIxGk2/D3F8uLcY/ZF8wHy3DLAqBrUsffwXgiQVRZ897NhAYpTcFhcwP+22spG7g== 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=ibS9BZRxnWDMghenYIHs9DYqit7rUJRFCJExSP6/tAq9qhx2etSmQJbO46tMNLw8dDiQt0Zzt42TyE2tIOLsBswh0uTFkFAkHE2Td34/XXt6jejeCgn6ElUdpXgkFbbwyGngu9hsmSeNKHU/TPnOITTbqKkAfR0+Oilve195RtEe3M8lbdKh49V8hXMIzitmgBsW7h6jjEnhhQnnPdBPdBic8GIWuTLg/C6ZAEldXI8l+c8HY64yCj69b+dDx1kJ7BbijOlS/tomStGa1hlXdyB/Ry+mIue9ozRZ0fQhF2BT8oLoBm9yScopkjbqTL5eFxSEL8V4iJS0p+2bz6juEw== 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=EY2jZ5KzIPKBmLbBsdA1Mb1DgVqCCq4N0eZyKchQFj2PRbCsgmU+QqusmolVLvNNZ9/ilnuUdWdZJoGtrN4Z6P99FRUCJoz0DvsErNx7aIU/jvR0LzBjZ8CIdqKO4TorHVRaiCNHpqk7wAJa6q7FCCr7khbpALwDLYc5E3chZYYjhWf+z9SE/8o7vufbm18benterL1wkHgBeGNoN4Y3th251HahqgeN/OmXXgN6tBJJQmSy/z1lw6eRXMhBCZrGrSaV5jBQGEF70QwOzQPElcxrfNmEcHgfKnWqzXZx692tDJeugmD/ozoAnGzYOdEztG6aoMDHHmLoVdoYUSXoOA== Received: from DB7PR05CA0052.eurprd05.prod.outlook.com (2603:10a6:10:2e::29) by AM9PR07MB7682.eurprd07.prod.outlook.com (2603:10a6:20b:2d3::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22; Thu, 25 Apr 2024 09:09:59 +0000 Received: from DB1PEPF000509E2.eurprd03.prod.outlook.com (2603:10a6:10:2e:cafe::95) by DB7PR05CA0052.outlook.office365.com (2603:10a6:10:2e::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.25 via Frontend Transport; Thu, 25 Apr 2024 09:09:58 +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 DB1PEPF000509E2.mail.protection.outlook.com (10.167.242.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.19 via Frontend Transport; Thu, 25 Apr 2024 09:09:58 +0000 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.63) with Microsoft SMTP Server id 15.2.1258.12; Thu, 25 Apr 2024 11:09:58 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id 529291C006A; Thu, 25 Apr 2024 11:09:58 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: , Heng Wang , "Stephen Hemminger" , Tyler Retzlaff , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [RFC v2 4/6] eal: add unit tests for exactly-once bit access functions Date: Thu, 25 Apr 2024 10:58:51 +0200 Message-ID: <20240425085853.97888-5-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425085853.97888-1-mattias.ronnblom@ericsson.com> References: <20240302135328.531940-2-mattias.ronnblom@ericsson.com> <20240425085853.97888-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: DB1PEPF000509E2:EE_|AM9PR07MB7682:EE_ X-MS-Office365-Filtering-Correlation-Id: 90b39979-094f-460f-d509-08dc65077b69 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|376005|1800799015|82310400014|36860700004; X-Microsoft-Antispam-Message-Info: =?utf-8?B?S2poQjBBUkhFMVVEejBMZ0JRY1VVdlZORjNYOFZXOFVZN2psejNQWXB4b1Y3?= =?utf-8?B?VzczYWowOFVhZWRneHBQdnNPTDErRzNGamF1SlE3THUvaFZjSmJKZWEyM2JY?= =?utf-8?B?VUU4VVlKdm9LclBBVUYydW5TemtTWSs3U0U3ekY3VTRXaEY4TXNlOWl6UFFW?= =?utf-8?B?d3VTNjRHSUJ5M0ZpRU5pUnN3WUQ3OWlpQ09OWXU5cXVYM0w0ckRMN3J0eGps?= =?utf-8?B?aHVIOW5aRXlYYWpHWFhJWWJTSTM1K1l4YTVmVGZ1RkU3UW8rMEtWOHdSbXhp?= =?utf-8?B?clNpU2Vyb0RXZVIxRmlQZ2t4eDM0TktMeHJjMi93NExRRTAwTHc2UXNURktk?= =?utf-8?B?bGhxVElxUDZuQjNXYStrRUZJVkg3a3hPKzFQeG9QdmpzUnRjc0hDSExyb052?= =?utf-8?B?citySThvZkJWVzFQclFZRUNZTGFHOVJobk9FODZPQitKcjVrRDZMNktzckZT?= =?utf-8?B?YWwybE5jOUlTTnp0RXdZdE9JTXRadm4zWUFKTkNWSWdOSmVMYllaSy9uN3gz?= =?utf-8?B?WlR2TzRZVTNzUnZ4S1dhb0p5Y2d1M2IzcXFSeWFTOE1tK1hMaDB3Y1VuRHVH?= =?utf-8?B?WFZ2VGo0VHNkaVdSem55NktmOXpBWlNGT0x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3dtSk1xSmVKSEhnYnd6NXpSL2NTd1p4OXp6ZTNLV0EvUHJF?= =?utf-8?B?bjNTYzRqV1doaGxzRzcvRFNMbitjaWd0MkkzNzRXd09kMjhvWFBraEVLRlZG?= =?utf-8?B?SmhNd2NENlRRSFYxQjRXL3FXQlBsYUhTMTRIdmtWV2hLbDVkVGxLbUJJdXoz?= =?utf-8?B?ZWFOQVl1N1VKa3l0TDFJNUE3TlJJVGlMRytQb0RpL0g0ZHNLdVhvWkFWYWxE?= =?utf-8?B?NVZkREExK2Z0VExUVHI0NmFock54NnNPdHN6MUlTNmZIenVReGlYd1dIYjY3?= =?utf-8?Q?2S3BHyqLr8n3zyD4aKoFn2MSSlG4LBs6m7uMM=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)(376005)(1800799015)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2024 09:09:58.8540 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 90b39979-094f-460f-d509-08dc65077b69 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: DB1PEPF000509E2.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR07MB7682 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