From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.134]) by mx.groups.io with SMTP id smtpd.web12.671.1585070273817727869 for ; Tue, 24 Mar 2020 10:17:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=RasILdQl; spf=pass (domain: microsoft.com, ip: 40.107.243.134, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c1Sy/yLphuljxp6jf1wPLZKUS+8FUij002KAQRn1ANhmCp/feS4wIcrnSm1PObxfeoVa5v0YcmlmJYSYjUhKzHJjUTCj5EcRp+FcE9MXTKiYQaxnfB6/Ph/dG7HP1V4QqilGrTifegsKL72SgFjVvDlzS9JUGdNpMtuV07L5VZ/vL06OMuD6M2UVFfjDg2iqC04uTz+OVsekeH0IEviyIyEUbUBfpe4hN11uaLd33Kps8lmSf7rtbNaU+sq22nsojQm0/xXrtLjFcxIwBQqh379g9KS9QyPTNjCZFBpTzOnQWFdJMP6CVi7cG5z/HQE5DsDb8Ihfwn26HeOmnV+GPw== 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=10V6k2fDG+XNYndflR27uOQRnVOh/DaY7QEJXhpduLw=; b=MQjfriuutJY/UBnPDXXaI+nlvwgEvsNMCnxSfxq7MDCpMa08LTuINVgAN4d4m1QwHge99TxblVYLKKVeeQ8W+VSlYMNDY/I1PKZqjBtvMrBcMS8QVHQoPqFkfdfLUex+826IBzqyZTA8ayf2/tnYgCxt9iLrK6X1C48m3sjP13aCFN/QUf+sdrhiq4kdnKS61zdeQ2Xe/xQScNaHqvu/GDiRKYKsQpaK2YMCp/4TnWS0Ds4yG5Rod0TnJay6vTMxez2YOd8b9Rt49I9zIHqIMruikz3Zv7YwwjaTuyid9gHcGmHQ612nNi0uSnAJqztI0LwBDhPB/996O0bGghmK4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=10V6k2fDG+XNYndflR27uOQRnVOh/DaY7QEJXhpduLw=; b=RasILdQlJGt8xxNX5Z8Xd1YtxOvqkAsu0P/M49tkJt8sFTskr8cw5JzgAkwuhDnuqsHhKMrUvEJfDpIJK6oEytgTXh/d1JNv0PHZH41Vjbt+4DZiiNH96GFvKXqoPVh0N55A/LJyBSz3GMu4pW6vOdlrrzmGNxSadmWOc9/l+04= Received: from CY4PR21MB0743.namprd21.prod.outlook.com (2603:10b6:903:b2::9) by CY4PR21MB0776.namprd21.prod.outlook.com (2603:10b6:903:b8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.2; Tue, 24 Mar 2020 17:17:50 +0000 Received: from CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318]) by CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318%10]) with mapi id 15.20.2878.000; Tue, 24 Mar 2020 17:17:50 +0000 From: "Bret Barkelew" To: "devel@edk2.groups.io" , "Kinney, Michael D" , "Jiang, Guomin" , "Zhang, Shenglei" , "newexplorerj@gmail.com" CC: Sean Brogan Subject: Re: [edk2-devel] [PATCH] UnitTestFrameworkPkg: Invalid index may be used. Thread-Topic: [edk2-devel] [PATCH] UnitTestFrameworkPkg: Invalid index may be used. Thread-Index: AQHV8frTSwyHrL88C0ywCYLac+6RMahVy4CAgADCu4CAAY4Klw== Date: Tue, 24 Mar 2020 17:17:50 +0000 Message-ID: References: <02ae08887ff10e981ee247a74ce2e89eb1a4d747.1582162590.git.newexplorerj@gmail.com> , In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-03-24T17:17:36.9242544Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bret.Barkelew@microsoft.com; x-originating-ip: [71.212.145.195] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 32ca3fde-2631-4b6c-ab5a-08d7d01747da x-ms-traffictypediagnostic: CY4PR21MB0776:|CY4PR21MB0776:|CY4PR21MB0776: x-ms-exchange-transport-forked: True x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 03524FBD26 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(4636009)(396003)(366004)(376002)(39860400002)(346002)(136003)(91956017)(66446008)(66556008)(7696005)(55016002)(8936002)(8676002)(8990500004)(81156014)(6506007)(53546011)(110136005)(4326008)(52536014)(81166006)(5660300002)(478600001)(9686003)(966005)(66476007)(33656002)(64756008)(76116006)(26005)(71200400001)(107886003)(66946007)(10290500003)(316002)(86362001)(2906002)(186003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0776;H:CY4PR21MB0743.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tovfqW6UB1LkODFZkIrDW7SDRZhNCimfsxYFXVIGEEdaF/UIludNzfHLBKD7qFLQJs/jKJV1HIO00WmqyBW0aQ9VIi620uL74iaOx/PNDB6/qDLAWfCZq6ngxWvkvKJoZliC9t1IAPP36o79V51wcWQQex940By2HAVWDLSHoCVc0GDr8u7ken7TTWtt7SX8CmsV1vMnJdwjt5ko/8HYJeK/MsG0vg/g3+uJ11Fil6vcecFJYVWF13AipxdzI+YUqXJ8tFnhANVk6risY3ICMa634GO2OpWFbO777nYDoOlFyZTrrLUvNbt/S7uSZds7bCLESbuJXrKZVBtgInE4JpA+QOSIam+45SGjieiWEiP9App1KP13mZVZpgxZWheCUhj2o5xCV5ylnMQGdI4Hva/FxqxlKKkjOAfq7/vKbCu88mm8c/23wkLbZ9dfuD4LP3YJ5468LjUxJIk95iUO5jYrBtbUECO0n/zMgap1fiQbH7WQ7qOqnIIyNAOJwuCpXZ18lrItR49a+WC/wNtpTw== x-ms-exchange-antispam-messagedata: XEKd084MCiQ8coB5X77X9/peRllwFjjPoM3GHI4KJn8xktM4he6rQelHB+NWuWYJkYXZiAewEdnFWPf2MrVmWJj8COWNGqzyNr1wvWa2k1hE/okcGe/EORja0NopgTxbMVlUgQa9gmxo/GnjukAnhA== MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32ca3fde-2631-4b6c-ab5a-08d7d01747da X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2020 17:17:50.3293 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: edi6jIKPGc9yCTY/IcrbRRrqh06AsIk4bxfIXEGuuC7Nz60MSJjYU9FXGQsVSEzbGTLppv2Og4tZyZVnrAviRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0776 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR21MB0743B8A435E2646E5E5EE667EFF10CY4PR21MB0743namp_" --_000_CY4PR21MB0743B8A435E2646E5E5EE667EFF10CY4PR21MB0743namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bret Barkelew - Bret ________________________________ From: devel@edk2.groups.io on behalf of Michael D K= inney via Groups.Io Sent: Monday, March 23, 2020 10:32:59 AM To: Jiang, Guomin ; devel@edk2.groups.io ; Zhang, Shenglei ; newexplorerj@gma= il.com ; Kinney, Michael D Cc: Sean Brogan ; Bret Barkelew Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] UnitTestFrameworkPkg: Invalid= index may be used. Reviewed-by: Michael D Kinney Mike > -----Original Message----- > From: Jiang, Guomin > Sent: Sunday, March 22, 2020 10:56 PM > To: devel@edk2.groups.io; Zhang, Shenglei > ; newexplorerj@gmail.com > Cc: Kinney, Michael D ; > sean.brogan@microsoft.com; Bret.Barkelew@microsoft.com > Subject: RE: [edk2-devel] [PATCH] UnitTestFrameworkPkg: > Invalid index may be used. > > Hi Michael, Sean, Bret, > > Could help review the patch? > > Thanks > > -----Original Message----- > > From: devel@edk2.groups.io > [mailto:devel@edk2.groups.io] On Behalf Of > > Zhang, Shenglei > > Sent: Wednesday, March 4, 2020 3:59 PM > > To: devel@edk2.groups.io; newexplorerj@gmail.com > > Subject: Re: [edk2-devel] [PATCH] > UnitTestFrameworkPkg: Invalid index may > > be used. > > > > Reviewed-by: Shenglei Zhang > > > > > > -----Original Message----- > > > From: devel@edk2.groups.io > [mailto:devel@edk2.groups.io] On Behalf Of > > > GuoMinJ > > > Sent: Thursday, February 20, 2020 9:42 AM > > > To: devel@edk2.groups.io > > > Cc: GuoMinJ > > > Subject: [edk2-devel] [PATCH] UnitTestFrameworkPkg: > Invalid index may > > > be used. > > > > > > REF: > https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugz= illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D2535&data=3D02%7C01%7CBret.Bar= kelew%40microsoft.com%7C6e119160718c41dd8bea08d7cf503d05%7C72f988bf86f141af= 91ab2d7cd011db47%7C1%7C0%7C637205815839534686&sdata=3DG5r02YNEXW3PG%2BJ= UsOg9A5BrKdqpkdlJHceyK4Gkd1Y%3D&reserved=3D0 > > > > > > The UINT_TEST_STATUS and FAILURE_TYPE have used 0 > as status, so use 0 > > > as unknown is confused, remove it from array > enumeration but keep it > > > location in the array. > > > > > > Signed-off-by: GuoMinJ > > > --- > > > > .../Library/UnitTestResultReportLib/UnitTestResultRepor > tLib.c | 4 > > > ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git > > > > > > a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/ > UnitTestResultR > > > eportLib.c > > > > > > b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/ > UnitTestResultR > > > eportLib.c > > > index 687a04f55d..eba68e330c 100644 > > > --- > > > > > > a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/ > UnitTestResultR > > > eportLib.c > > > +++ > > > > > > b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/ > UnitTestResultR > > > eportLib.c > > > @@ -65,7 +65,7 @@ GetStringForUnitTestStatus ( { > > > UINTN Index; > > > > > > - for (Index =3D 0; Index < ARRAY_SIZE > (mStatusStrings); Index++) { > > > + for (Index =3D 0; Index < ARRAY_SIZE > (mStatusStrings) - 1; Index++) { > > > if (mStatusStrings[Index].Status =3D=3D Status) { > > > // > > > // Return string from matching entry @@ - > 87,7 +87,7 @@ > > > GetStringForFailureType ( { > > > UINTN Index; > > > > > > - for (Index =3D 0; Index < ARRAY_SIZE > (mFailureTypeStrings); Index++) > > > { > > > + for (Index =3D 0; Index < ARRAY_SIZE > (mFailureTypeStrings) - 1; > > > + Index++) { > > > if (mFailureTypeStrings[Index].Type =3D=3D > Failure) { > > > // > > > // Return string from matching entry > > > -- > > > 2.17.1 > > > > > > > > > > > > > > > --_000_CY4PR21MB0743B8A435E2646E5E5EE667EFF10CY4PR21MB0743namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Reviewed-by: Bret Barkelew <bret.barkelew@micros= oft.com>

 

- Bret

 


From: devel@edk2.groups.io= <devel@edk2.groups.io> on behalf of Michael D Kinney via Groups.Io &= lt;michael.d.kinney=3Dintel.com@groups.io>
Sent: Monday, March 23, 2020 10:32:59 AM
To: Jiang, Guomin <guomin.jiang@intel.com>; devel@edk2.groups= .io <devel@edk2.groups.io>; Zhang, Shenglei <shenglei.zhang@intel.= com>; newexplorerj@gmail.com <newexplorerj@gmail.com>; Kinney, Mic= hael D <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew &l= t;Bret.Barkelew@microsoft.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] UnitTestFrameworkPkg: = Invalid index may be used.
 
Reviewed-by: Michael D Kinney <michael.d.kinne= y@intel.com>

Mike

> -----Original Message-----
> From: Jiang, Guomin <guomin.jiang@intel.com>
> Sent: Sunday, March 22, 2020 10:56 PM
> To: devel@edk2.groups.io; Zhang, Shenglei
> <shenglei.zhang@intel.com>; newexplorerj@gmail.com
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>;
> sean.brogan@microsoft.com; Bret.Barkelew@microsoft.com
> Subject: RE: [edk2-devel] [PATCH] UnitTestFrameworkPkg:
> Invalid index may be used.
>
> Hi Michael, Sean, Bret,
>
> Could help review the patch?
>
> Thanks
> > -----Original Message-----
> > From: devel@edk2.groups.io
> [mailto:devel@edk2.groups.io<= /a>] On Behalf Of
> > Zhang, Shenglei
> > Sent: Wednesday, March 4, 2020 3:59 PM
> > To: devel@edk2.groups.io; newexplorerj@gmail.com
> > Subject: Re: [edk2-devel] [PATCH]
> UnitTestFrameworkPkg: Invalid index may
> > be used.
> >
> > Reviewed-by: Shenglei Zhang
> <shenglei.zhang@intel.com>
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io
> [
mailto:devel@edk2.groups.io<= /a>] On Behalf Of
> > > GuoMinJ
> > > Sent: Thursday, February 20, 2020 9:42 AM
> > > To: devel@edk2.groups.io
> > > Cc: GuoMinJ <newexplorerj@gmail.com>
> > > Subject: [edk2-devel] [PATCH] UnitTestFrameworkPkg:
> Invalid index may
> > > be used.
> > >
> > > REF:
>
https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugzil= la.tianocore.org%2Fshow_bug.cgi%3Fid%3D2535&amp;data=3D02%7C01%7CBret.B= arkelew%40microsoft.com%7C6e119160718c41dd8bea08d7cf503d05%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637205815839534686&amp;sdata=3DG5r02YNEXW3= PG%2BJUsOg9A5BrKdqpkdlJHceyK4Gkd1Y%3D&amp;reserved=3D0
> > >
> > > The UINT_TEST_STATUS and FAILURE_TYPE have used 0
> as status, so use 0
> > > as unknown is confused, remove it from array
> enumeration but keep it
> > > location in the array.
> > >
> > > Signed-off-by: GuoMinJ <newexplorerj@gmail.com>
> > > ---
> > >
> .../Library/UnitTestResultReportLib/UnitTestResultRepor
> tLib.c | 4
> > > ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-) > > >
> > > diff --git
> > >
> >
> a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/
> UnitTestResultR
> > > eportLib.c
> > >
> >
> b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/
> UnitTestResultR
> > > eportLib.c
> > > index 687a04f55d..eba68e330c 100644
> > > ---
> > >
> >
> a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/
> UnitTestResultR
> > > eportLib.c
> > > +++
> > >
> >
> b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/
> UnitTestResultR
> > > eportLib.c
> > > @@ -65,7 +65,7 @@ GetStringForUnitTestStatus (  {<= br> > > >    UINTN  Index;
> > >
> > > -  for (Index =3D 0; Index < ARRAY_SIZE
> (mStatusStrings); Index++) {
> > > +  for (Index =3D 0; Index < ARRAY_SIZE
> (mStatusStrings) - 1; Index++) {
> > >      if (mStatusStrings[Index].Sta= tus =3D=3D Status) {
> > >        //
> > >        // Return string = from matching entry @@ -
> 87,7 +87,7 @@
> > > GetStringForFailureType (  {
> > >    UINTN  Index;
> > >
> > > -  for (Index =3D 0; Index < ARRAY_SIZE
> (mFailureTypeStrings); Index++)
> > > {
> > > +  for (Index =3D 0; Index < ARRAY_SIZE
> (mFailureTypeStrings) - 1;
> > > + Index++) {
> > >      if (mFailureTypeStrings[Index= ].Type =3D=3D
> Failure) {
> > >        //
> > >        // Return string = from matching entry
> > > --
> > > 2.17.1
> > >
> > >
> > >
> >
> >
> >




--_000_CY4PR21MB0743B8A435E2646E5E5EE667EFF10CY4PR21MB0743namp_--