From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web08.14784.1627869373616656035 for ; Sun, 01 Aug 2021 18:56:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=m5vksKzh; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: hao.a.wu@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10063"; a="200570761" X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="200570761" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2021 18:56:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="478545336" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga008.fm.intel.com with ESMTP; 01 Aug 2021 18:56:12 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Sun, 1 Aug 2021 18:56:11 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) 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.2242.10; Sun, 1 Aug 2021 18:56:11 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Sun, 1 Aug 2021 18:56:11 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Sun, 1 Aug 2021 18:56:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XiB71XI1ZOZBfAiK8ITYmrqCMcu1ymPN/uxIPjt5YKGy9U+vwVtExA2++vrBwpK7WLdr/9h5RFOACNongWwxFyrz/ld2VgiA59NKcZp7uuET263V+pj3tTHqra32Bub2nQyZ+cmBnDaOsNKl77QQF4S6reToOoFjKTzmj8trFGJ647iLuExy75ZpZfjKsjkChJBnQl5b94y06S+vW8tCAuBou3aUjYwTxamgKq1MT+0/a++yIT11aykY20scZEbeKMbVPVxBTIHmU/wtSbFz5dJdjB9WNE56AxN6Jr1U7yZKs/cWjOZxyFUL3vVq65IfkNDqJ75IOJbwy/rLV8nueg== 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=rMLPU5UBVk7GFz9D9sHC86GNabG6GyX4x87V2hmidm8=; b=jKoosPLU9qiWCns6Oj/VXs2i0C0pfInxf2k9PfhTNANjOXHROox8GsUnpCckCW1LVCOwP2hTclAI+Oh407i+b9tSFVa6HgAuyiWTQjYyx+3TT2g8VdvojC+4IaF0CPi9HwziKTdYpf7DixRadqHybOIKm04EqIFxRQ5Z4dr1cVQw7ZOiF6KeNXJUMAK9V1nNPcegd1txOsK3loa13i0tT75DcVkzRo8/TEbXf6apW9XpFd/kTN2UzClXS2FFk2p8Oi5bGuvtIYhPIIXkcx5+JNS5aSLlOEyVdXIMf1utt00EgUHZasq527QBXFChfc/hQwMiowdnSm0ixAVTHHlYpQ== 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=rMLPU5UBVk7GFz9D9sHC86GNabG6GyX4x87V2hmidm8=; b=m5vksKzhn2wai1Y6vEtjr1oyON0xTO5nAxRdtt5IPURU+A0y9IgnUcy/8+1xnk4a2EUddcr0x6MMNhXfuGkpqcu0wiF+LLg08lZziya37xKqfX3sdsu4O9PsNqO0pjJVmRmqKdSiWxsDWUkkNkuFgurF8q0bavtfReCVNem7LXk= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR11MB4049.namprd11.prod.outlook.com (2603:10b6:405:7f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.26; Mon, 2 Aug 2021 01:56:09 +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.026; Mon, 2 Aug 2021 01:56:09 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , Wenyi Xie CC: "songdongkuang@huawei.com" , "Wang, Jian J" Subject: Re: [edk2-devel] [PATCH EDK2 v2 1/1] MdeModulePkg/UefiSortLib:Add UefiSortLib unit test Thread-Topic: [edk2-devel] [PATCH EDK2 v2 1/1] MdeModulePkg/UefiSortLib:Add UefiSortLib unit test Thread-Index: AQHXhFCY+A90Om5Y5UC1zTkAVbhwTqtZneIAgAXbYPA= Date: Mon, 2 Aug 2021 01:56:09 +0000 Message-ID: References: <1627545672-84944-1-git-send-email-xiewenyi2@huawei.com> <1627545672-84944-2-git-send-email-xiewenyi2@huawei.com> In-Reply-To: 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: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dc325b3a-f6eb-4912-8ef9-08d95558b2f2 x-ms-traffictypediagnostic: BN6PR11MB4049: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UhSY4SvTPpJHm4x7+NXp7eKFN9yqnjI82XLkoTXHMiMpcrTXSE2yqmgcs406LOt/UewRC0iDXmLXJjlWNKDH0VB9QRoGnmnOYtSkPKjVUPJIGWyMCvnKFHbFgQ9h6m1jddl9pWxJX3m96Y4sscmmMtqmbFldIe26Tt6+UI1pYY6ZZP3hU3mmYeaWYRudk2g6kcCeRzv+ihLnw1dtjghaRyK8DCiVBlPCEVnKwD+ZscdryUfYa30/qm6L9rhpLWvsSZO29KoNSZXUtlXYF4r1wNVkje93k0zSWOVz6s2xCBtwoeQ4kWlKbMuvHruY8MQkA6qLAoaptYoQzmZMIqzR1hvupxcb7D19Cnai4ExDbsOnbfb7tV8UEuxIbL3bkj4QwrYVeYuLsWelubVh93dj7WQFomY0aw12bb84Fbtmt4nZ7fc5WeQFJJJfUQRk4iUhEFpu8f/XSCAiKCtjgnwjAVqS5MQrcw/MKavdwO2++RJnN2F+h6G3G+3qmPZawvtuBLB/JFA16C70EqffQtCgHhLkQ8EvV/Gq+bat4Se2o2Tlcj+ztJsHT4gM0TD1idv2aoV1+MyFl5SeNHRfjZ3gCVpzygQpPUKxbCt2C7v/pB2oW+MsbVe7pC7j3lTx+4xSCZajTOBVKqnB5VCpKGRBhCT51XrLyb16IRQTo0MGsU+eL5CqMNXW5q6ArbrQVT4eZVy8+CYKgnm2TCP4q1SNiYqqaiGZtSc6Wj+me2uHGUYJfGlpQPhyavUmhOpNjtMjBRKIR6HBqZDfWmMPZCPqq4B0/Af/6CaN5fHYSxHvvDjthkOiAKsjUe13PGRp4ZvtWMXXOG4bvTVNZ36Zk/0WxQ== 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)(376002)(346002)(366004)(136003)(396003)(39860400002)(122000001)(110136005)(316002)(7696005)(54906003)(38100700002)(71200400001)(83380400001)(9686003)(107886003)(33656002)(4326008)(966005)(55016002)(45080400002)(478600001)(86362001)(76116006)(5660300002)(6506007)(66446008)(64756008)(66556008)(66946007)(66476007)(30864003)(53546011)(8676002)(8936002)(26005)(186003)(52536014)(38070700005)(2906002)(579004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?zV68waTou+UdX5O6Bw+x/YVajCvL2RJ2JLstRgzifpldtBDfQ48p71hgAkj1?= =?us-ascii?Q?fr1NUoU0kBmXNc2ipkzrSZc0KFl3uKB+RWEpFkHrqvNsb7BOq9mHS1DQlpKK?= =?us-ascii?Q?6F+GaRQBIV++zoNyapdWTxFfh653DIzx05gvmr6ll+IZ6QQEDW8UN//GOU2Z?= =?us-ascii?Q?zpvP41z+074A4kP1/ObQPOmtw2YyZjzeNqpg138DnF/2v9xzBf4oDhP2wp2Y?= =?us-ascii?Q?OCeJ5YIvT44rxNM+mwLKvxuW45Y9k2D5BWvefYDkMCdADVgs+iSGN2I0D//d?= =?us-ascii?Q?ZnLXXOXLMKGEI0GJ5w8moWq9s5oq+3YJuk6qFfbcA+9lnQkt35HREqcTNf6g?= =?us-ascii?Q?jcHYxwUas6cuwp2QlgbdC0nGlKbkF6Uzdeox/G5HZDHx2K8N4WLrJITIzzbX?= =?us-ascii?Q?d5luw4xrizSWgQUNb/tqI9lWWuwcyJXIyXsk7KnKjSWWXVvMEEeAPih29Jnk?= =?us-ascii?Q?JGnI+w20De1ikUfYR92GO4O2zPUh+qYbUxBoIvn7O9NODbno83QijpFN8x0Y?= =?us-ascii?Q?80wBMXArhyEYtrZ2pm/h/NAlmVNBKZg+Ks9ugFUPrxlyWMxZHW+vFx/OzJsK?= =?us-ascii?Q?ZspGdfEL51LOvf8cQMvvTBa0zBOTW6a/sF26GZL+NDqZGkj9dQrwNVzlydsk?= =?us-ascii?Q?chciKlgZ2qiecne3hxdRgrIR9fZ7SnMtcbjfDqqjzpgcw6RYN2ZheqpWY1Zr?= =?us-ascii?Q?/+XC6KUevY+d2NUU3kXyrIks9C+fYOdVVBug4HWSv2tOl6RCZr6d8NKLjVJu?= =?us-ascii?Q?woHK68JtG3ZLp+NtoWamIiU0/tClwSonLPaRFlqMzlRrukGgBuZLANP+dPzA?= =?us-ascii?Q?u1ASaH5SkASS5x2b0iQVM91LAGOIj35Uv0YlrZmkWaVWQuWxjJ2lw3oF9ojX?= =?us-ascii?Q?pDXJ5C9qTwcqT/p2YEodO0wHX5+mvTSepnWruQgubPLsSnFm6+o3eOulKIbc?= =?us-ascii?Q?B1OueX7UYox+ee+Cck4l2zhRM6JGqTnAts/8zDY2XGRrzOdu1TDFfs9zRT1h?= =?us-ascii?Q?7Rzb6dYW+SJWTk8shJIxIFdl7ioAnGqXYQoBW10DAHbeQGIIjf06DrADrmaH?= =?us-ascii?Q?KmVc+aUKV/K8qagCkyHuv4WwkHTqA2ObnWm6CRIngj4yOrJwYI1CuD3t8A4V?= =?us-ascii?Q?tWwOqs6oOrenQAlprhtxeLu+av7onPxKGe4JnqcnUbAH9wVyX6G4MfuUI/9X?= =?us-ascii?Q?KYJ2vtU3pI2PJ3uPVWPmS/6SHTe8/vlU8BVsM+kx1PhpdsGHPoLrrBvWtBhm?= =?us-ascii?Q?mkINyhadNLz6CvaPoYgM8w3JG+0birY/sXeILaRtXa/DweAbFAwDpXnX6lmy?= =?us-ascii?Q?l0NrhutPARWzMkt+1ao950Uc?= 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: dc325b3a-f6eb-4912-8ef9-08d95558b2f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2021 01:56:09.6370 (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: CBt6HsCBLGorp74HMOXdrGduiaoMJOWOn1NjOIfoAAyupBbPZii/x8tZjprGZjzLuEXMnzpb9q3oBzI3tz3X0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB4049 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 > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wu, Hao > A > Sent: Thursday, July 29, 2021 4:26 PM > To: Wenyi Xie ; devel@edk2.groups.io; Wang, Jian > J > Cc: songdongkuang@huawei.com > Subject: Re: [edk2-devel] [PATCH EDK2 v2 1/1] > MdeModulePkg/UefiSortLib:Add UefiSortLib unit test >=20 > > -----Original Message----- > > From: Wenyi Xie > > Sent: Thursday, July 29, 2021 4:01 PM > > To: devel@edk2.groups.io; Wang, Jian J ; Wu, > > Hao A > > Cc: songdongkuang@huawei.com; xiewenyi2@huawei.com > > Subject: [PATCH EDK2 v2 1/1] MdeModulePkg/UefiSortLib:Add UefiSortLib > > unit test > > > > Adding two unit test case for UefiSortLib. One is a test on sorting an > > array of > > UINT32 by using PerformQuickSort, another is a test on comparing the > > same buffer by using StringCompare. >=20 >=20 > Thanks. > Reviewed-by: Hao A Wu Sorry, I found that there are a couple of coding format style check failur= es when merging the patch. Could you help to resolve them and then create a test pull request on the = GitHub for verification? Thanks in advance. (I think you can take the case under MdeModulePkg/Universal/Variable/Runti= meDxe/RuntimeDxeUnitTest/ for reference.) Error details: 2021-08-02T01:09:28.5955820Z ##[section]Starting: Build and Test MdeModule= Pkg IA32,X64,ARM,AARCH64,RISCV64 2021-08-02T01:09:28.5960733Z =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 2021-08-02T01:09:28.5961018Z Task : Command Line 2021-08-02T01:09:28.5961258Z Description : Run a command line with argume= nts 2021-08-02T01:09:28.5961502Z Version : 1.1.3 2021-08-02T01:09:28.5961897Z Author : Microsoft Corporation 2021-08-02T01:09:28.5962259Z Help : [More Information](https://go.= microsoft.com/fwlink/?LinkID=3D613735) 2021-08-02T01:09:28.5962678Z =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 2021-08-02T01:09:29.3504946Z (node:3659) Warning: Use Cipheriv for counter= mode of aes-256-ctr 2021-08-02T01:09:29.3510020Z (node:3659) Warning: Use Cipheriv for counter= mode of aes-256-ctr 2021-08-02T01:09:29.3511551Z (node:3659) Warning: Use Cipheriv for counter= mode of aes-256-ctr 2021-08-02T01:09:29.3513605Z (node:3659) Warning: Use Cipheriv for counter= mode of aes-256-ctr 2021-08-02T01:09:29.3516798Z (node:3659) Warning: Use Cipheriv for counter= mode of aes-256-ctr 2021-08-02T01:09:29.3517536Z (node:3659) Warning: Use Cipheriv for counter= mode of aes-256-ctr 2021-08-02T01:09:29.3518178Z (node:3659) Warning: Use Cipheriv for counter= mode of aes-256-ctr 2021-08-02T01:09:29.3545461Z [command]/opt/hostedtoolcache/Python/3.8.11/x= 64/bin/stuart_ci_build -c .pytool/CISettings.py -p MdeModulePkg -t RELEASE,= NO-TARGET -a IA32,X64,ARM,AARCH64,RISCV64 TOOL_CHAIN_TAG=3DGCC5 2021-08-02T01:09:29.3546707Z SECTION - Init SDE 2021-08-02T01:09:29.3547571Z WARNING - Using Pip Tools based BaseTools 2021-08-02T01:09:29.3548395Z SECTION - Loading Plugins 2021-08-02T01:09:29.3549212Z SECTION - Start Invocable Tool 2021-08-02T01:09:29.3550018Z SECTION - Getting Environment 2021-08-02T01:09:29.3550794Z SECTION - Loading plugins 2021-08-02T01:09:29.3551675Z SECTION - Building MdeModulePkg Package 2021-08-02T01:09:29.3552693Z PROGRESS - --Running MdeModulePkg: EccCheck T= est NO-TARGET -- 2021-08-02T01:09:33.0697006Z ERROR -=20 2021-08-02T01:09:33.0698018Z ERROR - EFI coding style error 2021-08-02T01:09:33.0698748Z ERROR - *Error code: 5007 2021-08-02T01:09:33.0700631Z ERROR - *There should be no initialization of= a variable as part of its declaration 2021-08-02T01:09:33.0702675Z ERROR - *file: //home/vsts/work/1/s/MdeModule= Pkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c 2021-08-02T01:09:33.0703421Z ERROR - *Line number: 77 2021-08-02T01:09:33.0703929Z ERROR - *Variable Name: TestCount 2021-08-02T01:09:33.0715684Z ERROR -=20 2021-08-02T01:09:33.0716634Z ERROR - EFI coding style error 2021-08-02T01:09:33.0717372Z ERROR - *Error code: 5007 2021-08-02T01:09:33.0718214Z ERROR - *There should be no initialization of= a variable as part of its declaration 2021-08-02T01:09:33.0719195Z ERROR - *file: //home/vsts/work/1/s/MdeModule= Pkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c 2021-08-02T01:09:33.0720631Z ERROR - *Line number: 78 2021-08-02T01:09:33.0721451Z ERROR - *Variable Name: TestBuffer 2021-08-02T01:09:33.0722114Z ERROR -=20 2021-08-02T01:09:33.0724953Z ERROR - EFI coding style error 2021-08-02T01:09:33.0725713Z ERROR - *Error code: 5007 2021-08-02T01:09:33.0726562Z ERROR - *There should be no initialization of= a variable as part of its declaration 2021-08-02T01:09:33.0727526Z ERROR - *file: //home/vsts/work/1/s/MdeModule= Pkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c 2021-08-02T01:09:33.0728345Z ERROR - *Line number: 79 2021-08-02T01:09:33.0729046Z ERROR - *Variable Name: TestResult 2021-08-02T01:09:33.0729694Z ERROR -=20 2021-08-02T01:09:33.0732496Z ERROR - EFI coding style error 2021-08-02T01:09:33.0733224Z ERROR - *Error code: 7001 2021-08-02T01:09:33.0734114Z ERROR - *There should be no use of int, unsig= ned, char, void, long in any .c, .h or .asl files 2021-08-02T01:09:33.0737620Z ERROR - *file: //home/vsts/work/1/s/MdeModule= Pkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c 2021-08-02T01:09:33.0739185Z ERROR - *Line number: 117 2021-08-02T01:09:33.0741301Z ERROR - *[main] Return type int 2021-08-02T01:09:33.0744099Z ERROR -=20 2021-08-02T01:09:33.0744829Z ERROR - EFI coding style error 2021-08-02T01:09:33.0745459Z ERROR - *Error code: 7001 2021-08-02T01:09:33.0746821Z ERROR - *There should be no use of int, unsig= ned, char, void, long in any .c, .h or .asl files 2021-08-02T01:09:33.0747774Z ERROR - *file: //home/vsts/work/1/s/MdeModule= Pkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c 2021-08-02T01:09:33.0749076Z ERROR - *Line number: 117 2021-08-02T01:09:33.0749713Z ERROR - *Parameter argc 2021-08-02T01:09:33.0750999Z ERROR -=20 2021-08-02T01:09:33.0751607Z ERROR - EFI coding style error 2021-08-02T01:09:33.0754599Z ERROR - *Error code: 7001 2021-08-02T01:09:33.0761175Z ERROR - *There should be no use of int, unsig= ned, char, void, long in any .c, .h or .asl files 2021-08-02T01:09:33.0762167Z ERROR - *file: //home/vsts/work/1/s/MdeModule= Pkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c 2021-08-02T01:09:33.0763160Z ERROR - *Line number: 117 2021-08-02T01:09:33.0763741Z ERROR - *Parameter argv 2021-08-02T01:09:33.0764290Z ERROR -=20 2021-08-02T01:09:33.0764843Z ERROR - EFI coding style error 2021-08-02T01:09:33.0766810Z ERROR - *Error code: 8006 2021-08-02T01:09:33.0767819Z ERROR - *Function name does not follow the ru= les: 1. First character should be upper case 2. Must contain lower case cha= racters 3. No white space characters 2021-08-02T01:09:33.0768881Z ERROR - *file: //home/vsts/work/1/s/MdeModule= Pkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c 2021-08-02T01:09:33.0769619Z ERROR - *Line number: 181 2021-08-02T01:09:33.0773329Z ERROR - *The function name [main] does not fo= llow the rules 2021-08-02T01:09:33.0791935Z ERROR -=20 2021-08-02T01:09:33.0793865Z ERROR - EFI coding style error 2021-08-02T01:09:33.0794555Z ERROR - *Error code: 9002 2021-08-02T01:09:33.0795350Z ERROR - *The function headers should follow D= oxygen special documentation blocks in section 2.3.5 2021-08-02T01:09:33.0796271Z ERROR - *file: //home/vsts/work/1/s/MdeModule= Pkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c 2021-08-02T01:09:33.0796985Z ERROR - *Line number: 178 2021-08-02T01:09:33.0797610Z ERROR - *No doxygen tags in comment 2021-08-02T01:09:33.0798208Z ERROR -=20 2021-08-02T01:09:33.0798859Z ERROR - --->Test Failed: EccCheck Test NO-TAR= GET returned 1 2021-08-02T01:09:33.0807351Z PROGRESS - --Running MdeModulePkg: Dsc Comple= te Check Test NO-TARGET -- 2021-08-02T01:09:33.1524790Z PROGRESS - --->Test Success: Dsc Complete Che= ck Test NO-TARGET 2021-08-02T01:09:33.1536004Z PROGRESS - --Running MdeModulePkg: Char Encod= ing Check Test NO-TARGET -- 2021-08-02T01:09:33.6280380Z PROGRESS - --->Test Success: Char Encoding Ch= eck Test NO-TARGET 2021-08-02T01:09:33.6289076Z PROGRESS - --Running MdeModulePkg: License Ch= eck Test NO-TARGET -- 2021-08-02T01:09:33.6495642Z PROGRESS - --->Test Success: License Check Te= st NO-TARGET 2021-08-02T01:09:33.6508125Z PROGRESS - --Running MdeModulePkg: Compiler P= lugin RELEASE -- 2021-08-02T01:09:33.6785178Z PROGRESS - Start time: 2021-08-02 01:09:33.67= 7952 2021-08-02T01:09:33.6787716Z PROGRESS - Setting up the Environment 2021-08-02T01:09:33.7725244Z PROGRESS - Running Pre Build 2021-08-02T01:09:33.7740357Z PROGRESS - Running Build RELEASE 2021-08-02T01:17:18.5479885Z PROGRESS - Running Post Build 2021-08-02T01:17:18.5511807Z PROGRESS - End time: 2021-08-02 01:17:18.5499= 74 Total time Elapsed: 0:07:44 2021-08-02T01:17:18.5512997Z PROGRESS - --->Test Success: Compiler Plugin = RELEASE 2021-08-02T01:17:18.5519284Z PROGRESS - --Running MdeModulePkg: Library Cl= ass Check Test NO-TARGET -- 2021-08-02T01:17:18.5639216Z PROGRESS - --->Test Success: Library Class Ch= eck Test NO-TARGET 2021-08-02T01:17:18.5648791Z PROGRESS - --Running MdeModulePkg: Dependency= Check Test NO-TARGET -- 2021-08-02T01:17:18.7306611Z PROGRESS - --->Test Success: Dependency Check= Test NO-TARGET 2021-08-02T01:17:18.7316162Z PROGRESS - --Running MdeModulePkg: Spell Chec= k Test NO-TARGET -- 2021-08-02T01:17:23.7922166Z WARNING - --->Test Skipped: in plugin! Spell = Check Test NO-TARGET 2021-08-02T01:17:23.7934112Z PROGRESS - --Running MdeModulePkg: Guid Check= Test NO-TARGET -- 2021-08-02T01:17:27.1928850Z PROGRESS - --->Test Success: Guid Check Test = NO-TARGET 2021-08-02T01:17:27.1939129Z PROGRESS - --Running MdeModulePkg: Host Unit = Test Dsc Complete Check Test NO-TARGET -- 2021-08-02T01:17:27.3703640Z PROGRESS - --->Test Success: Host Unit Test D= sc Complete Check Test NO-TARGET 2021-08-02T01:17:27.3731676Z ERROR - Overall Build Status: Error 2021-08-02T01:17:27.3733283Z PROGRESS - There were 1 failures out of 10 at= tempts 2021-08-02T01:17:27.3734501Z SECTION - Summary 2021-08-02T01:17:27.3735613Z ERROR - Error 2021-08-02T01:17:27.4159842Z ##[error]/opt/hostedtoolcache/Python/3.8.11/x= 64/bin/stuart_ci_build failed with return code: 1 2021-08-02T01:17:27.4173134Z ##[error]/opt/hostedtoolcache/Python/3.8.11/x= 64/bin/stuart_ci_build failed with error: /opt/hostedtoolcache/Python/3.8.1= 1/x64/bin/stuart_ci_build failed with return code: 1 2021-08-02T01:17:27.4178252Z ##[section]Finishing: Build and Test MdeModul= ePkg IA32,X64,ARM,AARCH64,RISCV64 Best Regards, Hao Wu >=20 > I will wait a couple days before merging to see if any additional commen= t > from other reviewers. >=20 > Best Regards, > Hao Wu >=20 >=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 | 1= 88 > > ++++++++++++++++++++ > > 3 files changed, 226 insertions(+) > > > > 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] > > > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdAllowVariablePolicyEnforcementDis > > able|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/UefiSortLibUnitTest.inf > > b/MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.inf > > new file mode 100644 > > index 000000000000..85d8dcd69619 > > --- /dev/null > > +++ > b/MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.in > > +++ f > > @@ -0,0 +1,32 @@ > > +## @file > > +# This is a unit test for the UefiSortLib. > > +# > > +# Copyright (C) Huawei Technologies Co., Ltd. All rights reserved # > > +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 > > +the > > 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/UefiSortLibUnitTest.c > > b/MdeModulePkg/Library/UefiSortLib/UnitTest/UefiSortLibUnitTest.c > > new file mode 100644 > > index 000000000000..71f30d8b9f7f > > --- /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 enable= s: > > + 1) test-case reuse with varied parameters an= d > > + 2) test-case re-entry for Target tests that = need a > > + reboot. This parameter is a VOID* and it is= the > > + responsibility of the test author to ensure = that the > > + contents are well understood by all test cas= es that may > > + consume it. > > + > > + @retval UNIT_TEST_PASSED The Unit test has completed a= nd 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 enable= s: > > + 1) test-case reuse with varied parameters an= d > > + 2) test-case re-entry for Target tests that = need a > > + reboot. This parameter is a VOID* and it is= the > > + responsibility of the test author to ensure = that the > > + contents are well understood by all test cas= es that may > > + consume it. > > + > > + @retval UNIT_TEST_PASSED The Unit test has completed a= nd 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 > > available 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; > > + } > > + > > + // > > + // Populate the UefiSortLib Unit Test Suite. > > + // > > + Status =3D CreateUnitTestSuite (&SortTests, Framework, "UefiSortLib > > + Sort Tests", "UefiSortLib.SortLib", NULL, NULL); if (EFI_ERROR (Sta= tus)) { > > + 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 >=20 >=20 >=20 >=20 >=20