From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web08.5849.1627537328775371989 for ; Wed, 28 Jul 2021 22:42:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=sLnvx5p4; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: hao.a.wu@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10059"; a="276590649" X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="276590649" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 22:42:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="499627721" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga004.fm.intel.com with ESMTP; 28 Jul 2021 22:42:06 -0700 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.2242.10; Wed, 28 Jul 2021 22:42:05 -0700 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.2242.10; Wed, 28 Jul 2021 22:42:05 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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.2242.10 via Frontend Transport; Wed, 28 Jul 2021 22:42:04 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) 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.2242.10; Wed, 28 Jul 2021 22:42:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jEdTetjkE4cvJyokuD0g4MLySMclEtlcD8zBFjggLEv7/yKqtfIr9O/uqX6HxLNFAxJTezzgw/9s4d5GrAkKXSVPpLZ6Hawb1WvmzDtYraNICahAGBJMRhHCQtVZtD9XAitn/NL03ND45lsBFql/iXYm9/9kUbEpBzUY/2raTJ/PRUjCh0G3QHzjDDcaOroKFxwPj6DY5ChPSRmUrH5YoWJawFLHneEE8s9cEGvsm+GadHz7omaXg4PtyuXxtoI9LjugzkTXRytDLW+RghO71ObrqkJ8I8JGeYc7EC92K4oQj+CLEjo3BBOq4XnIeWpu+CJK6x0lG9MKKnCihUMsCQ== 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-SenderADCheck; bh=cWzvkKXOoWDpbsfl5he4dz51vI17DGYlRgGxy3PqqpE=; b=hT4HtBqPKYknpm6crKt9Z/60wuK/0Ma+uTtb7DxLZv4RTxea/USux6jXxXFP4ivlPxaPME/nQ2TUu5jzKqwNXIl5OMsFA6tegXN2qY5aFIdaN3qvb4UcZ7qwk2lWCjVqweJvUoAq/zoT4MujVKiZzBOIgCfRIa5vhrQd/uJcjy9EtTpuiASorLZA9oZmcJzl+MPvU3MIBezACZ8gFRQBA653g+ZMH1XI6N+x9UIe9AWjEoSCYhhuDVRyscUKSk+C7EZNer01WczjZNGzzuZ4hMPWrMHGJEXMQy1o0vBMAjVSBmoJXLAJW3Qm+WDtXNXNyXBt2RBMj0iG6VnE5WwUHg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cWzvkKXOoWDpbsfl5he4dz51vI17DGYlRgGxy3PqqpE=; b=sLnvx5p4V8tqGif6NRnTVbNZLxpOJF+/JVxxoS5S8Q4sRfP6aonRrzD4vm5uPnqXImx1cCx4f8/gE2GWfZC7+Ne+4NDLPveRXf4SMPOoPcQcFIRAU0Woy+ALxUF3y7mVB4v3rZiG9x65TIUOUqpNakXlDcdnThp13zN5k24M4Ic= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR11MB1473.namprd11.prod.outlook.com (2603:10b6:405:a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.29; Thu, 29 Jul 2021 05:42:03 +0000 Received: from BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::cd58:25ce:5017:619d]) by BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::cd58:25ce:5017:619d%5]) with mapi id 15.20.4373.018; Thu, 29 Jul 2021 05:42:03 +0000 From: "Wu, Hao A" To: Wenyi Xie , "devel@edk2.groups.io" , "Wang, Jian J" CC: "songdongkuang@huawei.com" Subject: Re: [PATCH EDK2 v1 1/1] MdeModulePkg/UefiSortLib:Add UefiSortLib unit test Thread-Topic: [PATCH EDK2 v1 1/1] MdeModulePkg/UefiSortLib:Add UefiSortLib unit test Thread-Index: AQHXg3ZZz/AK9OMTGku2KtmGUO7BqatZGOSw Date: Thu, 29 Jul 2021 05:42:03 +0000 Message-ID: References: <1627451892-40994-1-git-send-email-xiewenyi2@huawei.com> <1627451892-40994-2-git-send-email-xiewenyi2@huawei.com> In-Reply-To: <1627451892-40994-2-git-send-email-xiewenyi2@huawei.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b9c72f12-0be4-4924-62e5-08d9525397c9 x-ms-traffictypediagnostic: BN6PR11MB1473: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wkgJY7A2q/guE77CeU5+nFo0OeLYOTKXHnEdJI8hjRcjwzhg0IbcMR99TXKvm+fqRoRXoOSZ8AbNhZR/H4c74n9z6J12yeJB8c81c92Ngmp4Vl5ufbaMyjvc+b3vb01lm892hMgVo6pK6bCz72nQc3QGA8q3RcQHsycQsiU4Uo5AHq5iV82M56iRL5+OEu0AelaiJR43NdH+hqtRvxM/D/ZEpqPkszjnDiX5t7HXxdK5SoZwkCyFLY8jCDIVqOPAV+DmSbdvFYSnOCb1E23h5oRMKpaF+HMmO6M7bfVIMiTa93qgwfzWg36z8s9VPQheS8J/YdXn3L540XbEshuIu1aQkvu7KucKbSz/2SB58XDrPddAg0Y22Tn5ckVIGLkCzfwY4DWDMAL+6Rjbl0hhH60YDXD20gjuvwYAFh3/kh2Qht/CJgt4wAS2hU33uiNuVeaY8ZAUBLgkWUbLm51S7qwpXEG6YvPHZYiXJEWcp1mqxN5InCQ38Sr+OBik8bkMn6Ip9QdnSEbFgazspyAFoXzCi1AwNbKN4npsxk30g213criPjTGRYX9YJwF7gVqHkoc10eVuzv5FFPGZSstAZ9daXpqYSdtOt+7SUuqOtG8xnSozQIb588qcFcYRZLwZHbsu91QHm2n02ihSPdxd6u2RmxOWf7MROHdR+/CBIkkUj4mSBgA6HIow5in5E2eJk3vF9TQiHtNbRc7U7N73MQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3666.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(55016002)(26005)(508600001)(186003)(9686003)(2906002)(83380400001)(8676002)(122000001)(4326008)(6636002)(8936002)(71200400001)(6506007)(38100700002)(45080400002)(52536014)(53546011)(33656002)(110136005)(86362001)(5660300002)(7696005)(66446008)(66556008)(66946007)(66476007)(64756008)(76116006)(38070700005)(316002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?N/UUkk9X9bvuVRJ8J6LG6hGCFjZhgt83Js9cXMYbKN5l0d7UU5m7qeHpL44V?= =?us-ascii?Q?hN/1SHOcQAjw7rOb7GhEh5IMl2/C97k/R880tXvYjhGskRcm9Yxxfuzl0Dee?= =?us-ascii?Q?nweSNIdFz3tIKEB3ShAC/GuZ1eEYLgnmJMAoQXBcYGW+hIQjl+nweLhOI3yO?= =?us-ascii?Q?/18uoPEufUJPaT2lIleEN8Nu2xVnoSUe4XyOJjNuMRsMCP9btmYqA9ssh2Go?= =?us-ascii?Q?5ghIBrNcmu6ohYQAwgUMXntaasl0fCVYpjctECK2KhninR3EE0/R2R9ZqV5A?= =?us-ascii?Q?otVx4nmaP9bTJdmRoFxqVQ224mex+zMknvtwXrnsMK/cFpvAf/2xWz3IE20F?= =?us-ascii?Q?yOKjZmG8Nw42akTL7ReDNlTF1St7YSGj5WggTfpvv+qZkB6FBVNQe+xWDMq+?= =?us-ascii?Q?QS2MU+zrAXIwIii8DVYzrPnGNjf1dbZh1GfiXqOrhXyVQmDsLhnAiE2h6Zu5?= =?us-ascii?Q?A2RKIMzqsvykuwjCmEvQemSM243fTDr8RCdvaSiEpCOKrjqof2ALIMYUlyh1?= =?us-ascii?Q?Tz8+t+25E7GzvMURC5UIVmIbuEnL9t0YQ6KeZ5jDwWM8FUVDiutkqTnYWD1/?= =?us-ascii?Q?6HZN2CiILyEHlAB5IKJnCWn/7qbh2veRlqDWkXkz21UfrSCLc5oUoucfSExC?= =?us-ascii?Q?STkQy1QyCilfLhUms3f3vd3W2rhYPvqI/HxRQH4S+hkwa1g5ZdqcG6hhEHuO?= =?us-ascii?Q?O6q5eKyoDQSoTWOyReIhu9KE2WDh1ZSzCF6wRLmUHmIKlrlIobKllmAkFLeV?= =?us-ascii?Q?+7UCD7AYdze1lN+7MKS/gH3n9VQA31Jq8cF5xYLnVMck47Ui64J3WlToZUFG?= =?us-ascii?Q?SzEq1zyQpsmX9811qu1vzNsXvBm96rriZAOkit7q6OqlVSgO9W7AShjAbdbP?= =?us-ascii?Q?zVmGHpEAb8S5Or66423BsCdKx4s2ixEiGwDjMaklXYK2VCGpwrJWY4c18qyJ?= =?us-ascii?Q?y4kvbmqmTtobhHxIlzDfxHdY/WA9LvokvZTFGmBP2TXf6J4M36jXei8n11tC?= =?us-ascii?Q?7+Tu0VTJ/xw6JEe2rO+KyDrWxVm1R9lytMxo5V71Wsz6SSl1g+zikNJNQ7rJ?= =?us-ascii?Q?Fp0ZpZrmQMnPgSgBzvElXLNGJ9IAWKu0ZI/sryV4v1Znqdj2yL+aELN4ZP0b?= =?us-ascii?Q?w5Kl2X+qhpy22OHn1VVxr8rOIFbAltIgLFBDWcWRWMslGNsMB4fBWOOxSCEt?= =?us-ascii?Q?TVfrX5x6peBpiLuYduVTG2kF9wz1Ee1PcLk+Hm5wQduPmTlQOqHfRvABcs9c?= =?us-ascii?Q?xJX2kCF4+N9uA6WyvXNAIQZB8oJhWVYSf/XMM1xlchQ0nDr/PvqXbfhauePA?= =?us-ascii?Q?wcMOdXmUcyJ7HG28w9aVwt20?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3666.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9c72f12-0be4-4924-62e5-08d9525397c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jul 2021 05:42:03.0997 (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: Yn7u3/JLFxkyjWUo1kFT2HXLScE3gEl+T0VDtLOtDljKCB1L8vdQqAi4gTAVTX7fpF/J0w6n56SBJW5izxn8jw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1473 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks for the patch. Some inline comments below: > -----Original Message----- > From: Wenyi Xie > Sent: Wednesday, July 28, 2021 1:58 PM > To: devel@edk2.groups.io; Wang, Jian J ; Wu, Hao A > > Cc: songdongkuang@huawei.com; xiewenyi2@huawei.com > Subject: [PATCH EDK2 v1 1/1] MdeModulePkg/UefiSortLib:Add UefiSortLib uni= t > test >=20 > Adding unit test for UefiSortLib. Could you help to give a brief summary on what tests are added? >=20 > Cc: Jian J Wang > Cc: Hao A Wu > Signed-off-by: Wenyi Xie > --- > MdeModulePkg/Test/MdeModulePkgHostTest.dsc | 6 = + > MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.inf | 32 = ++++ > MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c | 188 > ++++++++++++++++++++ > 3 files changed, 226 insertions(+) >=20 > diff --git a/MdeModulePkg/Test/MdeModulePkgHostTest.dsc > b/MdeModulePkg/Test/MdeModulePkgHostTest.dsc > index 4da4692c8451..c9ec835df65d 100644 > --- a/MdeModulePkg/Test/MdeModulePkgHostTest.dsc > +++ b/MdeModulePkg/Test/MdeModulePkgHostTest.dsc > @@ -41,3 +41,9 @@ [Components] > >=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdAllowVariablePolicyEnforcementDisable > |TRUE > } > + > + MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.inf { > + > + UefiSortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf > + > + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf > + } > diff --git a/MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTes= t.inf > b/MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.inf > new file mode 100644 > index 000000000000..d9dac307934e > --- /dev/null > +++ b/MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.inf > @@ -0,0 +1,32 @@ > +## @file > +# This is a unit test for the UefiSortLib. > +# > +# Copyright (c) Microsoft Corporation. Please help to use the 'copyright' information of Huawei like in file UefiS= ortLibUnitTest.c. > +# SPDX-License-Identifier: BSD-2-Clause-Patent ## > + > +[Defines] > + INF_VERSION =3D 0x00010017 > + BASE_NAME =3D UefiSortLibUnitTest > + FILE_GUID =3D 271337A3-0D79-BA3E-BC03-714E518E3B1B > + VERSION_STRING =3D 1.0 > + MODULE_TYPE =3D HOST_APPLICATION > + > +# > +# The following information is for reference only and not required by th= e build > tools. > +# > +# VALID_ARCHITECTURES =3D IA32 X64 > +# > + > +[Sources] > + UefiSortLibUnitTest.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec > + > +[LibraryClasses] > + UnitTestLib > + DebugLib > + UefiSortLib > diff --git a/MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTes= t.c > b/MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c > new file mode 100644 > index 000000000000..f2f89daef7ba > --- /dev/null > +++ b/MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c > @@ -0,0 +1,188 @@ > +/** @file > + Unit tests of the UefiSortLib > + > + Copyright (C) Huawei Technologies Co., Ltd. All rights reserved > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +#define UNIT_TEST_APP_NAME "UefiSortLib Unit Tests" > +#define UNIT_TEST_APP_VERSION "1.0" > + > +#define TEST_ARRAY_SIZE_9 9 > + > +/** > + The function is called by PerformQuickSort to compare int values. > + > + @param[in] Left The pointer to first buffer. > + @param[in] Right The pointer to second buffer. > + > + @retval 0 Buffer1 equal to Buffer2. > + @return <0 Buffer1 is less than Buffer2. > + @return >0 Buffer1 is greater than Buffer2. > + > +**/ > +INTN > +EFIAPI > +TestCompareFunction ( > + IN CONST VOID *Left, > + IN CONST VOID *Right > + ) > +{ > + if (*(UINT32*)Right > *(UINT32*)Left) { > + return 1; > + } else if (*(UINT32*)Right < *(UINT32*)Left) { > + return -1; > + } > + > + return 0; > +} > + > +/** > + Unit test for PerformQuickSort () API of the UefiSortLib. > + > + @param[in] Context [Optional] An optional parameter that enables: > + 1) test-case reuse with varied parameters and > + 2) test-case re-entry for Target tests that nee= d a > + reboot. This parameter is a VOID* and it is th= e > + responsibility of the test author to ensure tha= t the > + contents are well understood by all test cases = that may > + consume it. > + > + @retval UNIT_TEST_PASSED The Unit test has completed and = the test > + case was successful. > + @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed= . > +**/ > +UNIT_TEST_STATUS > +EFIAPI > +SortUINT32ArrayShouldSucceed ( > + IN UNIT_TEST_CONTEXT Context > + ) > +{ > + UINTN TestCount =3D TEST_ARRAY_SIZE_9; > + UINT32 TestBuffer[TEST_ARRAY_SIZE_9] =3D {1, 2, 3, 4, 5, 6, 7 ,8, 9}; > + UINT32 TestResult[TEST_ARRAY_SIZE_9] =3D {9, 8, 7, 6, 5, 4, 3, 2, 1}; > + > + PerformQuickSort (TestBuffer, TestCount, sizeof (UINT32), > + (SORT_COMPARE)TestCompareFunction); > + UT_ASSERT_MEM_EQUAL (TestBuffer, TestResult, sizeof (UINT32) * > + TEST_ARRAY_SIZE_9); > + > + return UNIT_TEST_PASSED; > +} > + > +/** > + Unit test for StringCompare () API of the UefiSortLib. > + > + @param[in] Context [Optional] An optional parameter that enables: > + 1) test-case reuse with varied parameters and > + 2) test-case re-entry for Target tests that nee= d a > + reboot. This parameter is a VOID* and it is th= e > + responsibility of the test author to ensure tha= t the > + contents are well understood by all test cases = that may > + consume it. > + > + @retval UNIT_TEST_PASSED The Unit test has completed and = the test > + case was successful. > + @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed= . > +**/ > +UNIT_TEST_STATUS > +EFIAPI > +CompareSameBufferShouldSucceed ( > + IN UNIT_TEST_CONTEXT Context > + ) > +{ > + INTN retval; > + CONST CHAR16* TestBuffer[] =3D { L"abcdefg" }; > + > + retval =3D StringCompare (TestBuffer, TestBuffer); UT_ASSERT_TRUE > + (retval =3D=3D 0); > + > + return UNIT_TEST_PASSED; > +} > + > +/** > + Initialze the unit test framework, suite, and unit tests for the > + UefiSortLib and run the UefiSortLib unit test. > + > + @retval EFI_SUCCESS All test cases were dispatched. > + @retval EFI_OUT_OF_RESOURCES There are not enough resources availabl= e > to > + initialize the unit tests. > +**/ > +STATIC > +EFI_STATUS > +EFIAPI > +UnitTestingEntry ( > + VOID > + ) > +{ > + EFI_STATUS Status; > + UNIT_TEST_FRAMEWORK_HANDLE Framework; > + UNIT_TEST_SUITE_HANDLE SortTests; > + > + Framework =3D NULL; > + > + DEBUG(( DEBUG_INFO, "%a v%a\n", UNIT_TEST_APP_NAME, > + UNIT_TEST_APP_VERSION )); > + > + // > + // Start setting up the test framework for running the tests. > + // > + Status =3D InitUnitTestFramework (&Framework, UNIT_TEST_APP_NAME, > + gEfiCallerBaseName, UNIT_TEST_APP_VERSION); if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "Failed in InitUnitTestFramework. Status =3D = %r\n", > Status)); > + goto EXIT; Please help to refine the indent of the codes in the above 'if' statement t= o 2 spaces. Best Regards, Hao Wu > + } > + > + // > + // Populate the UefiSortLib Unit Test Suite. > + // > + Status =3D CreateUnitTestSuite (&SortTests, Framework, "UefiSortLib > + Sort Tests", "UefiSortLib.SortLib", NULL, NULL); if (EFI_ERROR (Status= )) { > + DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for UefiSortLib = API > Tests\n")); > + Status =3D EFI_OUT_OF_RESOURCES; > + goto EXIT; > + } > + > + // > + // > + --------------Suite--------Description------------Name--------------Fu > + nction----------------Pre---Post---Context----------- > + // > + AddTestCase (SortTests, "Sort the Array", "Sort", > SortUINT32ArrayShouldSucceed, NULL, NULL, NULL); > + AddTestCase (SortTests, "Compare the Buffer", "Compare", > CompareSameBufferShouldSucceed, NULL, NULL, NULL); > + > + // > + // Execute the tests. > + // > + Status =3D RunAllTestSuites (Framework); > + > +EXIT: > + if (Framework) { > + FreeUnitTestFramework (Framework); > + } > + > + return Status; > +} > + > +/** > + Standard POSIX C entry point for host based unit test execution. > +**/ > +int > +main ( > + int argc, > + char *argv[] > + ) > +{ > + return UnitTestingEntry (); > +} > -- > 2.20.1.windows.1