Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3441335rdb; Thu, 16 Nov 2023 09:29:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzXgCmWyKmhXq4SlHOWvbksFFIZRSkOPphNwx9Dzq90/TQSmLjP3+NsWBzVykmAZENNpoY X-Received: by 2002:a05:6a00:be1:b0:6c4:e727:cf34 with SMTP id x33-20020a056a000be100b006c4e727cf34mr12193994pfu.30.1700155794532; Thu, 16 Nov 2023 09:29:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700155794; cv=pass; d=google.com; s=arc-20160816; b=NQAzXt+6gzhCI67k/HrLSqeY6rCOM2+qUGGzc5F9USbnqyvmjA7bCIUToL5AgLXKd/ WSPCQKpY16D4qpVmf/vENkqeokbVeI0cIILDLZMeeMKfu2e26MnyuZUn2DXp97dJYR42 30fho7ciuNo/c1/GUyHFH0Dgk3u0YrgsTd74OnRUJrwXtDau+RDwcwvZ1sKrjv/rTCtx OaftiE3f5kIotY8SXzGBLq5ftz8Iz4FzFPv8GLfWudS2H1CzkEQsK5eKS52CUKdKTMFl et/aW9/ETsaBkG1fd9PkZAHeTZ/K9bq9SMaiT989VflTCL/i2bcT5NzC283QjfQ9MdUO lDag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=MkNiCCriFtMS3JXX1SXzkVMHDi9Y0nER+1jS6JjvXxc=; fh=m4DjZ9UmBN3bxKdFhUt60kpp2tW/EW+5Q/UDJkGRQII=; b=v6e1z0q1ObcL8XqLtvZxGhSGT9BNOERtvtqeuhuHvGRZQWruqJ/vo5w4hATxCEOaaK XZ6rCadbM/aN9jSM/Fxac98glgkSS29ZhHmmouJA7LtbbL3RJJ8GyXv6Rof/jX3NgBCR aUJPhhQh6kIYq7B3wuRrXpwpo+s83yO8wnT4gvvNVsXgf6FxuZ1JGLPM41EcQKdbJYDb PmOHdLHLV8SmwxYivoBM4fF8rqmsgvnwGFx4/hkNynByeofDa2pdpITF96fXiYysiOM1 nHiJbQG85BUfN5q8lA3E3R8iDNUBUhLq8rKBxQvMA+Ji/pDRnygcYvHFLRRq2kihmb9a DcSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=PsiWUrQR; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=oV9Lm+P6; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id dw17-20020a056a00369100b006c8d6276334si5351594pfb.140.2023.11.16.09.29.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 09:29:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=PsiWUrQR; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=oV9Lm+P6; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4EB5382372D3; Thu, 16 Nov 2023 09:29:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231387AbjKPR3a (ORCPT + 99 others); Thu, 16 Nov 2023 12:29:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234623AbjKPR33 (ORCPT ); Thu, 16 Nov 2023 12:29:29 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2EF11720 for ; Thu, 16 Nov 2023 09:29:22 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AGHMfGF001883; Thu, 16 Nov 2023 17:29:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=MkNiCCriFtMS3JXX1SXzkVMHDi9Y0nER+1jS6JjvXxc=; b=PsiWUrQRkLthmOzgb90xZdL+z1L+95XLN3eC9wnwNxM0lUmTSlnN87arj+M47d0Nusl2 UGtgZ/Cp/dz3uA35RHRzepyro+f471S4dHYYDklKU/rw0iL7K2LXdOgOtCv+KPBhZtfc eX1TV6sf2/g4lLRwfaRdl7wUbtvpgw/4IkOMpZMimsUcmmOGISPgVdE+I2Y6i47Mkd5j Ia7wxgS/z2+fn3XBabPmZtAbsCL1/zC4YPz5xkD35jxpoLlWhRR1xrER1RWoni4XhVIY fhpb9x74lO8404T3pesz/p0ntJ4X+ozW7CuZvTbgd2YVJ5wT0KFZc4a/KD2PxGVABxz6 PQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ua2qdbh4w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Nov 2023 17:29:14 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3AGGPwSO020034; Thu, 16 Nov 2023 17:29:13 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uaxj5ys5b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Nov 2023 17:29:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c8Rov5g+/+V8VJ8Y7uHAB1Qfi4um421qI5+OWzQRaYeHZYQIAIJJ5Y7ovpZUCBjFeSiBRgV/IgRpfyH455tufHsKg3kPNSmrF2EzRL0zgWpdKiOMXprDo6mTscLKwCaMZLOmr4CTO9qv7sCxAAX3r5e86g4iWK8y6CO3p9SBQj2IQeFwZ9TfAAFXy4GQ38nLicBCqs+DGMQJPKR1XLwiMTI+tgiFLXDyKWTGZJiyQpwo128FMF8RACwlTKabsqi7jaa+AZN9gN64Vz9Bc2ctym7qsDF0M6FIxvNkFC0hvXYxsb+4Ep6BrbnN4VSTptgninqdWp16swc5NsQe+o05ww== 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=MkNiCCriFtMS3JXX1SXzkVMHDi9Y0nER+1jS6JjvXxc=; b=YBCbaEhRBCZwHF40CjQwIWKnBGDPEl/X3Deo4w+t/G2g+MnXLaJEFePqDrbMw946IPd4xQOGdKeae6nIbaddbSRPpnVrkWaubFwUXIGOlyogMSb55t6dFKgtijqC5PG6q6/ViqQioueikKxplCgLu5nu76O8iczYf7TNDkgmU2sMKeQTte4vpEw4jj0paZyu3+nY/1UP/v7pEYQFHlq2Rs3rLGFxHG8Uhfav2Y+51/ItbRmloiSy0ZdPThdGclqba8P+SQNublFmu64NYFBPI00GjVXypXtdBASofRWXNBB6vWjq6ro9iDMsBlKQ87SW8xqZ0IRwq/ny0lskosVYVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MkNiCCriFtMS3JXX1SXzkVMHDi9Y0nER+1jS6JjvXxc=; b=oV9Lm+P6CCZWVG5XvLufqGd4LSydrfkiXOd3U1R293SoZmBcGfGnNtWutDTyPJ89oyC0ISb1Mthk/80i+VU9dFTWAZSQTgP54q9ElVDOo0d9Ja769PGA8Tnl0pKnVlBuvkqUKl1QiM/xFYEk3MykUwO+43AN/+WuB4fMwZ0J+as= Received: from BLAPR10MB4835.namprd10.prod.outlook.com (2603:10b6:208:331::11) by MW4PR10MB6558.namprd10.prod.outlook.com (2603:10b6:303:229::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.17; Thu, 16 Nov 2023 17:29:10 +0000 Received: from BLAPR10MB4835.namprd10.prod.outlook.com ([fe80::5262:1e:e9a9:6c46]) by BLAPR10MB4835.namprd10.prod.outlook.com ([fe80::5262:1e:e9a9:6c46%4]) with mapi id 15.20.7002.021; Thu, 16 Nov 2023 17:29:10 +0000 Message-ID: <72f0e75b-6c91-4c17-beb2-3f198ed05cd0@oracle.com> Date: Thu, 16 Nov 2023 17:28:55 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] iommufd/selftest: Fix dirty_bitmap tests Content-Language: en-US To: Robin Murphy , kevin.tian@intel.com, jgg@ziepe.ca Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <90e083045243ef407dd592bb1deec89cd1f4ddf2.1700153535.git.robin.murphy@arm.com> From: Joao Martins In-Reply-To: <90e083045243ef407dd592bb1deec89cd1f4ddf2.1700153535.git.robin.murphy@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO6P123CA0021.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:313::12) To BLAPR10MB4835.namprd10.prod.outlook.com (2603:10b6:208:331::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLAPR10MB4835:EE_|MW4PR10MB6558:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d341134-163e-4659-9042-08dbe6c98b43 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t71k+08pLorpBkhmQsJCl03Y5TrMFq3gTVK/moIDXj5gDnkFQ2NHl5vKhS6NSa06MP6wnKTJlBjhja0DVFYce1uChgZJcfrsEesOdu9fip3pGGT4WGGVatKi7AQ8KUkVkFS9VnMW4eDEd10n2aajJoyyT+p9f394+ParAW3Ce2NlvN4MxKX/i+VbTG4pytDi5UPUDMv3K9eA2fEebrK2xWv2FcmH8Hxni5gf3mw8Rkxrtyr9BWwy5EnuOD547wNuURIdIjYekgSV58d2c6l/7CtK1pgA2Rlpl8df4RFEcKZ8eHpgB0QaaZfRAHldHgQ58SDM7ckJP2p5BXsbA1InxbjYVzjAGb+b45RM/6XtiaCO7Cp7JaxgOR8i6eyLAP5xyQ5Hr3g6MaW3IihkqfHLf4j3S0RIqa/EnQCFNMwdcAR1ynxD3yH+md4iLxgYqOBTU0Y2tSh9hDcWahvWdpxD8fL0HeyuekudKW1A8VlRJs05B0ni56gCFVRsHycbEoI7qBZHq6gFlMeVycRASHet9S6jAF2bruaUut8/Wz+YrhMRLNB7oPFN+qkBskFj2SO/wcBAmF42Hf/bKMYyPc/TcXCcpgmfr+b/64HkMO1GqD6gfG1YLrnFL1FVSHLdTLBayRzIy+TEAvn4RQbYPDGXkNQ/fVIoskvf1eaCj4i9H9Y= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB4835.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(136003)(366004)(396003)(39860400002)(346002)(230922051799003)(64100799003)(1800799009)(186009)(451199024)(31686004)(66556008)(66476007)(66946007)(36756003)(38100700002)(31696002)(83380400001)(6512007)(26005)(6666004)(86362001)(2616005)(53546011)(2906002)(6506007)(316002)(6486002)(478600001)(41300700001)(4326008)(5660300002)(8936002)(8676002)(14143004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c0hRWHloR01NRjU1SFVORHV6R1RRb0pjMGx2RGRCQ0ZHM2I3TFUrUHpLM2lx?= =?utf-8?B?cWc2VENUeWI3V0hlUjJqNk5RTGtYVG5jRkFHdHhtbnhHbW90aDEzbnlFZXZ4?= =?utf-8?B?WDNodkVkbnpJKzdhTlJCZmlmcjFwTWR2a2JkNUlqOVJQRVc1anpZTXIyU0JJ?= =?utf-8?B?NEo0ekV0WDlCOEQyTTk1VnQ5c0RBRWVr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4OmARZm09uGgA+KD2bbIsejGy57CrPsvbeVvaGGrwxl+uRVf2Ka6CjAfr+KsNtQglEtR85xrsm4mwfWVlSzA6JYsIU8/3vUJ449Gp1 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d341134-163e-4659-9042-08dbe6c98b43 X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB4835.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2023 17:29:10.3411 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: b6BvfmktkKQWbLmUV0mqbKumNH3BpTm4x86+uskDGFVVcwrvv6M3qYfLpS0hynye/OxH7OVX3by2GX8Cj32+9Y0YfHBYbYNwdUiOOkaSo8I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6558 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-16_18,2023-11-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311160137 X-Proofpoint-ORIG-GUID: TrHYNqkk7EnuIrusEUss8GVu2XFSdSd3 X-Proofpoint-GUID: TrHYNqkk7EnuIrusEUss8GVu2XFSdSd3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 09:29:48 -0800 (PST) On 16/11/2023 16:52, Robin Murphy wrote: > The ASSERT_EQ() macro sneakily expands to two statements, so the loop > here needs braces to ensure it captures both and actually terminates the > test upon failure. Ugh > Where these tests are currently failing on my arm64 > machine, this reduces the number of logged lines from a rather > unreasonable ~197,000 down to 10. While we're at it, we can also clean > up the tautologous "count" calculations whose assertions can never fail > unless mathematics and/or the C language become fundamentally broken. > > Fixes: a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") > Signed-off-by: Robin Murphy I was going to say that the second assert is useful, but we are already test the number of bits we set against what the mock domain set after mock_domain_set_dirty(). So the second is redundantly testing the same, and can be removed as you are doing. Thanks for fixing this. I would suggest the subject to: iommufd/selftest: Fix _test_mock_dirty_bitmaps() Because dirty-bitmap tests seems to imply the whole fixture, which covers more than the bitmaps. > --- > tools/testing/selftests/iommu/iommufd_utils.h | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/tools/testing/selftests/iommu/iommufd_utils.h b/tools/testing/selftests/iommu/iommufd_utils.h > index 050e9751321c..ad9202335656 100644 > --- a/tools/testing/selftests/iommu/iommufd_utils.h > +++ b/tools/testing/selftests/iommu/iommufd_utils.h > @@ -293,15 +293,13 @@ static int _test_mock_dirty_bitmaps(int fd, __u32 hwpt_id, size_t length, > __u64 bitmap_size, __u32 flags, > struct __test_metadata *_metadata) > { > - unsigned long i, count, nbits = bitmap_size * BITS_PER_BYTE; > + unsigned long i, nbits = bitmap_size * BITS_PER_BYTE; > unsigned long nr = nbits / 2; > __u64 out_dirty = 0; > > /* Mark all even bits as dirty in the mock domain */ > - for (count = 0, i = 0; i < nbits; count += !(i % 2), i++) > - if (!(i % 2)) > - set_bit(i, (unsigned long *)bitmap); > - ASSERT_EQ(nr, count); > + for (i = 0; i < nbits; i += 2) > + set_bit(i, (unsigned long *)bitmap); > > test_cmd_mock_domain_set_dirty(fd, hwpt_id, length, iova, page_size, > bitmap, &out_dirty); > @@ -311,9 +309,10 @@ static int _test_mock_dirty_bitmaps(int fd, __u32 hwpt_id, size_t length, > memset(bitmap, 0, bitmap_size); > test_cmd_get_dirty_bitmap(fd, hwpt_id, length, iova, page_size, bitmap, > flags); > - for (count = 0, i = 0; i < nbits; count += !(i % 2), i++) > + /* Beware ASSERT_EQ() is two statements -- braces are not redundant! */ > + for (i = 0; i < nbits; i++) { > ASSERT_EQ(!(i % 2), test_bit(i, (unsigned long *)bitmap)); > - ASSERT_EQ(count, out_dirty); > + } > > memset(bitmap, 0, bitmap_size); > test_cmd_get_dirty_bitmap(fd, hwpt_id, length, iova, page_size, bitmap, Reviewed-by: Joao Martins Tested-by: Joao Martins