From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id F1DF6AC09C7 for ; Wed, 24 Jan 2024 03:02:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=1PVqXOmlMuSueuVvEO96HNrdf/8UUzKOOEmVQuyC40Y=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706065364; v=1; b=NrXQ/VBHbVLOAvCpX/RpBiHfrFP7FhGERQzDbOIUxZZI3ujrE7JXitDa0CK2FpHm84IWBtWa 34dbbmeEEa1idY/xKn9GNT6CWwjL6wmKduGDp7ekxhANqgkGP56X7NPyLAUuhoDFV5lOHrFItlH y9PerJZb2IcTII1Oun72I5w8= X-Received: by 127.0.0.2 with SMTP id hvbOYY7687511x9WyfDZcvd7; Tue, 23 Jan 2024 19:02:44 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.66]) by mx.groups.io with SMTP id smtpd.web10.14198.1706065363611011354 for ; Tue, 23 Jan 2024 19:02:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iqt0QkqLFBEzw6EE/un2kyGXTV5HbJlsm/uuOaN7VY/jATiu5xGgwQeFjaeSZqii34/rr1YBU4AtmzPIngcNXtq+gTuttxQu4QwRmEkGFJa5b1sXqu6ru0quS5VrY8MsT+8ltVFHr7PDAlM6MRoJYGLgHuhScLtImU+jb4VtYpGmrL6jQIvXpQMUQNdYtSdeId958xGbk07u5ZlIyJu+jDg0kP5rWuzUktsIbs+0c/rxmjdUxlC5JDTwtCJ/2VPHWvEAR5c7ehAMLmNjioQ5Hmc8p89DKbJ2XXZguHAd0hfY4JEXN1t8c2mqwOhyXcXLxo3aGod+5xsFkxF0GJlK3Q== 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=Rlpvqq+S8cRS2evmJ/My2fhWM/nxAkD8WCnlWhfpBgE=; b=nwC+DCnebyxvxp/NzmhgwgvbtZ1d/0D85PjlCfIRD5c7RyVRPLC+P/m2mfoWk3rgpxpuY5WrVbHDlHrUPbLp/SNOiL7N+XAgQS5G9d7+FSMyogn2Pvkb23FnNpEZGvZs/mJbQIP68BUlgle7H0qIuEToxqecvm9ZWL5aDrpjtWbjA7BypJKT8+0fLLwZppOCaxgBKuRIc8oWFUsCC78XcqJWtJBGB/4lnck0nPX96Qd5TeG8BUhYFascgoUeYde351sUhpcdv3QFXELEGKbq7FujTu1OSc3Hg5hU5NLglxcxqm7yCg1LIx2YsV+ekxZTFJZcBVVG0D/k6ybGs2uJOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none X-Received: from LV2PR12MB5800.namprd12.prod.outlook.com (2603:10b6:408:178::12) by CH0PR12MB5156.namprd12.prod.outlook.com (2603:10b6:610:bb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Wed, 24 Jan 2024 03:02:39 +0000 X-Received: from LV2PR12MB5800.namprd12.prod.outlook.com ([fe80::339c:ad91:dc22:b0ea]) by LV2PR12MB5800.namprd12.prod.outlook.com ([fe80::339c:ad91:dc22:b0ea%4]) with mapi id 15.20.7202.034; Wed, 24 Jan 2024 03:02:39 +0000 From: "Jeff Brasen via groups.io" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "gaoliming@byosoft.com.cn" , "Liu, Zhiguang" Subject: Re: [edk2-devel] [PATCH v2 1/1] MdePkg: Add FdtLib gmock support Thread-Topic: [PATCH v2 1/1] MdePkg: Add FdtLib gmock support Thread-Index: AQHaTlHHBoPRkqnl8EiZPcE979MPrbDoCHeAgAAJTQCAADUUMA== Date: Wed, 24 Jan 2024 03:02:39 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LV2PR12MB5800:EE_|CH0PR12MB5156:EE_ x-ms-office365-filtering-correlation-id: c4ac206b-2002-407f-10f3-08dc1c88eced x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: IzIBJaf0xSkicR1ltnTu58Ncn3hkexRce6JrBbrkhmUIw4W3PfQbBihUzCwXJRWWyZ74yXYRaedNbOPKlYc0H85Rvgrbg1m66QsVXrANPrAfjxR/IzrPbeBvhqztT4YJDoXZ4yzk6JIhsVxdJOiCO9J9wHio34ldEKJOOM4TxXFZISWiYmg1zzVPJf/F9vCuD1ueVyooSLSHVi1hL6CJ+Yxgfvl9Rj/NYAEVl8M0EG07gpqVIhYB5iI/0teBaMm8mTAkdEqIWcfeFDrGXPs+fYM6PNpOSMnkPGdE4M0SlZrkdpECXVQSGzflBeElMd5nEAMUgfnaFCY18mYFxl1bZB5BpF2D26Z447OeV7T5pUXU1KsSMJwlfrTAC4s4O20QEk/n+nBKXcg3Bh5zi6hlCGADa463yq1/PZYW17ybHuzHlpwSQmVpL5BnNvYePrB0Um7oORI/aD2sZvucWOKh6ut3ZWE7Jc/mXv2IpBE1Di59CoWCqhMqDHkOZAwfQC7fxjVl/cQSgi8CYbMKKTKqHG4rWt0O48M1ktlceHmMK5L64i/hpQvSJVIzMqj7LhUMeVG8ccnTrtI1lhSRJSOdF24GI1g5yEwimL25JrKWwgTatcHWqetIOP+n+F9upJn2j7/lWLpZcVp6ovT+ad2GHrIW1Lkp28E1HduY8q9GYX/2MRNn7DwpTaFRO8oB5X4T x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hnWMhxCVUOy2zFRVp8MfdNOEVmflZsV/mEqmz/vL/brcAmI3x9xI3d/Fodrs?= =?us-ascii?Q?xkfUzlXMLlMHRUL30SIzW+zlPTMSSErPJp2FjJNMlzt/eMIaW7B5kwfAzSSe?= =?us-ascii?Q?cY0UPu/FIy2wGrsaxWGgrIIheCuleZlB47NaUEbDF+WL+I3tHyUXWDGSpLqr?= =?us-ascii?Q?eiRKnOqmOj7G7lGVBzvP6BxExzMxsp7nulaKhy+7nAgFWzi1LFqTSUXFQHch?= =?us-ascii?Q?qTDTrKwsl6zmBJQ7KcC/1RFL39jm4pUJLay/BJgNB82QsvLakAhP+EJkJ+C6?= =?us-ascii?Q?0hiAlM2qT4Mt31PS6MVzpHasU0NSciHWgTLKp7kcblioEDACy35GWk+Ltg8k?= =?us-ascii?Q?K0kSiWghhR0bcg/uAoEE2hXt18zVzn+T8IwENSKCzVcyvQkp0N3GXMCQmprh?= =?us-ascii?Q?9BA/R63c1xp8n2Vf+duaoP+ZX2+YCT+im193qEEh2aAg2nrJTrmyl0+Xr1J/?= =?us-ascii?Q?ZarwCn2u94Qmr3HcwmRHDLOGgU36HFovRE3viStx2L8qs47UIROVS+qNrCBF?= =?us-ascii?Q?tblTC0AVqsXn0kjfeWkgk4b4DuZQnUkL9cZWonTYGdjxAaaZ8ZUamkgmfpXw?= =?us-ascii?Q?iOdOTy7sgleR+T7nOIzWGAi5YdM41gjE97MvfYw0DVq5y4ktcKuE0EvUtYUG?= =?us-ascii?Q?C40w+O95yklImPuDEM8jx5UME1OZ7+rJHW0qD4IBxJ2EqSbijTo++6oRVCi2?= =?us-ascii?Q?3P2JJGSgQpypp3Z333zEHbgx1NYdQjH3XdqLfUdK/PbENuS7FPC5s2vb3T96?= =?us-ascii?Q?qR6Hz1zOXEaBff61T+oGTULzhf5INFykrH0c5qUp5tYczDSQ7PMOjuzPAYNV?= =?us-ascii?Q?ZTUqzG3O1xk7dvtIurXPvEoyjXENxT5ihudckVXUf2G7WjMGszUVaYZR7OdZ?= =?us-ascii?Q?nthxcNp+aJ58Ra42oEhX7IpCPbiOwlqBd62lu69T3M33v69fYnKlGf3CnrpR?= =?us-ascii?Q?d8tj7JzQk77Oi3zo636uGezu5LaEGHNZgmyujVyXS1/z4JwIKLaXS10zObjK?= =?us-ascii?Q?uRStOBZOpNi6Zhyz2jaVd/T1fHmtWrTAjTsxuNtFm1/n/9RyGB4uPpzuTrY6?= =?us-ascii?Q?o81+dPBni6sbY5HMIa+YSKT3VMdZiW0jhn/qrRzA5aVBs54k2Vo1J0JzEVrY?= =?us-ascii?Q?zHltdCmO+6OUL0Swt6vh+p1tdDo6BvDVrEWCZBN6QbsCr2qG9Tfq0IFfLOlw?= =?us-ascii?Q?58x9ORLxJRWFk+K/A15nPCdnw3dj2IeHyj17ICRlNIouM5SFpBJMbftgOdVf?= =?us-ascii?Q?rh6oSWqEa+QJRkPSAk0jAm8y9XBc1M6lVeK90DSO+KGAQl6n0Via58UOeOPI?= =?us-ascii?Q?BLjWkJplYsRHnj4/FxT5lRwLA0hGxWw5z32UJkp7k4s0T8cyLbcpoIqIGkuV?= =?us-ascii?Q?NA2riEdn1OL8rRvjLQMPB3W82OktCDp8ZeBmpkCcdVhSfWEnf6Q35RYo+2un?= =?us-ascii?Q?UUSmwpQnGjLsLlB0daaAUeMgSkN16a7gQxZoFrGls8yvMitWv4nDhQSUAJ0z?= =?us-ascii?Q?Wi/kC3XQxLU5SwgiUs/P3uWBrR+fxm1esN2Ezb52oRIguPLTiaAfNwsIWnHF?= =?us-ascii?Q?Vo52165UaQt1JkF/vVLzAUMXdJYik/S6dq6DtV+/?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5800.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4ac206b-2002-407f-10f3-08dc1c88eced X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2024 03:02:39.5455 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fggyCmhmxN57+2j3IBbCp6xdM37MFwW32pPvbE5DIW7XUowkFw4uixpVXZzn6cOFkxm045y+Qp9hB24ZJ6UKDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5156 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jbrasen@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: bjPJLztgqhE4qVGprneHk4eux7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="NrXQ/VBH"; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Oops not sure how that happened will fix and push a v3. -Jeff > -----Original Message----- > From: Kinney, Michael D > Sent: Tuesday, January 23, 2024 4:52 PM > To: Jeff Brasen ; devel@edk2.groups.io > Cc: gaoliming@byosoft.com.cn; Liu, Zhiguang ; > Kinney, Michael D > Subject: RE: [PATCH v2 1/1] MdePkg: Add FdtLib gmock support >=20 > External email: Use caution opening links or attachments >=20 >=20 > Hi Jeff, >=20 > I just noticed that the DSC file in MdePkg/Test has not been updated to m= ake > sure this mock lib always builds. I added as part of PR to run EDK II CI= . >=20 > EDK II CI did fail. >=20 > https://github.com/tianocore/edk2/pull/5293 > https://github.com/tianocore/edk2/pull/5293/checks?check_run_id=3D207950 > 99585 > https://dev.azure.com/tianocore/edk2- > ci/_build/results?buildId=3D115123&view=3Dlogs&jobId=3D9701361e-2546-5093= - > 77e5-58c75d95b7ce&j=3D9701361e-2546-5093-77e5- > 58c75d95b7ce&t=3D27131ef8-75e1-57c3-3236-d806181f2f1f >=20 > Comment below that details the failure. >=20 > Please fix and send V3 with MdePkg/Test DSC update and the > FdtGetName() fix. >=20 > Thanks, >=20 > Mike >=20 > > -----Original Message----- > > From: Kinney, Michael D > > Sent: Tuesday, January 23, 2024 3:19 PM > > To: Jeff Brasen ; devel@edk2.groups.io > > Cc: gaoliming@byosoft.com.cn; Liu, Zhiguang ; > > Kinney, Michael D > > Subject: RE: [PATCH v2 1/1] MdePkg: Add FdtLib gmock support > > > > Reviewed-by: Michael D Kinney > > > > > -----Original Message----- > > > From: Jeff Brasen > > > Sent: Tuesday, January 23, 2024 3:13 PM > > > To: devel@edk2.groups.io > > > Cc: gaoliming@byosoft.com.cn; Kinney, Michael D > > > ; Liu, Zhiguang > > > ; Jeff Brasen > > > Subject: [PATCH v2 1/1] MdePkg: Add FdtLib gmock support > > > > > > Add Google Mock Library for FdtLib > > > > > > Signed-off-by: Jeff Brasen > > > --- > > > .../GoogleTest/MockFdtLib/MockFdtLib.inf | 28 +++ > > > .../Include/GoogleTest/Library/MockFdtLib.h | 164 > > ++++++++++++++++++ > > > .../GoogleTest/MockFdtLib/MockFdtLib.cpp | 34 ++++ > > > 3 files changed, 226 insertions(+) > > > create mode 100644 > > > MdePkg/Test/Mock/Library/GoogleTest/MockFdtLib/MockFdtLib.inf > > > create mode 100644 > > > MdePkg/Test/Mock/Include/GoogleTest/Library/MockFdtLib.h > > > create mode 100644 > > > MdePkg/Test/Mock/Library/GoogleTest/MockFdtLib/MockFdtLib.cpp > > > > > > diff --git > > > a/MdePkg/Test/Mock/Library/GoogleTest/MockFdtLib/MockFdtLib.inf > > > b/MdePkg/Test/Mock/Library/GoogleTest/MockFdtLib/MockFdtLib.inf > > > new file mode 100644 > > > index 000000000000..b227bcbae963 > > > --- /dev/null > > > +++ > b/MdePkg/Test/Mock/Library/GoogleTest/MockFdtLib/MockFdtLib.inf > > > @@ -0,0 +1,28 @@ > > > +## @file > > > +# Google Test mocks for FdtLib > > > +# > > > +# Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights > > > reserved. > > > +# Copyright (c) 2023, Intel Corporation. All rights reserved. > > > +# SPDX-License-Identifier: BSD-2-Clause-Patent ## > > > + > > > +[Defines] > > > + INF_VERSION =3D 0x00010005 > > > + BASE_NAME =3D MockFdtLib > > > + FILE_GUID =3D 0f5471bc-fc2c-4cf4-b9f7- > > c1396d32831c > > > + MODULE_TYPE =3D HOST_APPLICATION > > > + VERSION_STRING =3D 1.0 > > > + LIBRARY_CLASS =3D FdtLib > > > + > > > +[Sources] > > > + MockFdtLib.cpp > > > + > > > +[Packages] > > > + MdePkg/MdePkg.dec > > > + UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec > > > + > > > +[LibraryClasses] > > > + GoogleTestLib > > > + > > > +[BuildOptions] > > > + MSFT:*_*_*_CC_FLAGS =3D /EHsc /bigobj > > > diff --git > > > a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockFdtLib.h > > > b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockFdtLib.h > > > new file mode 100644 > > > index 000000000000..73da571910df > > > --- /dev/null > > > +++ b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockFdtLib.h > > > @@ -0,0 +1,164 @@ > > > +/** @file > > > + Google Test mocks for FdtLib > > > + > > > + Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights > > > reserved. > > > + Copyright (c) 2023, Intel Corporation. All rights reserved. > > > + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > > > + > > > +#ifndef MOCK_FDT_LIB_H_ > > > +#define MOCK_FDT_LIB_H_ > > > + > > > +#include > > > +#include extern "C" { > > > + #include > > > + #include > > > +} > > > + > > > +struct MockFdtLib { > > > + MOCK_INTERFACE_DECLARATION (MockFdtLib); > > > + > > > + MOCK_FUNCTION_DECLARATION ( > > > + UINT16, > > > + Fdt16ToCpu, > > > + (IN UINT16 Value) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + UINT16, > > > + CpuToFdt16, > > > + (IN UINT16 Value) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + UINT32, > > > + Fdt32ToCpu, > > > + (IN UINT32 Value) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + UINT32, > > > + CpuToFdt32, > > > + (IN UINT32 Value) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + UINT64, > > > + Fdt64ToCpu, > > > + (IN UINT64 Value) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + UINT64, > > > + CpuToFdt64, > > > + (IN UINT64 Value) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtCheckHeader, > > > + (IN CONST VOID *Fdt) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtCreateEmptyTree, > > > + (IN VOID *Buffer, > > > + IN UINT32 BufferSize) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtNextNode, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 Offset, > > > + IN INT32 *Depth) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtFirstSubnode, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 Offset) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtNextSubnode, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 Offset) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtSubnodeOffsetNameLen, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 ParentOffset, > > > + IN CONST CHAR8 *Name, > > > + IN INT32 NameLength) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtNodeOffsetByPropValue, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 StartOffset, > > > + IN CONST CHAR8 *PropertyName, > > > + IN CONST VOID *PropertyValue, > > > + IN INT32 PropertyLength) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + CONST FDT_PROPERTY *, > > > + FdtGetProperty, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 NodeOffset, > > > + IN CONST CHAR8 *Name, > > > + IN INT32 *Length) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtFirstPropertyOffset, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 NodeOffset) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtNextPropertyOffset, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 NodeOffset) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + CONST FDT_PROPERTY *, > > > + FdtGetPropertyByOffset, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 Offset, > > > + IN INT32 *Length) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + CONST CHAR8 *, > > > + FdtGetString, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 StrOffset, > > > + IN INT32 *Length OPTIONAL) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtAddSubnode, > > > + (IN VOID *Fdt, > > > + IN INT32 ParentOffset, > > > + IN CONST CHAR8 *Name) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtSetProp, > > > + (IN VOID *Fdt, > > > + IN INT32 NodeOffset, > > > + IN CONST CHAR8 *Name, > > > + IN CONST VOID *Value, > > > + IN UINT32 Length) > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + CONST CHAR8 *, > > > + FdtGetName, > > > + (IN VOID *Fdt, > > > + IN INT32 NodeOffset, > > > + IN UINT32 *Length) >=20 > EDK II CI failure building this lib. Mismatch between FdtLib.h and the m= ock > declaration >=20 > Length is INT32, not UINT32. >=20 > > > + ); > > > + MOCK_FUNCTION_DECLARATION ( > > > + INT32, > > > + FdtNodeDepth, > > > + (IN CONST VOID *Fdt, > > > + IN INT32 NodeOffset) > > > + ); > > > +}; > > > + > > > +#endif > > > diff --git > > > a/MdePkg/Test/Mock/Library/GoogleTest/MockFdtLib/MockFdtLib.cpp > > > b/MdePkg/Test/Mock/Library/GoogleTest/MockFdtLib/MockFdtLib.cpp > > > new file mode 100644 > > > index 000000000000..a955780d23fe > > > --- /dev/null > > > +++ > b/MdePkg/Test/Mock/Library/GoogleTest/MockFdtLib/MockFdtLib.cpp > > > @@ -0,0 +1,34 @@ > > > +/** @file > > > + Google Test mocks for FdtLib > > > + > > > + Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights > > > reserved. > > > + Copyright (c) 2023, Intel Corporation. All rights reserved. > > > + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > > > + > > > +#include > > > + > > > +MOCK_INTERFACE_DEFINITION (MockFdtLib); > > > + > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, Fdt16ToCpu, 1, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, CpuToFdt16, 1, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, Fdt32ToCpu, 1, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, CpuToFdt32, 1, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, Fdt64ToCpu, 1, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, CpuToFdt64, 1, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtCheckHeader, 1, > EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtCreateEmptyTree, 2, > > > +EFIAPI); MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtNextNode, 3, > > > +EFIAPI); MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtFirstSubnode, > 2, > > > +EFIAPI); MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtNextSubnode, > 2, > > > +EFIAPI); MOCK_FUNCTION_DEFINITION (MockFdtLib, > > > +FdtSubnodeOffsetNameLen, 4, > > > EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, > FdtNodeOffsetByPropValue, 5, > > > EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtGetProperty, 4, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtFirstPropertyOffset, 2, > > > EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtNextPropertyOffset, 2, > > > EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtGetPropertyByOffset, 3, > > > EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtGetString, 3, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtAddSubnode, 3, > EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtSetProp, 5, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtGetName, 3, EFIAPI); > > > +MOCK_FUNCTION_DEFINITION (MockFdtLib, FdtNodeDepth, 2, EFIAPI); > > > -- > > > 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114248): https://edk2.groups.io/g/devel/message/114248 Mute This Topic: https://groups.io/mt/103921590/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-