From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web12.5407.1635986077394018020 for ; Wed, 03 Nov 2021 17:34:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=LAsTiUeF; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: hao.a.wu@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10157"; a="231469205" X-IronPort-AV: E=Sophos;i="5.87,207,1631602800"; d="scan'208";a="231469205" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2021 17:34:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,207,1631602800"; d="scan'208";a="729834578" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP; 03 Nov 2021 17:34:32 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 3 Nov 2021 17:34:31 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 3 Nov 2021 17:34:31 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 3 Nov 2021 17:34:31 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.170) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 3 Nov 2021 17:34:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aoi6EkXq0lH0eAMOJwO/096estOuxphQQbjh3e3lvEz6fw6trv6629xiFuvZgHI4oIeZhzWEoTxnBm092zRWSygm3tQx6i2QnDYxtn/qhysWT3XVfiOLEpW9MgDj80rrSCKMXEvwM4YSIGvAQjWEb5ZeADHEbZLsoKSujuiIAkabo7X4BWa0/dhDeefSKRhz3KneZczPDGeCBf31hAxRTsI1CmuUdPsr2wuwS9RM2n1CVZY3NJx0PnnhYsTgr6DJrWQ/iEGe4e/6Fx8vxCOJt33Ekioeut02QqoN8DsfTlx8btYy0gYMYnep6SzypFtoeM5VNwvPEnadaIg4mHca7A== 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=lFLQ1fJHGdYxxsGXPWBPJlvJeiTNFVRrnZ9Oa0n6qm0=; b=lXotLTVlQSoNe5jhMdxPCkJa/Ob7EDKXxYlzr0mORH+X9/dnRDGNSRTg3a2InOWpgqA6fZHFvDT7WyM//M6bY2lHad8PhrU2KX24OGpy5QFRbR8SfanyNqSTbMKZB7fESlK0+zyMmEpk02CWt3btBwC6XkfrnOCu21jomP+3bFQ9LeZnFeK0Tz11FpNGWO8OIpsXPaBAzn/HIfiXuuCqdsFGhtzW+VzdeaP+zGpTbngK1kS9efldtzxHjj3E82AkQxCre4wxelrySTk1V8JHbq0O7N9lIneq87pA4TETg6SjSlv9MkirZvQ82zkXrOyzE1+u5PddTnnORv9DGTiweg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lFLQ1fJHGdYxxsGXPWBPJlvJeiTNFVRrnZ9Oa0n6qm0=; b=LAsTiUeF9zP2rIHa9afb2krAhTUTx1/a72qWaSjyGYn4xX21Z8kr7+ovosuFkRgxoGMB3rmRJ//iE5jquttabeYcBgjg1AK8r8h3CLcKRLZ4EX7fk7iI7K/DzwKUdkSugJOhae+9B22F++6SZLKB8SMaWNU19kPB+7WGxJ9FlKA= Received: from DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by DM6PR11MB3882.namprd11.prod.outlook.com (2603:10b6:5:4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.18; Thu, 4 Nov 2021 00:34:24 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::214c:de33:74b3:bd7b]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::214c:de33:74b3:bd7b%6]) with mapi id 15.20.4649.020; Thu, 4 Nov 2021 00:34:24 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Kinney, Michael D" CC: Liming Gao , Bret Barkelew , Philippe Mathieu-Daude Subject: Re: [edk2-devel] [Patch V2 6/7] MdeModulePkg/Variable/RuntimeDxeUnitTest: Fix 32-bit GCC builds Thread-Topic: [edk2-devel] [Patch V2 6/7] MdeModulePkg/Variable/RuntimeDxeUnitTest: Fix 32-bit GCC builds Thread-Index: AQHX0Qajj3dADUusPUSwUWt2asIoV6vyhVDw Date: Thu, 4 Nov 2021 00:34:24 +0000 Message-ID: References: <20211103225954.1680-1-michael.d.kinney@intel.com> <20211103225954.1680-7-michael.d.kinney@intel.com> In-Reply-To: <20211103225954.1680-7-michael.d.kinney@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a0ea59d8-ce8f-40b9-34a7-08d99f2ada26 x-ms-traffictypediagnostic: DM6PR11MB3882: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1751; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Rztz/VE+65Wgt6kdNe3Oce0O7HGHl/TDvw1SRx+aIXA6Iy0Xh+UlXua7VMwK9Is73jvNFjYMmWEfTqdNiU8ocrYPGh8mSq/IujbiX+kY8YQE0JbKBwtNMJVo2gC/fJuHxqvWSKgQZUw0ibZRkYjjvk/8CE8gTV27D0fcp7c4hFzH8eUdCTUjNHeM1iOqG1629YaWeCszhyMtSmEvZ4Nd8RsLM2q837F766ItxMFd7D0pMqR9sSyW3xnN0zQV5z83ti8r18MmJS0rcEcEdaa77SddbYjWHEF4rVqAM77KT//UkaEFSIc2+mjjLnBQLUx808EvTKEmiAFckkLZXHJinRNe21jrXJvaMPieshcHjq6w0DNxoGLZKcxyPDIZCtDc69yxMC2RIYj+dgFGorhnpIinAagij06GY1dL9xPEAjs/Fmk8nG6FljTPvAXU+V+EeUD/h61VV3nL75/9WKEJhlgO3JVdV8rVFZ6cRt/H0JLvrk8lJPd/0ibHrIYUL8MDGQx/jtPkAx4JcZ+GEO/ID+7gOBu0Wz4kMwQCfsoxjhrqHfqezfyB/LdzgXOccqKJ/EqlxCR3lgGYoEH+vizseFgQ9FDXcC7s3z8XV/HwA00B0Z0qUOSdpYOGfpHFUolucSETP0/r1cVXkuIIkmgukaCIwWZiZufwU5vhZ4B1UOsGyqb1PjaPUrSTkYNFDxvmdG/Pr8LeLPiF5LmpZJde5IhVpLm1iedUQAnnNj4jJSGWUR/rMpd/kBCfs3j3d9O6I1b5N6C2A3YfEQaRwcA8JdEEiqF9M//a6fcJGHmMwZwK2DgTE9NtzW5IU2KQlC9xk6sVAgbDRRQbna34NaHIjA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(4326008)(38070700005)(9686003)(186003)(55016002)(82960400001)(5660300002)(66446008)(122000001)(38100700002)(54906003)(316002)(71200400001)(2906002)(6506007)(53546011)(7696005)(64756008)(6636002)(86362001)(26005)(66556008)(33656002)(110136005)(66476007)(52536014)(966005)(8936002)(508600001)(83380400001)(76116006)(66946007)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0IM0dJyDOY/3VJRpsW/LEkits7m33ghaDN6Llo05dGFMSCBBtgoXb+2wIsTR?= =?us-ascii?Q?mVLlDeQB+HPNG4/NkTy18pZJfFCQEQfrT6Pv0UID7NXOwHii2Rvcy34OBVkQ?= =?us-ascii?Q?TlFHwkIOMlMFg8vmmt4QeAdewt10nUHK+B50WShiMzwkGt+XxOr75UluRCYd?= =?us-ascii?Q?3r/P9wR1wRgXy/rgaGrg9GJxrGxvUp5DchXMcIzv4apjjujnFK+6WoFSc47x?= =?us-ascii?Q?M1IREcVdrJQEYQSSKIOn0f4BA/fEav0fDW9OIqX6UpxRqKthnWpw8KUFxblp?= =?us-ascii?Q?QstCDweN0w5brPxuRIjtoECN36MMQZfU1msWmbqb0oMs9OEXYLY3j7vUpLRU?= =?us-ascii?Q?vy7Bx1Dw7vfSVt8aY3VeLZ6koxa7NB+XpNK+TjmJVpXXR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qAeZcc78UpG4sVNMtFMrYsp8Xqy19D7f8xahX?= =?us-ascii?Q?SsWxQHLLTsSra3p43Wkov7JquwstlwlAI2cOIP1GvU/Wzm8urPJ4tYG9RNl2?= =?us-ascii?Q?U+34TNAnlpEg4y3/U2t5YxlIUvqPsonDnAs1BtDwbYWVLNu5cEr6x/C5z5n3?= =?us-ascii?Q?au7vyC+ZlTi3rl4uBuOIGc1cpLvUIu4eH25i2TPedU2kr5u7vZiv1AyUHFkd?= =?us-ascii?Q?AswaMFZW+yzn8WWJaLs7Dys6nxHR66skK7bE7f6mDuJHRijfMh7Whzh904je?= =?us-ascii?Q?c6dB/K4iL4KXXaZ5ZakgffoQtndxtAakAO5BoC9VVv8fVnZ15sGoa6/LF5RX?= =?us-ascii?Q?sMxGqjcaaPVRWdV0HfORYJ8=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0ea59d8-ce8f-40b9-34a7-08d99f2ada26 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2021 00:34:24.6495 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zeOsFnnM5tIByx4l1O3D/A7RSjdGWVr28MjZScoGh5UO/QbKKs+ig7Rpsf5LruAjdlhUEqrBN0GqahqiQikplQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3882 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Michael D > Kinney > Sent: Thursday, November 4, 2021 7:00 AM > To: devel@edk2.groups.io > Cc: Wu, Hao A ; Liming Gao > ; Bret Barkelew ; > Philippe Mathieu-Daude > Subject: [edk2-devel] [Patch V2 6/7] > MdeModulePkg/Variable/RuntimeDxeUnitTest: Fix 32-bit GCC builds >=20 > When using will_return() on a pointer value, it must be cast to UINTN to = be > compatible with 32-bit GCC builds. > This uses the same approach in samples provided in the UnitTestFramworkPk= g > when passing pointer values to UT_ASSERT_EQUAL(). Reviewed-by: Hao A Wu Best Regards, Hao Wu >=20 > Cc: Hao A Wu > Cc: Liming Gao > Cc: Bret Barkelew > Signed-off-by: Michael D Kinney > Reviewed-by: Philippe Mathieu-Daude > --- > .../RuntimeDxeUnitTest/VariableLockRequestToLockUnitTest.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git > a/MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/Variabl > eLockRequestToLockUnitTest.c > b/MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/Variabl > eLockRequestToLockUnitTest.c > index 44d70e639d77..880994fe71fc 100644 > --- > a/MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/Variabl > eLockRequestToLockUnitTest.c > +++ > b/MdeModulePkg/Universal/Variable/RuntimeDxe/RuntimeDxeUnitTest/Vari > +++ ableLockRequestToLockUnitTest.c > @@ -287,7 +287,7 @@ LockingAnUnlockedVariableShouldFail ( > // With a policy, make sure that writes still work, since the variable= doesn't > exist. > will_return( StubGetVariableNull, TEST_POLICY_ATTRIBUTES_NULL ); // > Attributes > will_return( StubGetVariableNull, 0 ); //= Size > - will_return( StubGetVariableNull, NULL ); //= DataPtr > + will_return( StubGetVariableNull, (UINTN)NULL ); //= DataPtr > will_return( StubGetVariableNull, EFI_NOT_FOUND); //= Status >=20 > Status =3D VariableLockRequestToLock (NULL, TEST_VAR_1_NAME, > &mTestGuid1); @@ -342,7 +342,7 @@ > LockingALockedVariableWithMatchingDataShouldSucceed ( > Data =3D 1; > will_return( StubGetVariableNull, TEST_POLICY_ATTRIBUTES_NULL ); // > Attributes > will_return( StubGetVariableNull, sizeof (Data) ); //= Size > - will_return( StubGetVariableNull, &Data ); //= DataPtr > + will_return( StubGetVariableNull, (UINTN)&Data ); //= DataPtr > will_return( StubGetVariableNull, EFI_SUCCESS); //= Status >=20 > Status =3D VariableLockRequestToLock (NULL, TEST_VAR_1_NAME, > &mTestGuid1); @@ -397,7 +397,7 @@ > LockingALockedVariableWithNonMatchingDataShouldFail ( > Data =3D 2; > will_return( StubGetVariableNull, TEST_POLICY_ATTRIBUTES_NULL ); // > Attributes > will_return( StubGetVariableNull, sizeof (Data) ); //= Size > - will_return( StubGetVariableNull, &Data ); //= DataPtr > + will_return( StubGetVariableNull, (UINTN)&Data ); //= DataPtr > will_return( StubGetVariableNull, EFI_SUCCESS); //= Status >=20 > Status =3D VariableLockRequestToLock (NULL, TEST_VAR_1_NAME, > &mTestGuid1); > -- > 2.32.0.windows.1 >=20 >=20 >=20 >=20 >=20