From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.546.1687897037057748343 for ; Tue, 27 Jun 2023 13:17:17 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=U5g/i2lA; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: michael.d.kinney@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687897037; x=1719433037; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=2OBE4yqd/5ycZOQtqaErnPbSqHQDkmx0gmpEoV8+eyw=; b=U5g/i2lAI34K1RhB/emtvwCT9EU8RGKILH+QE8YvKfmuayglrCUYBavk KTKtxt+zpO+ALWOCxv3kO9twCHCGjmbuDy0uQC0piqxVOFYDUoIOCAkZe U/5eXdIKz+PEs5C5Wzc7vbWkJcZfN5mqVtURYwvXEJ/bu2qp2QSUY9Ncf tuJBsXeLGN5IcCHW0o/Si9zOl8bkLM0tkI5kBPQ06BBB+rR3FcJVt8odX ydHVvyq09lfoEco/FGX3oNMS5nrOgoS7fG/UVPYEPd7ULJixocWlJy76n W5ElKW2jrSnA6eSDxiUKzdbcExtWYtIqgcbESlyaRIBx55Pwy5I7W6T1v A==; X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="361714612" X-IronPort-AV: E=Sophos;i="6.01,163,1684825200"; d="scan'208";a="361714612" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2023 13:17:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="710778860" X-IronPort-AV: E=Sophos;i="6.01,163,1684825200"; d="scan'208";a="710778860" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga007.jf.intel.com with ESMTP; 27 Jun 2023 13:17:04 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.2507.27; Tue, 27 Jun 2023 13:17:04 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Tue, 27 Jun 2023 13:17:04 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.171) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Tue, 27 Jun 2023 13:17:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S9pqIXe3oAtda4yvj6HapkbO8x2y9SJblVWCp5uITfmvJJ7VEyMnYXPv/r2YW7EgmhTFMbhyRqYyU/5Zhvc4HmOPaLWHnZzADEE6SptqnjYZKYlp20S/cgrimx4x9I6xJaxbMSQcTnA/RXfIsXl/5+A6ftY9+/PvPiNSe90A84qfSQgPExArQMGDhuqng1z892Dp/83Nx6oPvS6qpeBb6ESqDpG1ULW3RicdWH++pMA5VDayULAtqhKDVaXL+Wz8dYnhbA97kIdxUFT7Ir/+DzpqDYAryn6qFLNlqOWeT+Or+cU/+vNLaZPZJIjMWJztj3odPcxcLCftMfutAEnScA== 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=rXy9OAZzm6Mk/H2qBTtdW5IcEZIKbxuaKPcuAicQy8U=; b=HgU9CSKrEqSDpGiYBgr6Xv6AjXKIDJ7zhB2K7Y93EINvl0mGHPjDCAe9pusQOmavz7nJh2SrG8yj/uD11p7R8Hd152Wo6QpjmznXqlXPlpk3DESA1yA11Uf+lpcrNiy2lwYI2IBHhKlDtOkBDL9jHbHpYmkSko+1F9LyyinYwZ3rEBj8slCIQ0l9st+lQh5VAwjzldveMqVha9q0763EGPOvjpCTL6YsPNxEqUl3ScxzX/1NsLTkYVDOT63jwYmkBUtskLMaGdpZDzanRbM7t0GMqlUPXDhHhWjB+B+TOE4U+1AKDXNX+85MitjJFH18pw+y3axVQgdjAZ8Bu6n0kg== 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 Received: from SA2PR11MB4938.namprd11.prod.outlook.com (2603:10b6:806:fb::14) by DM4PR11MB6192.namprd11.prod.outlook.com (2603:10b6:8:a9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Tue, 27 Jun 2023 20:17:01 +0000 Received: from SA2PR11MB4938.namprd11.prod.outlook.com ([fe80::f7a7:8a51:7ca5:4784]) by SA2PR11MB4938.namprd11.prod.outlook.com ([fe80::f7a7:8a51:7ca5:4784%7]) with mapi id 15.20.6521.024; Tue, 27 Jun 2023 20:17:01 +0000 From: "Michael D Kinney" To: "Huang, LakX" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Liu, Zhiguang" , "Kinney, Michael D" Subject: Re: [PATCH v1] MdePkg: Add UefiBootServicesTableLib gmock support Thread-Topic: [PATCH v1] MdePkg: Add UefiBootServicesTableLib gmock support Thread-Index: AQHZool4zPi9J/PeMUuWHk6mZNp3Fq+fI05A Date: Tue, 27 Jun 2023 20:17:01 +0000 Message-ID: References: <20230619083829.743-1-lakx.huang@intel.com> In-Reply-To: <20230619083829.743-1-lakx.huang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SA2PR11MB4938:EE_|DM4PR11MB6192:EE_ x-ms-office365-filtering-correlation-id: 4d477ae0-cfa0-4f90-1ecf-08db774b776b x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: A8COcHVJoUOcSm1WPIqNpd7Fh07sXMg3zXnrc6qcEBoUCq6LLLTNRPL5eCkIjzLBIG5uzzubcoqzm4v5Z11puwCtA+1kHbgl9zIQNFA8GTt2/w1bJQrsyYLr+KS5KZO/j6SOeKeq43t+LBjtP4naOPoA5oiw7GbUT5dXSwW84PIMGnKifw2cxSOHGBhD79zzlstl/iNY9DErWSZr/rP1hQbF1+JjBwgzluf5AQOfoWiIWLva0Bm9RCN7CfKcfXjcPzVmn8G35c7aLaF1Mfy8Ut/wYppii1AnrI1AhForYCnkL2vb420CzcUsHQ+ZSzRY9GnYBcA86W79LnhjiHEvoduHQmWNKUP/7S8u+C0tZed7VUAexHruKOytjLi5z+NP3A0ET33CmxMw4QUtxmFTbZcnj1QQd1AF42FctnFJaOOQoCZAhUJXKV7lm3AexYD6TmbXocG69wv9vY9atrvWTSw72fuKvdRS1CPFuLn9yFbGJ7C4Z8g0YOyxbOl7NfWK1Sj4laFYzhnXcvftkQgzx8ZnC6nN46QXFc/nUcUaK+GQkdbZ/n4Rwjsf8gmlPzdeLhLxT/93JvfDiVJzZCdVJlHz2XjEapMUceLcVurGhxywyIGDQEb+9eo7DK1sfyKN x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA2PR11MB4938.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199021)(66556008)(66476007)(38070700005)(107886003)(6506007)(110136005)(966005)(7696005)(54906003)(478600001)(83380400001)(26005)(9686003)(186003)(53546011)(2906002)(71200400001)(5660300002)(52536014)(122000001)(66946007)(82960400001)(38100700002)(64756008)(76116006)(55016003)(8676002)(86362001)(33656002)(316002)(4326008)(41300700001)(8936002)(66446008)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Eedd0kdVbuRqsubBNMgs2ylJk8J7Hue2CSWY5ItUCPUD8jDyPp60ZBjNA0Jj?= =?us-ascii?Q?/aAWksUEfAzZn501UJvLrXBK47KhUDpJfmKuBjSd8ZwQTA2fswAxOVMO5NPd?= =?us-ascii?Q?tqE2Did3aMNX6MDRqwxsDBq3MwinhYu3CevGMtoo/A5krF78PHp2sSG22LlK?= =?us-ascii?Q?IZPXE6UvTANDYDVx39pQj3BINBth7lq7YSCfeAY2Yv1LA5Vho1s3VSQ6Y4nQ?= =?us-ascii?Q?bO9axNthkNh2lSyVcjAkLYLU92kOtmKJqeN13Hnrcz4zzrYRdGkOVperSHqv?= =?us-ascii?Q?Hwc3t84nkDL4JPIa0s5E3aQyh0MrN8pEvZsechMiZ7cTeuDR1ZFian2M0YcH?= =?us-ascii?Q?MFdp3RYllDPMtxU2OuafiZAkRBiOMcRKaNZ2eo4yVyuEuwnRE5sUrE0gsDaC?= =?us-ascii?Q?ljG3K2jxocLC/R3rSVbxRXWmfDFi/uX8ZSUfHiYRnC7OuwEi16gy6VllYC7w?= =?us-ascii?Q?9qRRS4vCoKHTIoX+QdfBtotTh742YQt2BQqRRfErpd0/7qcsqrJJb6StrAiW?= =?us-ascii?Q?4lpgJCO0X1p/N4m7/lNNekpzibora5qxd99jIC6vd9NX3GNHVz6i1ES2m67y?= =?us-ascii?Q?37i6xHZCRP6buXCXiuJqgWtmsTSXbHAtERlB8C8isftzzbN6XRV6IYSOga1/?= =?us-ascii?Q?XEDq/nLUFUMFQL4G0zy0fYt1cy0FoFRsIMw4I+qARqg8ZPh9kUguKAqj38EX?= =?us-ascii?Q?VYsnrsuIY08Wk09/FeaXv5vZs0OaQByDsWFfHvqBnPI3lTkUk/lDGN78HWeI?= =?us-ascii?Q?/C8lsc+sySHVDdU4UJOph8xansK3rKSzsBaCosh/ZBzh0V6oSBcFzCl90lFS?= =?us-ascii?Q?3p2b6BD3YB0WNqmUFGoZDKXTmYqicaAoQmXWzzAo9qXutolB6Op70P84PNNc?= =?us-ascii?Q?9aazd8iBXMHm7kQE/1BihKMUVFqSXGLjwiHWqeVsPcr7YXiApMhXwKV6Wcd6?= =?us-ascii?Q?KcsP3yv72+vDJI3oTNlMQzzRDungYC8Z3uVDnNtuOe5oOj02Xa5LXBgj+9KA?= =?us-ascii?Q?9ejtAkkHaS7QFt1h4V2d8g3DUBWMGQTvuvZ+Dy8ClcROQ2AV+kXT/qHsSDkX?= =?us-ascii?Q?q21S5Gkh5VFMVZ+jf9TohGvwMM3ZKYKExQNL6dte994Ro0hjhVZ4ZirSxO97?= =?us-ascii?Q?oeL1d8Ddl/nXmwbC/CFLsVyGEaNQhEhfAJCn4mjRQjiSMT/P1wAwkNItZVBd?= =?us-ascii?Q?CtikNWbcbzY+2idVURUIO4BTq/bARM6CrPp/JIJTFqPsqWrp8zei2peNwtzs?= =?us-ascii?Q?Uh0W9yez0a0ZuYlJmDO6ukw3agivvsWZfK6W+2opJO0oFhSaokMH7W4LU2xq?= =?us-ascii?Q?jHthilk8fOolhGW7T9YQs8GF2yBsNrUGsebqVmNOf76Ui57kEGjB6NswLajg?= =?us-ascii?Q?1Chl3QTAomY/Zn8zZrQXxxNaFK6Pp89dYISGpP74QxHNt3Mm4m90vFwhnLgs?= =?us-ascii?Q?6U2EVUIbwgQW4xN6uprZrx5pH4YG1n0tTs4Q4khtczN8CkQEDcWFUcH7P1i0?= =?us-ascii?Q?iNx5p6Zsx0DDA8dcFo7XuJKUBDqjiBPKdz1yA43HpnZCHcX8fIT6KIgRxm/c?= =?us-ascii?Q?F8jsa+pCoCx2QP6RB5M1rvsO391dNEssQQSm2Tzyyo9XQYtMdfsMQ20CKUM+?= =?us-ascii?Q?CQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR11MB4938.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d477ae0-cfa0-4f90-1ecf-08db774b776b X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2023 20:17:01.2780 (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: ymbykHev3qVbAgR+Tk+LUYlDQEaIWg6XPkd6McqfzabI/9hTthP57ln5jvjVX5agOK2CUTwrFieKjXKc99vhwB9o4e7MYhuTXcWBwXzfos4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6192 Return-Path: michael.d.kinney@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I only see a few services from the UEFI Boot Services Table supported. I recommend the commit message be updated to indicate it is only partial=20 supppot and list the APIs supported. Mike > -----Original Message----- > From: Huang, LakX > Sent: Monday, June 19, 2023 1:38 AM > To: devel@edk2.groups.io > Cc: Huang, LakX ; Kinney, Michael D > ; Gao, Liming ; Liu= , > Zhiguang > Subject: [PATCH v1] MdePkg: Add UefiBootServicesTableLib gmock support >=20 > From: LakX Huang >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4485 >=20 > Add Google Mock Library for UefiBootServicesTableLib >=20 > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu >=20 > Signed-off-by: LakX Huang > --- > MdePkg/Test/MdePkgHostTest.dsc | 1 + > .../Library/MockUefiBootServicesTableLib.h | 71 ++++++++++++++++++ > .../MockUefiBootServicesTableLib.cpp | 75 +++++++++++++++++++ > .../MockUefiBootServicesTableLib.inf | 33 ++++++++ > 4 files changed, 180 insertions(+) > create mode 100644 > MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiBootServicesTableLib.= h > create mode 100644 > MdePkg/Test/Mock/Library/GoogleTest/MockUefiBootServicesTableLib/MockUefi= Bo > otServicesTableLib.cpp > create mode 100644 > MdePkg/Test/Mock/Library/GoogleTest/MockUefiBootServicesTableLib/MockUefi= Bo > otServicesTableLib.inf >=20 > diff --git a/MdePkg/Test/MdePkgHostTest.dsc > b/MdePkg/Test/MdePkgHostTest.dsc > index 529ea69024..872db61b2f 100644 > --- a/MdePkg/Test/MdePkgHostTest.dsc > +++ b/MdePkg/Test/MdePkgHostTest.dsc > @@ -38,3 +38,4 @@ >=20 > MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/MockU= ef > iRuntimeServicesTableLib.inf >=20 >=20 > MdePkg/Test/Mock/Library/GoogleTest/MockPeiServicesLib/MockPeiServicesLib= .i > nf >=20 > MdePkg/Test/Mock/Library/GoogleTest/MockHobLib/MockHobLib.inf >=20 > + > MdePkg/Test/Mock/Library/GoogleTest/MockUefiBootServicesTableLib/MockUefi= Bo > otServicesTableLib.inf > \ No newline at end of file > diff --git > a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiBootServicesTableLi= b. > h > b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiBootServicesTableLi= b. > h > new file mode 100644 > index 0000000000..e36c6efdb9 > --- /dev/null > +++ > b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiBootServicesTableLi= b. > h > @@ -0,0 +1,71 @@ > +/** @file >=20 > + Google Test mocks for UefiBootServicesTableLib >=20 > + >=20 > + Copyright (c) 2022, Intel Corporation. All rights reserved. >=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > +**/ >=20 > + >=20 > +#ifndef MOCK_UEFI_BOOT_SERVICES_TABLE_LIB_H_ >=20 > +#define MOCK_UEFI_BOOT_SERVICES_TABLE_LIB_H_ >=20 > + >=20 > +#include >=20 > +#include >=20 > +extern "C" { >=20 > +#include >=20 > +#include >=20 > +} >=20 > + >=20 > +struct MockUefiBootServicesTableLib { >=20 > + MOCK_INTERFACE_DECLARATION (MockUefiBootServicesTableLib); >=20 > + >=20 > + MOCK_FUNCTION_DECLARATION ( >=20 > + EFI_STATUS, >=20 > + gBS_LocateProtocol, >=20 > + (IN EFI_GUID *Protocol, >=20 > + IN VOID *Registration OPTIONAL, >=20 > + OUT VOID **Interface) >=20 > + ); >=20 > + >=20 > + MOCK_FUNCTION_DECLARATION ( >=20 > + EFI_STATUS, >=20 > + gBS_LocateHandleBuffer, >=20 > + (IN EFI_LOCATE_SEARCH_TYPE SearchType, >=20 > + IN EFI_GUID *Protocol OPTIONAL, >=20 > + IN VOID *SearchKey OPTIONAL, >=20 > + OUT UINTN *NoHandles, >=20 > + OUT EFI_HANDLE **Buffer) >=20 > + ); >=20 > + >=20 > + MOCK_FUNCTION_DECLARATION ( >=20 > + EFI_STATUS, >=20 > + gBS_DisconnectController, >=20 > + (IN EFI_HANDLE ControllerHandle, >=20 > + IN EFI_HANDLE DriverImageHandle OPTIONAL, >=20 > + IN EFI_HANDLE ChildHandle OPTIONAL) >=20 > + ); >=20 > + >=20 > + MOCK_FUNCTION_DECLARATION ( >=20 > + EFI_STATUS, >=20 > + gBS_FreePool, >=20 > + (IN VOID *Buffer) >=20 > + ); >=20 > + >=20 > + MOCK_FUNCTION_DECLARATION ( >=20 > + EFI_STATUS, >=20 > + gBS_ConnectController, >=20 > + (IN EFI_HANDLE ControllerHandle, >=20 > + IN EFI_HANDLE *DriverImageHandle OPTIONAL, >=20 > + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL, >=20 > + IN BOOLEAN Recursive) >=20 > + ); >=20 > + >=20 > + MOCK_FUNCTION_DECLARATION ( >=20 > + EFI_STATUS, >=20 > + gBS_HandleProtocol, >=20 > + (IN EFI_HANDLE Handle, >=20 > + IN EFI_GUID *Protocol, >=20 > + OUT VOID **Interface) >=20 > + ); >=20 > +}; >=20 > + >=20 > +#endif >=20 > diff --git > a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiBootServicesTableLib/MockUe= fi > BootServicesTableLib.cpp > b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiBootServicesTableLib/MockUe= fi > BootServicesTableLib.cpp > new file mode 100644 > index 0000000000..79964d18f9 > --- /dev/null > +++ > b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiBootServicesTableLib/MockUe= fi > BootServicesTableLib.cpp > @@ -0,0 +1,75 @@ > +/** @file >=20 > + Google Test mocks for UefiBootServicesTableLib >=20 > + >=20 > + Copyright (c) 2022, Intel Corporation. All rights reserved. >=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > +**/ >=20 > +#include >=20 > + >=20 > +MOCK_INTERFACE_DEFINITION(MockUefiBootServicesTableLib); >=20 > + >=20 > +MOCK_FUNCTION_DEFINITION(MockUefiBootServicesTableLib, gBS_LocateProtoco= l, > 3, EFIAPI); >=20 > +MOCK_FUNCTION_DEFINITION(MockUefiBootServicesTableLib, > gBS_LocateHandleBuffer, 5, EFIAPI); >=20 > +MOCK_FUNCTION_DEFINITION(MockUefiBootServicesTableLib, > gBS_DisconnectController, 3, EFIAPI); >=20 > +MOCK_FUNCTION_DEFINITION(MockUefiBootServicesTableLib, gBS_FreePool, 1, > EFIAPI); >=20 > +MOCK_FUNCTION_DEFINITION(MockUefiBootServicesTableLib, > gBS_ConnectController, 4, EFIAPI); >=20 > +MOCK_FUNCTION_DEFINITION(MockUefiBootServicesTableLib, gBS_HandleProtoco= l, > 3, EFIAPI); >=20 > + >=20 > + >=20 > +static EFI_BOOT_SERVICES localBs =3D { >=20 > + { >=20 > + (UINT64)NULL, // Signature >=20 > + 0, // Revision >=20 > + 0, // HeaderSize >=20 > + 0, // CRC32 >=20 > + 0 // Reserved >=20 > + }, >=20 > + NULL, // RaiseTPL >=20 > + NULL, // RestoreTPL >=20 > + NULL, // AllocatePag= es >=20 > + NULL, // FreePages >=20 > + NULL, // GetMemoryMa= p >=20 > + NULL, // AllocatePoo= l >=20 > + (EFI_FREE_POOL)gBS_FreePool, // FreePool >=20 > + NULL, // CreateEvent >=20 > + NULL, // SetTimer >=20 > + NULL, // WaitForEven= t >=20 > + NULL, // SignalEvent >=20 > + NULL, // CloseEvent >=20 > + NULL, // CheckEvent >=20 > + NULL, // > InstallProtocolInterface >=20 > + NULL, // > ReinstallProtocolInterface >=20 > + NULL, // > UninstallProtocolInterface >=20 > + (EFI_HANDLE_PROTOCOL)gBS_HandleProtocol, // > HandleProtocol >=20 > + (VOID *)NULL, // Reserved >=20 > + NULL, // > RegisterProtocolNotify >=20 > + NULL, // LocateHandl= e >=20 > + NULL, // > LocateDevicePath >=20 > + NULL, // > InstallConfigurationTable >=20 > + NULL, // LoadImage >=20 > + NULL, // StartImage >=20 > + NULL, // Exit >=20 > + NULL, // UnloadImage >=20 > + NULL, // > ExitBootServices >=20 > + NULL, // > GetNextMonotonicCount >=20 > + NULL, // Stall >=20 > + NULL, // > SetWatchdogTimer >=20 > + (EFI_CONNECT_CONTROLLER)gBS_ConnectController, // > ConnectController >=20 > + (EFI_DISCONNECT_CONTROLLER)gBS_DisconnectController, // > DisconnectController >=20 > + NULL, // OpenProtoco= l >=20 > + NULL, // CloseProtoc= ol >=20 > + NULL, // > OpenProtocolInformation >=20 > + NULL, // > ProtocolsPerHandle >=20 > + (EFI_LOCATE_HANDLE_BUFFER)gBS_LocateHandleBuffer, // > LocateHandleBuffer >=20 > + (EFI_LOCATE_PROTOCOL)gBS_LocateProtocol, // > LocateProtocol >=20 > + NULL, // > InstallMultipleProtocolInterfaces >=20 > + NULL, // > UninstallMultipleProtocolInterfaces >=20 > + NULL, // > CalculateCrc32 >=20 > + NULL, // CopyMem >=20 > + NULL, // SetMem >=20 > + NULL // CreateEvent= Ex >=20 > +}; >=20 > + >=20 > +extern "C" { >=20 > + EFI_BOOT_SERVICES* gBS =3D &localBs; >=20 > +} > \ No newline at end of file > diff --git > a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiBootServicesTableLib/MockUe= fi > BootServicesTableLib.inf > b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiBootServicesTableLib/MockUe= fi > BootServicesTableLib.inf > new file mode 100644 > index 0000000000..e8dcca8fb8 > --- /dev/null > +++ > b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiBootServicesTableLib/MockUe= fi > BootServicesTableLib.inf > @@ -0,0 +1,33 @@ > +## @file >=20 > +# Google Test mocks for UefiBootServicesTableLib >=20 > +# >=20 > +# Copyright (c) 2023, Intel Corporation. All rights reserved. >=20 > +# SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > +## >=20 > + >=20 > +[Defines] >=20 > + INF_VERSION =3D 0x00010005 >=20 > + BASE_NAME =3D MockUefiBootServicesTableLib >=20 > + FILE_GUID =3D 9C6D2161-61B2-4094-BC8D-92F70C5E3C0= 6 >=20 > + MODULE_TYPE =3D HOST_APPLICATION >=20 > + VERSION_STRING =3D 1.0 >=20 > + LIBRARY_CLASS =3D MockUefiBootServicesTableLib >=20 > + >=20 > +# >=20 > +# The following information is for reference only and not required by th= e > build tools. >=20 > +# >=20 > +# VALID_ARCHITECTURES =3D IA32 X64 >=20 > +# >=20 > + >=20 > +[Sources] >=20 > + MockUefiBootServicesTableLib.cpp >=20 > + >=20 > +[Packages] >=20 > + MdePkg/MdePkg.dec >=20 > + UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec >=20 > + >=20 > +[LibraryClasses] >=20 > + GoogleTestLib >=20 > + >=20 > +[BuildOptions] >=20 > + MSFT:*_*_*_CC_FLAGS =3D /EHsc >=20 > -- > 2.26.2.windows.1