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 BCBA2AC0D57 for ; Wed, 24 Jan 2024 08:50:06 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=/Pjd/DJIXalAeUkPKt2Pi3uwjVS2LMs8yXzuTb627o8=; 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=1706086205; v=1; b=aYurBaGpDssWfu6eSGDhak2KATwWcxk5lk7E8Du7A5ySaVliBDE50QOc9GrWngDBpVn35MS/ YBhdnYF4/dqUPjN8qQX382782f+SX2jiD5WKq/otyZYgDjE586TMtYRv1iRLU+9SOAsYvC73vBe I31+L+z+Cv1IYw4YxSsGDEWQ= X-Received: by 127.0.0.2 with SMTP id MWDdYY7687511xk7O9v8D2v1; Wed, 24 Jan 2024 00:50:05 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web11.18369.1706086204594151274 for ; Wed, 24 Jan 2024 00:50:04 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="15305710" X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="15305710" X-Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2024 00:50:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="1860945" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Jan 2024 00:50:03 -0800 X-Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 24 Jan 2024 00:50:02 -0800 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 24 Jan 2024 00:50:02 -0800 X-Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.40) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 24 Jan 2024 00:50:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PEToHb9ND6kgMGY9sHTrwlV7XIhMtRzjdxwDX033wPNNlwQWXezVgZT6oW+llcUCvd/rA0jR95n/GyCEG7fNJvTZ3TvvC0pt1lqVME10bjSfOg5Kb13K0bOO8iVeHqmfKQGzwAl9C0y/7nheuKpA8e4M1J+tj83ofQiYIDu4cXM9MGhlN+nzLp6wkPsWdX9khHzuVXxut1S/vorMuFdPX4Q9cDmJ10UFrddxGqEg2Py4aAKzK1LFB6i+Rr5yh1qKkYJdjgSrSiYZp72U8PSBGCFh16PV9WRaQ7FWBIDXWi7jxNYRn9x+jae37QQN0yeGLDUd5sWTLkLJ550KxbN0qQ== 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=MI393Mvv31OC587bpQvBi52BHhdspR8hfsjdRPpNd2w=; b=LSVHLolLZuQ+shPeeZNHQKJHdPGBrrhnHDwGZ5i8oAVXyAdLDfguqVQIhD/9upOwoK0BOZGC9c8vLhsNgvxauoMvTxnir4I3Qy9Y+njJfhl3RXU6ScTMCO/PRDfTk5fa1am/R81j1qNmwOaA77xFeLNK439Sf41fix3jAE22D35FyUurBeO5pQleEVdpbY4IqklNYm8yCJ4cQTVHLHsOHRD01s8NdzmPzZTMnmgoymS7RbSUGwPQiz8VV4RMYultuOIIf5AMFCI2MtbFGRv9qxVKfSRsWi3NpQld4+MMxOlyYjBuN9O53CCdydRzB19w3D+0SNuftMGkXPGIPM1AXQ== 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 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by CY8PR11MB7924.namprd11.prod.outlook.com (2603:10b6:930:7a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.34; Wed, 24 Jan 2024 08:50:00 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::7e42:1633:d0a6:9c00]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::7e42:1633:d0a6:9c00%6]) with mapi id 15.20.7202.035; Wed, 24 Jan 2024 08:50:00 +0000 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "jbrasen@nvidia.com" CC: "gaoliming@byosoft.com.cn" , "Liu, Zhiguang" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH v3 1/1] MdePkg: Add FdtLib gmock support Thread-Topic: [edk2-devel] [PATCH v3 1/1] MdePkg: Add FdtLib gmock support Thread-Index: AQHaTnKahEG8l+gwOUiFx1tBZKC1qbDoaXeAgAA+O7A= Date: Wed, 24 Jan 2024 08:50:00 +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: CO1PR11MB4929:EE_|CY8PR11MB7924:EE_ x-ms-office365-filtering-correlation-id: a6b00a1d-124a-4f58-4d09-08dc1cb972cd x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: tdnJXqu27X41Ef5GRG4BbPrD5KokZKuoclSzDrfuwe2dwzJ/7MqQgd1JzJVlHw4UoqZLAijUBw20kpTLNgxMmj5wUFuhITGlzZv5Ju3QpkArNnMwTsEWf12X6zQo/X9MmRDJTEwM9DBmx6hbm5raeSWjVCMx48hu2nlyfPIDZD47Ay5lm0eisUq6X52HEfpNPYypfgKbMP5dbqjWFgzJbCbW5P1E/OXi6ao6GJU4RYEmbox5F0JdIkZ0H28CRtSs8VICmRapCfeWm0MBXpLy+HIozrzkBrp6G4IdAT/oXXuLAlhrrxEVnavQ9R8OQcIBkRTfaqac1v8b56E9useKT5Y7bW4oOlIkDUaALSpFsMAOlPfW71ASx6kDau89RxQXOKdZ5Fmb9HvlamMw+5q+UhRW6GTSX5jAxG3miPro7s+/1Eg7u04C9tYuYLSU5BJTUht5xGP0ljSPp8ksCCbuMXHqkUnyXVzdqBf9zI9QUKFDVKpVkIyNNe6W4ZLwd5GDMLcpf48gSY3E/d3vfE96qO9QikXn15G/xauEEGScYgCNEoT24C+z+YQAhVUrGMcgwuGqWhQSbh7yJ7IuiizNJ113DU6fYEgcpaOPPJn724ZkLXDxsf0B9/BoJZKTPj5v1E4Jj/gcymPQXZDcLQ96Xw== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RPAfJB2exNz9jV3ijtgJEaL/co/HuFzo44Mj7ZimVwbWNLgCySD67GgTMwNP?= =?us-ascii?Q?MO/Mgr2QsLTQUwrDSGgsS11aof3MKwM7bKYTWMcZIQqire18P2cmchjVZ46c?= =?us-ascii?Q?mmEHKI7r8ZNM89EeezDhNRjKas7lZQv9Z4nlJg0d6nz5+WJJON3p9fU1hwDX?= =?us-ascii?Q?j0i1xeKOYGC3go4Ad7+aF1GKVr2IRVDE5trnwtdWMq+tl4jd5nOyHSlCapPr?= =?us-ascii?Q?iH54M4xastDexz5RankaGTDTCxeyAnMqGrR6uXhKuInveUUivKjWnEKb4xpM?= =?us-ascii?Q?gLckaY9uYGHk0wgtwMPfwO7GqJeSYPa0KdC96Jvj9zHRf5nPokbeuzBrpmrd?= =?us-ascii?Q?gin44huNIC14ApNMVmOsT1PyhRlJ7RO64/nYRRs7CkjNF313BD3kz8ov2yRs?= =?us-ascii?Q?01m9x45fm12nILV3FyHsPJkI18ZrVzYy7XGb2/RK/y9mVtagehtAQ2Z6sjaS?= =?us-ascii?Q?dxSFWhUKzkd6mvmnsEKpQjui7pPYEUrfqqUGdnd1WkEKkIqfC8fvKu3KK8fZ?= =?us-ascii?Q?QjpHQHlN9m6OsA7/WGjkFNVj6xv1vRLQFxDf5S3VY9pe4EdIlNWgS1QT46q+?= =?us-ascii?Q?5VTkdmD2PM03sd9z6gjqgA+k3Npvn+BhRYEnjXTJTFtf76u3METOi2/WPw+p?= =?us-ascii?Q?pZi8MLN08BSjFcXIrJcYLTuEi6XJyZMMFrhZXA3KRp8cc/kD8O3tj7YE1k2G?= =?us-ascii?Q?GJ/hk6ey3AisDEJU0CDL43+bBQMtdxtwgk42mYyT9glCBJfjQWiirld9jLl/?= =?us-ascii?Q?kb/Z9YiEd9fIdaMlb6egomc4jYparJ5jbFhAIN36R7lvHhOryQXcNRPIzcbI?= =?us-ascii?Q?z4+wJEd5oL15RMCiC4ICU64PoaZlU+4v1yXkfaDndhp+UJXQenL2ki0FUiAq?= =?us-ascii?Q?ufCiUvKwoVCAEDvlio5amQXi67FNP1Od8g7pZ/wXumINa7KNZUnPP326fKJ1?= =?us-ascii?Q?uJE246dZTCsu1djSzkiVimWTufD4lRlLXMN4qC981wa6Vn76cY0LbzTIn7D0?= =?us-ascii?Q?TIbJu+vuw6fWv6vPudiVuImlzbct6UbdSLoyOjV4t9RAIp4v/+d697RIndCj?= =?us-ascii?Q?fGnDC5WjPQ+1fQ3T5cqbhMxckA4oDtuUzb8TXH/KX8jKmUFN610T5QvhNnZ1?= =?us-ascii?Q?TtzbEU1RLX7ttK1pN1AE7MAuk2CvU/VXfLiMMrnsu77sXykEFPVjDSuEvEyi?= =?us-ascii?Q?G6z+Q8Vhj49lH8RwJBHB7dNlcbv5wpf+2qu1fPI+Y9Qje7X8Qo2yzHd4Y2qt?= =?us-ascii?Q?T29HDDZ6PEr+Hhz+jcgkJx5GEs1gq5CHRisPkYdUotOKD4nfaVONDFcmC5pn?= =?us-ascii?Q?SOqql2TXTsO45/gjYBeNtUgznI+99mSZv/i6n0YmM76gK57DC8FTuqp21qvc?= =?us-ascii?Q?HGKEnuLRQISqxDX9XG/dguJHySyP53cG7mATe2SbP1eZ8ICdKODjygn4nNFp?= =?us-ascii?Q?HA6DMdSN6HqsYQ+kdieMoHHU8WaEyaM0uPZXnmmMxENE8vgDSY3dHSbXN1in?= =?us-ascii?Q?CAs2kiG8R65wNUff6PfPiqYczxviBW+CuMSe5XVK9QzERIuXXXz0WNvDFpzy?= =?us-ascii?Q?rRIC9W2zGULPkdFRJdz89x8Pad3r8+zZWZDKZSwVFSQmZwHZlYbnKn0JjkA0?= =?us-ascii?Q?Ug=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6b00a1d-124a-4f58-4d09-08dc1cb972cd X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2024 08:50:00.0236 (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: pwV7dw6glc30KrnSY79PhGqeqn/LTBWHNb7BRXHGvEPyPwAGhX5BQ9C7ZjnnqfcoXBKYYY3ZpaCGKothrDz86sp3LUU60WDkQteWcvs8PhM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7924 X-OriginatorOrg: intel.com 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: DGcNJ3kbhkehQ8OUSGcvd2nOx7686176AA= 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=aYurBaGp; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=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 Merged: https://github.com/tianocore/edk2/pull/5296 > -----Original Message----- > From: Kinney, Michael D > Sent: Tuesday, January 23, 2024 9:36 PM > To: devel@edk2.groups.io; jbrasen@nvidia.com > Cc: gaoliming@byosoft.com.cn; Liu, Zhiguang ; > Kinney, Michael D > Subject: RE: [edk2-devel] [PATCH v3 1/1] MdePkg: Add FdtLib gmock > support >=20 > Reviewed-by: Michael D Kinney >=20 > I also see you opened a PR to run EDK II CI and it passed. >=20 > I will merge V3 >=20 > Thanks, >=20 > Mike >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Jeff > > Brasen via groups.io > > Sent: Tuesday, January 23, 2024 7:08 PM > > To: devel@edk2.groups.io > > Cc: gaoliming@byosoft.com.cn; Kinney, Michael D > > ; Liu, Zhiguang ; > > Jeff Brasen > > Subject: [edk2-devel] [PATCH v3 1/1] MdePkg: Add FdtLib gmock support > > > > Add Google Mock Library for FdtLib > > > > Signed-off-by: Jeff Brasen > > --- > > MdePkg/Test/MdePkgHostTest.dsc | 1 + > > .../GoogleTest/MockFdtLib/MockFdtLib.inf | 28 +++ > > .../Include/GoogleTest/Library/MockFdtLib.h | 164 > ++++++++++++++++++ > > .../GoogleTest/MockFdtLib/MockFdtLib.cpp | 34 ++++ > > 4 files changed, 227 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/MdePkgHostTest.dsc > > b/MdePkg/Test/MdePkgHostTest.dsc > > index 583f8fc0ddd8..e666636b7c55 100644 > > --- a/MdePkg/Test/MdePkgHostTest.dsc > > +++ b/MdePkg/Test/MdePkgHostTest.dsc > > @@ -45,3 +45,4 @@ [Components] > > > > > MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/Mock > > UefiRuntimeServicesTableLib.inf > > > > > MdePkg/Test/Mock/Library/GoogleTest/MockPeiServicesLib/MockPeiServicesLi > > b.inf > > MdePkg/Test/Mock/Library/GoogleTest/MockHobLib/MockHobLib.inf > > + MdePkg/Test/Mock/Library/GoogleTest/MockFdtLib/MockFdtLib.inf > > 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..5b21b232b7c7 > > --- /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 INT32 *Length) > > + ); > > + 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 > > > > > > > >=20 > > -=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 (#114270): https://edk2.groups.io/g/devel/message/114270 Mute This Topic: https://groups.io/mt/103925152/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-