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 6599978003C for ; Tue, 23 Jan 2024 23:52:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=z/EfYvp1h75JAfGx0e/OCfWqWl+OW6z3wBbbCXlvnjY=; 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=1706053946; v=1; b=o/9QRSBtMWB+mHq/0kEmXA6NsiFAZD7dkf1yRDOMMNfDnbQmxxsG/qHUOdFQmxglRGyPTyko uuE2YErZ8y8luCAvMsUhSiee5vNiTkEEpagaguskfRk4Ge8jk2yk3hBJD3CuEWhHuCgHxW+1lfw 52/jM39amFDyukW2vVkyf26o= X-Received: by 127.0.0.2 with SMTP id LNCQYY7687511xcjb7TzC9Yi; Tue, 23 Jan 2024 15:52:26 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.10327.1706053945782877419 for ; Tue, 23 Jan 2024 15:52:26 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="401347907" X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="401347907" X-Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2024 15:52:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="1720436" X-Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 23 Jan 2024 15:52:25 -0800 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 23 Jan 2024 15:52:24 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 23 Jan 2024 15:52:23 -0800 X-Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 23 Jan 2024 15:52:23 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 23 Jan 2024 15:52:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CMjA+JmHYPXeB/IjLu2uzUEgMZLq46emjp8tbsnkb/u60Hf4nzxDRnXUbOv9HJ60cmaIU8tSFSMcx7aGKGXn86Cle9BHupsjnB5eLBpc3k72EcyMXUe18u2LBYBXqIM7w2ElybOrrBjf89YEJFQbDpnp92vaq3FHbt6+U0YkZV3fICFw6wpX0Czkbygn6wIfbKt53lKpc9lx4JZ0qxO/jXTmwnPbp4L9JLux+UYvi5pUPB0UfSJgrgL2mj9rk1C9lhKx59jqNefFVUPXISrIISZ9NG24y0LOviNdqn3RcPZt0wvO9OvqCoDxZbIgJVkbYfOCuUcfBWHDM1chPqg1XA== 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=kj6ELrM826SLEYbHz7AnpB2tua4uT1HynbsOEc2yK0g=; b=gwZfifXpIdyzW7OF6Zgh+CRnKDrOsZ+sYP5sLSRDC7BlOjTLV9VdoA/Indg3rbu1Hpu6sqFlIh0xPDKYERwWRWy2Ks8hw5zi0BaBfRAPfKpWEOTdTTkHdDnmZ+m/TvWdcl50MgZmRSvweOBlRZUSdN9OY0kvKf47cGF1z1dK14hm9KEB9k/3FZ+I+IY8+tus7F6Sohm4UJ6yFqwIyYfaxfPaEUMD6ID3FnKUhD825lWTvdYXbaMDqZBqVwcOCWLSW/f/CjvBCM3FgLc7GBXLigA8mx95afcOsJllOPHh/Ud9Oa/ieA74ipzXE26EjbPkT0YAHf+OENDGMl3MJPIEZg== 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 PH7PR11MB7051.namprd11.prod.outlook.com (2603:10b6:510:20e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.34; Tue, 23 Jan 2024 23:52:21 +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; Tue, 23 Jan 2024 23:52:21 +0000 From: "Michael D Kinney" To: Jeff Brasen , "devel@edk2.groups.io" CC: "gaoliming@byosoft.com.cn" , "Liu, Zhiguang" , "Kinney, Michael D" 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: AQHaTlHPeGLxueMdoEOsEBED1fWhPLDoCFVwgAABEFA= Date: Tue, 23 Jan 2024 23:52:20 +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_|PH7PR11MB7051:EE_ x-ms-office365-filtering-correlation-id: 93a35118-b1c0-4713-39a9-08dc1c6e56d4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: e6/Ale6IyB7oQbqcpjJBA5pBLnLu4wcOGviQXGrwiK1XvyLSA/jIVlkpCzooyEHQ6y4vtBpP+MTcTDGae0zw8uHyHVCWp/luK3uo/AJcCHAq6fU6aucwv0fx5Qn8eB6voAvFiCmqwkaa48BkLgFNagSYk4Rl4yJPnhTj6yMDtZt9uLWX4prqZCV3sAK9hWssxoR4K8Wyxz2V/GMOUwQGYzzXSAfPpLJ8wGKTc5Y6j7yMI7cmFVO344zo/lAcbzBo/ExxL5LAApEC/KVrGNsHJJzaexZ5vB0nsFtuIQ3gJIvDwiI33L1hf63GGRFGmoAXmnCyNpFmZGbA1GPdnVY4elw8E2yLq75hyoZKq0SDBimNo+OtZyVYxgXRrsxHZzwNH1W2Pmp5COeCfKrG+xLgNeapX+TPT1jLfBc2hu3pa69yGU/ixtV5ikllstT5u0/FogyLHTj1q9N4UfBFKW9LwfgmCg6hELyBc5nTAgPx8VHjS529u7A7+OE2IhO6BvwMb4T7e85BpScgfQTDNWk5XWM+xkYTtAXiZ3rWPwfHO5zd+V0SHra/pIMLpV2pDAvQdECC8R/SSc+y4CmmjFWvubPisHT8BI84LMo1rJHV/ROC56wqqjX4NRZ6djBCAx7tjMyVoNQkUfvCOjYYhAGGVw== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Rt6wPt2IsBdhNgqm4M5+YhJeN0tf+QqO2xU0uMD1mtdiC2Db3f8qUpTELVu9?= =?us-ascii?Q?EUgwZtvzYc9dPa0LOxm8ZfobymRYnl/kBu/QU9QoXvJvDble11wzSc0Bz1S9?= =?us-ascii?Q?OVnVU4sVv6iSkIhaYAB+7ZkI6Q+wLxUvPkfAs5zCW5SY0TkASzGaOUwFpGx/?= =?us-ascii?Q?/MG9FAO4DpExdRkWX/F8KOZ8yuVImozOvo5P8p8QX+oW9Tfo9cMu43CSfc7y?= =?us-ascii?Q?AzKwRBjhtosvdWfS62uyuofvXXEVZq/OlaXiGQUMOAeJ/marm9/hhREWDuj0?= =?us-ascii?Q?eE41Yrl+1li8Ie0bMTE/K/zIlFDahdluBtLKWKkuA6PuZtVn+qtqjGLIISF5?= =?us-ascii?Q?UDnoM9RT/48sK6YNUdUssiUuIWZifmFdeaVRalBO/prZiEwhJ35kRqU5Bv/o?= =?us-ascii?Q?6OaOVARXIrqp0g8h0bATC5v0v1qyjWfkEJM8RBE8uKsxqLMfrBo/Ei3vMrqu?= =?us-ascii?Q?V9B+9Sx+Q46b1yYcQyMKLCrgErVw4VbVZ2igI0WJkckH5KPXsob8Fbi8tD2T?= =?us-ascii?Q?J0GSBvcAzrZoRv3beXVscP8Gbu+sF7TNxKzwDv1iJt/Y1E+bmm4xtjJh18Ht?= =?us-ascii?Q?316Kjnq4XrWowY4iwiQstpioDWT1QML6k/OKoxN6xehUgaA790ohL1quDrYc?= =?us-ascii?Q?akr2lDqd8qhyRRpCzd+R5sWwbgIPihm8hHN2VWU/L32Z0Z/uKFUzO1ZKTy+f?= =?us-ascii?Q?XMj8snLgYFr9yHkfD9WjbfcPeyt8qj251bMufJDeqiDxqvQ8EAHdfrhspml5?= =?us-ascii?Q?ZAsFwiuIL+SRvRmrXK/eBBeYUF0eDkPPiHg1rBvxpA9LGaPasXmXzL9IqUFe?= =?us-ascii?Q?LHTX/Ab9X25mH7E6GkzbzZVrcT3QCsuv06uxCGkSSPv5FeuUxxNH+92qcYgx?= =?us-ascii?Q?EBXA6MsJDShR1ncdxpabJofAg30eGK8bjmW7874kEFnf8N9ERBAtiqK7nr6x?= =?us-ascii?Q?5ToPj7yAIqUhYo8mC2+vXRDZOeyiTmpbybx4kcj9xnoBOQgWb1ERehzLf6E8?= =?us-ascii?Q?Bib9JL6CTG+zrn51MRv4VO9ibV4MbHAuqydAE/pXQz22/Yg3lsfhZvEl4QwE?= =?us-ascii?Q?o8MuCJUy8XiDDiPBJyKBSDSZgBmDB0Z72xtgU7Z1TTUfH7ebXNB1wrB8Xk/b?= =?us-ascii?Q?t8REuFyWCd9z3KmQNBWD/kyQZ7Hnca1SXTFP54CJ5/6907D0k11MTbGIfUpd?= =?us-ascii?Q?UK2BYZsoOzs+p4jB6JsYrr8j3iyNakqMkCmRqK0+kx4aE8Kb+Aw48brzdLTM?= =?us-ascii?Q?sE32GKtYj5tUiws+CAmhATqrD2Sc5tPBiw3eeCW9+xw5blpp2HJT9Kum25/8?= =?us-ascii?Q?YUlIOpVWJWRrRaowBK6MULuIjEJKJWDIgs2EXGLvoaNwF5pWReQBBpTOwmGe?= =?us-ascii?Q?7IEC1rwc2MMxnq9Xpexpfjp1meZSQ4TNheWO3ImQmtlB/evF6NbfFMyXsILm?= =?us-ascii?Q?LWX+N3Gfts53YeVDUao82Gkqx7QHEBdkkOkzFPmZfr3MMbFWYDbyOuzJ0Knx?= =?us-ascii?Q?g+g/KDlmumIBJ3faXjO6f3xXN5msv00U+rN8CK9a7k6lSLGbO47XJB5UyFSa?= =?us-ascii?Q?1RiTiz1zsI6bSaSbuDq8/2V+j7ci8mQULUxV6lqROvNVVw2/2dQaceq8YU2f?= =?us-ascii?Q?VQ=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: 93a35118-b1c0-4713-39a9-08dc1c6e56d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2024 23:52:20.8108 (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: CPH2iVKXNdT3WfO4NZ3eHLvc0IZNVfBLS/Ou7DVWKbCr70tNIy+59cS+x4y80ZgjFD2+yrkqr+DX8UCMlVJhY96zGVAhfWwZIXcw/Iq6mTU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7051 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: DRbpc1mQv39O9COhxhiPsMlmx7686176AA= 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="o/9QRSBt"; 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 Hi Jeff, I just noticed that the DSC file in MdePkg/Test has not been updated to make sure this mock lib always builds. I added as part of PR to run EDK II CI. EDK II CI did fail. =20 https://github.com/tianocore/edk2/pull/5293 https://github.com/tianocore/edk2/pull/5293/checks?check_run_id=3D207950995= 85 https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=3D115123&vie= w=3Dlogs&jobId=3D9701361e-2546-5093-77e5-58c75d95b7ce&j=3D9701361e-2546-509= 3-77e5-58c75d95b7ce&t=3D27131ef8-75e1-57c3-3236-d806181f2f1f Comment below that details the failure. Please fix and send V3 with MdePkg/Test DSC update and the=20 FdtGetName() fix. Thanks, Mike > -----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 >=20 > Reviewed-by: Michael D Kinney >=20 > > -----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) EDK II CI failure building this lib. Mismatch between FdtLib.h and the moc= k declaration Length is INT32, not UINT32. > > + ); > > + 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 (#114244): https://edk2.groups.io/g/devel/message/114244 Mute This Topic: https://groups.io/mt/103921590/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-