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 3592443FAE; Sun, 5 May 2024 10:48:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 968794067C; Sun, 5 May 2024 10:48:07 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2075.outbound.protection.outlook.com [40.107.14.75]) by mails.dpdk.org (Postfix) with ESMTP id 776C9402E7 for ; Sun, 5 May 2024 10:48:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pem+SZYjCHOR/eQsTIjTRY8g1mhGYZnxqN3SGWSjKanvb9aGIrEV+EHrNVZrknn7IyNSyaqZ/t3Ei31e3CDwJUO/gQjkUkl4FhHk2ZoOj7Mk72Bv+a+QLzRcmMbGQxh85AP9Qtbey4vNZp6oYAjqm6exmm2ItCimeL3lGUm1uJgpTl2qglhmmLUpjEJiYD3Phw0JCNrnIqJkTgNmXZvVtvtErGsHcv6KC7yry2e6F076cvyKzuKdlRG5yZ1C9vdNiJUOvbOWDW+BUpay0mHLN3W7aXFR/+rjXrujdgdd83WHxJKtEYkx6UHvl8616/ymw1ijAqPu7ck9J/38Y1HUJA== 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=nqODnsqO2QWoHzjCkedbsu0L3zKGSoiI/fCoeDk0R0gke4Vozu8U+9elowNm/JcidlCFaJdNuceLDnctjAOzaeX4Ow+8odItSb93BbP3YOPfv9J7LBJkbTjWPBM8ftR1mz0lxmJnfNHGDCMzxH1dAXYhyNItcfI27w4tzBa3kaLAJwheNa9iTfIKkATnNewX7yF6u0YSO6Pxr0FGvkgYoWNeBgmb5s7mJ2CPBSGujavoa5DDcpRUT6fdGpiA2WTSh6oYBcr229b/IpsiVbjYqGdobNNGS2LPsb0MUc6SxzvI80sFyTrVeNZG/YtT7YNdG3yqukijKVjTMiVFKdw0OA== 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=k3TYxuHplcgsv6Afjz9wNsHHjhAN2SsPdqhQiHTVZNRX/rv01KrOQbOYx1PBD40EjLAa3IuupO00dmJQgv7AQpJE7yhXJFhf1f9SS3y1df8bXa9Leouvnp97ERuCmaKRTZXYyhV9fdxYpjKIT8iA375d58o4lxQ5ev0Ne8yUAbNi4o9ykNTg8VCvgdwvJ4qvh5oAYB4KPQj14Sq+2tfJmo38Kgx8E3mur4Rl96oIkTilQGnlWJSKVrTvh0O15IvkWXRhXVsbcnwopRpSaZ8g9BW3i0aseJIQalkCoGZLCZhZHD7JkEyJ8WRg0NMJebcpaaEB+lFUhiMQQedAfg/BOA== Received: from AM0PR01CA0167.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::36) by DBBPR07MB7417.eurprd07.prod.outlook.com (2603:10a6:10:1e8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Sun, 5 May 2024 08:47:58 +0000 Received: from AMS0EPF000001AA.eurprd05.prod.outlook.com (2603:10a6:208:aa:cafe::c8) by AM0PR01CA0167.outlook.office365.com (2603:10a6:208:aa::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.40 via Frontend Transport; Sun, 5 May 2024 08:47: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 AMS0EPF000001AA.mail.protection.outlook.com (10.167.16.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Sun, 5 May 2024 08:47:58 +0000 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.61) with Microsoft SMTP Server id 15.2.1544.9; Sun, 5 May 2024 10:47:58 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id 0D52238007A; Sun, 5 May 2024 10:47:58 +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 v7 4/6] eal: add unit tests for exactly-once bit access functions Date: Sun, 5 May 2024 10:37:35 +0200 Message-ID: <20240505083737.118649-5-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240505083737.118649-1-mattias.ronnblom@ericsson.com> References: <20240502055706.112443-2-mattias.ronnblom@ericsson.com> <20240505083737.118649-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: AMS0EPF000001AA:EE_|DBBPR07MB7417:EE_ X-MS-Office365-Filtering-Correlation-Id: 92b89e72-5eff-4479-d809-08dc6ce01089 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|1800799015|376005|36860700004|82310400017; X-Microsoft-Antispam-Message-Info: =?utf-8?B?aTA5MGhKZ3hya1hCc0k5RDg4MjVMU3BnVTU2dVlnVXpUUzNHRkt6YnM5VnFQ?= =?utf-8?B?allXSmZhMWFvSlFxK1p5dTBvNzg4ZEhIWGZxUklVa2xXT0N0V0xCSHZuWUZF?= =?utf-8?B?YkR3K2NZakhDZzZLQ3VvK0NsclJ2aG8vYmdVb3NWR2E2bzBXcGd4Q0VSRWI0?= =?utf-8?B?czZXbDBPZjU4UnBHNmF2dlJTWmp6dmVKMDhKRFlrUFBFKzRXYUpRdjhsWHpQ?= =?utf-8?B?MUk5d24weHA5eDZVWCt0Z2M0QTcwanRvOVc2aTJJTEREcjZvaVJHd0pud0ZE?= =?utf-8?B?SkxVNHI0bmxibmZrT010ODRMRW1ERHlWMGx0R0tJT2R4dXVBUmJJRHNTS0Zi?= =?utf-8?B?TGdGOTBzdXBTYU9kWnd2Q2lrTGNrejJCaVRwVjJzRGttZEkxaFZsNnNFdXRB?= =?utf-8?B?dERRblVRY0JWWDdPZ01ReEtyU3JYa3VEL2tvS1Y1ekIrVko5RFlmQmY0Zzgy?= =?utf-8?B?NGxRTXYrcm5tY0UrN2F1cHlNZFQ1Sm5XdmF6dGgyU2x3VHUyQ0dNUWhobkIv?= =?utf-8?B?d3VydmUyUEQ5OUtHUVBydXNYclhIcmlvQVZkbXpzRmRpSk1BZ2VP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lYydnlQUWZBbmZT?= =?utf-8?B?d0xGNlZZakxoZWt1cnNoZ1JvbzBOVGxOTnloekRWZzN3bk4xeElJcyt5b2tS?= =?utf-8?B?eTJKeDhtdmF1WDk5djdnN2d3SW0xNkV2OXhOeGR5aUJFQ01pVmRUZERQd1Z3?= =?utf-8?B?MHp5cnVQeG0vK2hDQlRKM0U1R1BkMVlaTEZ0RHN1R3JuTEtBejJwdURxSFls?= =?utf-8?B?WWNBdkZibDdvL0JYZm83akkyRVU4OWJROW0wZjIvMW84eHZHQ2NocGMxZ21Z?= =?utf-8?B?cUJ5ZUpENlRZK0dscWpxTTYyRjA2Smg5SXpDKzZQTERmUUt2bHE3Zk8xZ0Qx?= =?utf-8?Q?YU8TPPUdDPjAA34Mz8RLTWS6au3e9K7L6bI9c=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)(376005)(36860700004)(82310400017); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2024 08:47:58.5242 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92b89e72-5eff-4479-d809-08dc6ce01089 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: AMS0EPF000001AA.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR07MB7417 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