From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.10069.1670226899979497204 for ; Sun, 04 Dec 2022 23:55:00 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=M2KsxoDv; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: zhiguang.liu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670226900; x=1701762900; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=4bkWtX873nkT/mhSxVwRK3ExIUWhd4DcaRnQCD6C7A0=; b=M2KsxoDvDD2HqMFeINNZDiWI8GxWt9EpeL8LcWMsrincOfBxXiv0zaUO zAbV8zQAg0TOB3ewNDMx5hnMzEKoyrS/Jfn8ncbW0GHG9f8R4C6S1t5ES sxus6qmAqYF8CW2fJb2sE+izh0TUm/fubMlNmTagS98nzE5ZYdsoC07dR NM2Mwix1ip37j7FaKbD+RijBGWg8AMavsFysn1kEBnrduzNSU2a64Yg3s W3tO4vVSCoJJTgXpB8FCqXDtuFb6ih1FJp9O5E/fmtHKRV865Ob1AQ1v/ KZCZkCZ+jM3ID1UiPO8/ITYJ4T2CBeXS9ccH0xdZqS4C700ScyAH8JnRm w==; X-IronPort-AV: E=McAfee;i="6500,9779,10551"; a="402564203" X-IronPort-AV: E=Sophos;i="5.96,218,1665471600"; d="scan'208";a="402564203" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2022 23:54:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10551"; a="820099778" X-IronPort-AV: E=Sophos;i="5.96,218,1665471600"; d="scan'208";a="820099778" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga005.jf.intel.com with ESMTP; 04 Dec 2022 23:54:38 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.16; Sun, 4 Dec 2022 23:54:36 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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.16; Sun, 4 Dec 2022 23:54:35 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.16 via Frontend Transport; Sun, 4 Dec 2022 23:54:35 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) 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.16; Sun, 4 Dec 2022 23:54:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UahI0bwTexLvwQnBwfipHFDlneySDFfECNR5LaDHprYITq0iX3Gu9R/uyJ++NHyDH2zrYdSx4l8xtvpqU+Shs6TT3349n1gkFH3qYjf56jNsPOsLiieoov6iG0/pO3KpZPbnXpR6F+D3soRAD6yPYyf2DXM+c7uB+U8rTw8MF6o4Ohacv1fK0BY/zwlVQvLHeOXzIR8PX6vuB+vqqkKmgrwo8G5jAMKqhnKjWYWQdR/+zpoGYegWwKdo8ey7qgZQBKtodABQViU7I2CEZJBnYDPnZWWZJ/Um13KH+eOwgAGUOAE0mQTSbLbXfFNI37Yd9c4HUEH0Km5DHID1f8qQTw== 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=BL+UMwH4qalCiNRVLkxy0tL6sYJB8wFTVCOLO1fRVcY=; b=n5xlNP7GQf+vWR0LIPO3/+13MahQzWmgORTgHEHSQJSs1eImDG+hW2CgGb2rK7nSOF0HY/XDX5pM22Dyi4O2DkEXAJcwBn/pQYI5luJNwfTFHG4hsX7MMG14zscN3kzCBYc/49Liy2ZKnAvLJD5pbsz/RFhR9efx23siJ85Z9l236AmMrBxZ0OV2vc7kuVSmTJRKxWAdYByZGnd2qMjgr6mSug1/EJgwPIpLuczpG5x4er4FEO0pXIqH2oQjKfFUoCU6ZvM/PkVTPPMQSqPoa/iyupzXRzDF3mKd95fM52eL6WIk+ljexKGfvjiFlQM9rSDHZBRvkAHgk9sI87OA4A== 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 PH0PR11MB5048.namprd11.prod.outlook.com (2603:10b6:510:3d::14) by BL1PR11MB5955.namprd11.prod.outlook.com (2603:10b6:208:386::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.13; Mon, 5 Dec 2022 07:54:33 +0000 Received: from PH0PR11MB5048.namprd11.prod.outlook.com ([fe80::bf9a:7d68:2ee8:dfd9]) by PH0PR11MB5048.namprd11.prod.outlook.com ([fe80::bf9a:7d68:2ee8:dfd9%6]) with mapi id 15.20.5880.014; Mon, 5 Dec 2022 07:54:33 +0000 From: "Zhiguang Liu" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: Michael Kubacki , Sean Brogan , "Ni, Ray" Subject: Re: [Patch 1/1] UnitTestFrameworkPkg: Library classes private to public Thread-Topic: [Patch 1/1] UnitTestFrameworkPkg: Library classes private to public Thread-Index: AQHZBQGTEw9mOxm1uUud7M736AxFI65e601ggAAHDwA= Date: Mon, 5 Dec 2022 07:54:33 +0000 Message-ID: References: <20221130211956.584-1-michael.d.kinney@intel.com> In-Reply-To: Accept-Language: en-US, zh-CN 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: PH0PR11MB5048:EE_|BL1PR11MB5955:EE_ x-ms-office365-filtering-correlation-id: 8f34ba86-2524-4312-cf0e-08dad695f25e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 20eBTF+3ACOieFB/d+JIXhOgeY8iflFV8Sess8p0Qbp5PQNruUqi+wIf9qvRO5ilJ1MPtpw6bJEIpJKRw2ufC7eA9g2uAPqXQoJB/5a20zdAoSVqbJ4Bfmv2qBLzyxhikZcPAZnPbdww+TAz4Zxtpdcr9N+oTCm3lLCiU3R1UagQE8Eyo6tSnNEQIk2xN6sfjmBbcr/SbJsGLt4eHSGnfT6jTN7jTK7S6GehYBD7jblXAFN+r7ms+P1asXZKGKUMdE7SgxyAphAywYcT6HgaLnmGDTtp6Us5A/8piJoC3jEo9SBtU+e3gOMNXo7B9yEEF81aHOjrPP53Bur9cR+cljqHFitVZcOYDp9uvemgl3sRNqEHoaGJ0C8ejQk9kxH+OUtShi9MQdhseWIDiGN0KN02zZCEU7LZen/QBhZLLvpaeR31q121p0SfnjzWbsIw4YxbFq+7Dn0TOjcR0k5iQa3DlGwpthmxl4kBW+a2xS8YyJSt3jSm8JYGEQKyyOYvD1q6IaG9kJATnUbaNxfkWMcietN11xs2dAd/kuVqsZO2NZ5ZS8IMjf91rvr0dMVwrjMgur6CE02NvWmjFKy3OAJez51SdNK7xmWZQbmizjFEQDf4FUg0Ka2cqbEd9JbAB706Vp7ufqdLVobubtprprMbPtxqg6chGNNGzzKbTBsXpd+WQkFjdA8/Wj3qsoUytB7kNs2nG9iEBfWmQoLARUZlHtG7Othcss2XITU1gow= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5048.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(346002)(136003)(39860400002)(376002)(366004)(451199015)(6506007)(7696005)(2906002)(71200400001)(53546011)(38070700005)(83380400001)(316002)(64756008)(66556008)(4326008)(66476007)(8676002)(66446008)(76116006)(33656002)(55016003)(8936002)(66946007)(5660300002)(2940100002)(52536014)(86362001)(186003)(54906003)(41300700001)(110136005)(9686003)(26005)(478600001)(122000001)(107886003)(38100700002)(966005)(82960400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?t+L9+Ecun9PA4egAO76th9WeIKbK/8fXKwj7pX7G4CmVrt05OcoAT1bwmW64?= =?us-ascii?Q?fDqd/sDTVBY7z/GGXGmrWPchP+KYbZt42CNLYuJ+7PNTK86EkPlNkDgoWNUf?= =?us-ascii?Q?Ip9yw+BAEYUwdKDOxZsqei+03D6AbZhIwUBIfVMkGhpp958KyXPxlfklcEq4?= =?us-ascii?Q?4mE7+Jj3izVmZ0AiSL//I59A424o+oCXSsvB3eBGXgatjyn8HXGwKkoTnYri?= =?us-ascii?Q?TjkzJ5zRmY55qVmHJKUF57IF1guc3tfGldvZlNWlCdpQ6HYE6enj60ZsKRVp?= =?us-ascii?Q?RfsyUKItxNajiLR5VElSiN5Ef9M4cTk0fze5LJeoT/PYsg9pyunAnG6E/UXL?= =?us-ascii?Q?aXbCUiB7+savxA+gfjq0slPCALFu2d5ALC7+PDw7FOvFBaJQQl6usMYqAo3z?= =?us-ascii?Q?L+pytjMJUL5lo7gcb7wnY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oi/VjrqBu9HkCyle7PWA25JTFd3jkKi/kUNNNrxoS0PYuwWeX0DWU67K3?= =?us-ascii?Q?q+g33e5rz+df3fkYBn4CIrxae2jqQ1pitSY6uMPqZt5PpolM7TKNwsJy+Wfz?= =?us-ascii?Q?flZCAolfBKFN0o20jjka62xt/3CMxATxJyMyP6SP9u6ht90P8zDbTo3zhN8P?= =?us-ascii?Q?KruwaM9hj5Tt3GVSPAH0Q1wmQ4nCEYdDEdRj+1SubNo+aNh2qM4ljJZvPJFZ?= =?us-ascii?Q?t6IFV1GJouwYcL6UKCPgLenIwEs8IcGIvXHSbV2w?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5048.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f34ba86-2524-4312-cf0e-08dad695f25e X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Dec 2022 07:54:33.0960 (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: 2mBFXxzsYhHlZSvviHZOEXX+yyg54TWlg2MYIBTAtYWPIt0zuJ0sMdZsGhQt7UYyWyMckKLPbYChC3y/GkPp0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5955 Return-Path: zhiguang.liu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Another suggestion from Ray is to change the API adding a new parameter(siz= e), so we can avoid using the UNIT_TEST_SAVE_HEADER struct. EFI_STATUS EFIAPI SaveUnitTestCache ( IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle, IN VOID *SaveData, IN UINTN Size ); Thanks Zhiguang > -----Original Message----- > From: Liu, Zhiguang > Sent: Monday, December 5, 2022 3:44 PM > To: Kinney, Michael D ; devel@edk2.groups.io > Cc: Michael Kubacki ; Sean Brogan > ; Ni, Ray > Subject: RE: [Patch 1/1] UnitTestFrameworkPkg: Library classes private to > public >=20 > Hi Mike, > Thanks for the patch. > One comment is that UnitTestPersistenceLib depends on a struct definition > UNIT_TEST_SAVE_HEADER, which is defined in private headers. > Do you think it is ok to also move it into UnitTestPersistenceLib.h? > Or what we really need from the struct in UnitTestPersistenceLib is the > SaveStateSize, we can define a new public struct > UNIT_TEST_SAVE_HEADER_PUBLIC to only contains the needed fields, like >=20 > typedef struct { > UINT8 Version; > UINT32 SaveStateSize; // Size of the ent= ire serialized buffer. > UINT8 RawData[]; > } UNIT_TEST_SAVE_HEADER; >=20 > Thanks > Zhiguang >=20 > > -----Original Message----- > > From: Kinney, Michael D > > Sent: Thursday, December 1, 2022 5:20 AM > > To: devel@edk2.groups.io > > Cc: Michael Kubacki ; Sean Brogan > > ; Ni, Ray ; Liu, Zhiguang > > > > Subject: [Patch 1/1] UnitTestFrameworkPkg: Library classes private to > > public > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4178 > > > > * Change GoogleTestLib class from private to public. > > * Change UnitTestPersistenceLib class from private to public. > > > > Cc: Michael Kubacki > > Cc: Sean Brogan > > Cc: Ray Ni > > Cc: Zhiguang Liu > > Signed-off-by: Michael D Kinney > > --- > > .../Library/UnitTestPersistenceLib.h | 0 > > UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec | 13 +++++++------ > > 2 files changed, 7 insertions(+), 6 deletions(-) rename > > UnitTestFrameworkPkg/{PrivateInclude =3D> > > Include}/Library/UnitTestPersistenceLib.h (100%) > > > > diff --git > > a/UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h > > b/UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h > > similarity index 100% > > rename from > > UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h > > rename to > > UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h > > diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec > > b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec > > index ed12f32009d8..14e387d63a0f 100644 > > --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec > > +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec > > @@ -26,11 +26,16 @@ [Includes.Common.Private] > > Library/CmockaLib/cmocka/include/cmockery > > Library/GoogleTestLib/googletest/googletest > > > > -[LibraryClasses.Common.Private] > > +[LibraryClasses] > > ## @libraryclass Allows save and restore unit test internal state > > # > > - > > UnitTestPersistenceLib|PrivateInclude/Library/UnitTestPersistenceLib.h > > + UnitTestPersistenceLib|Include/Library/UnitTestPersistenceLib.h > > > > + ## @libraryclass GoogleTest infrastructure # > > + GoogleTestLib|Include/Library/GoogleTestLib.h > > + > > +[LibraryClasses.Common.Private] > > ## @libraryclass Provides a unit test result report > > # > > > > UnitTestResultReportLib|PrivateInclude/Library/UnitTestResultReportLib > > .h @@ -39,10 +44,6 @@ [LibraryClasses.Common.Private] > > # > > UnitTestBootLib|PrivateInclude/Library/UnitTestBootLib.h > > > > - ## @libraryclass GoogleTest infrastructure > > - # > > - GoogleTestLib|Include/Library/GoogleTestLib.h > > - > > [Guids] > > gUnitTestFrameworkPkgTokenSpaceGuid =3D { 0x833d3aba, 0x39b4, 0x43a2= , > > { 0xb9, 0x30, 0x7a, 0x34, 0x53, 0x39, 0x31, 0xb3 } } > > > > -- > > 2.37.1.windows.1