From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by mx.groups.io with SMTP id smtpd.web12.70.1600812809735883763 for ; Tue, 22 Sep 2020 15:13:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=n1 header.b=NO7/Qdv9; spf=pass (domain: nvidia.com, ip: 216.228.121.65, mailfrom: jbrasen@nvidia.com) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 22 Sep 2020 15:13:16 -0700 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 22 Sep 2020 22:13:29 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.103) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 22 Sep 2020 22:13:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f59aBZrzQjkAZnIF9taJrsOeW1Wj5Ld/nPkURLI2ZHqm3xFM+h0eIkgURfXbntHZhZva+kjlBWmPomBK+yEzxW8mVP9VbsTZkKezSMtOEAlVkmA3AIWgoSthFmEQjYZqy8vYkJ9th+ZlyiO2xraAefFbOrae9wa42lRz/9/feuzxDuimEUsf+kRgTSx4UaFOOG0epmZDRDgvHZbgaQD3hlSpNT+gmwzg5jZBLGh9x6wOOhyo7d8MtHy+D4PCzSxPWBrtMmVEMCcc1GpFuHAR9a42FXd3YdxoP82ti6axEl/gWH1/2PU/kLuIkWQP3cLjVUROtnNJCBqleh4kamUL+g== 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=NV1Lz1CDm8fdJvFa2UWqSezIuDAcVJz+xnu0DQ7s2oY=; b=Y+Uf3O8wY036ZFzgndk/WwACIBimP9vyfkBix5LBkdsbKciKvzEqaekzkqI01GTTgJo0Xgqr2ibe4ULQ6q6AbEX/ydBweEnYwbyuKzObT9G2/ZeNlIsaztSVH7dVjBGJlBzOgkMmqi5W9XSdi6ygoyxtRZl0UX+OFt5WkbjfGdUvsoFLQLqGvJCgnEBLHb/u9IYHVAaRtqZln5EmIfoYJiMMPh3OyeDGPlTYtQCbQT5eBi6NsTMCjLJ/Qcswkr2WXe520ZLzVD9iphDCqH2euoGkAwHuKv2cNJ0uNQMUVrtdyAC8ss64wpkG00UnhEbQCmvrUKnCV8cMucZWtpmbeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB3340.namprd12.prod.outlook.com (20.178.199.88) by DM6PR12MB2874.namprd12.prod.outlook.com (20.179.71.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.24; Tue, 22 Sep 2020 22:13:28 +0000 Received: from DM6PR12MB3340.namprd12.prod.outlook.com ([fe80::1876:2f8f:fcae:4bf8]) by DM6PR12MB3340.namprd12.prod.outlook.com ([fe80::1876:2f8f:fcae:4bf8%5]) with mapi id 15.20.3391.025; Tue, 22 Sep 2020 22:13:28 +0000 From: "Jeff Brasen" To: "devel@edk2.groups.io" Subject: Re: [PATCH] uefi-sct/SctPkg: Correct issue with memory protection enabled. Thread-Topic: [PATCH] uefi-sct/SctPkg: Correct issue with memory protection enabled. Thread-Index: AQHWiGBbN7IwCEvN9EeKUFCsDYJgF6l1SmF/ Date: Tue, 22 Sep 2020 22:13:27 +0000 Message-ID: References: <4d637a44c99f0aaa8d78b2def96114d7dc3b1bb6.1599844750.git.jbrasen@nvidia.com> In-Reply-To: <4d637a44c99f0aaa8d78b2def96114d7dc3b1bb6.1599844750.git.jbrasen@nvidia.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [2601:281:8100:1241:4d79:4253:57e4:4cb5] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e827515f-485e-4ce7-1db5-08d85f44bb7f x-ms-traffictypediagnostic: DM6PR12MB2874: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1751; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iYdR/0ToHsKqpSsRB0E6P8fOzwDg6II3G8ae4iYuQJW1CYEH6dC5x4BSTWTw7AVMOK7+OZvNk7GXl5/NQEeGVGBqw8SOe5D3JsGKnq71oUzsNn/UaeSG2FqtIDkdIuprM5w+opXn7Iu9D6c63KoeDIvuA9k5dkNPLbZ4bGKOvGmhFzMZgENhYYLv1yAIoGy63kVI05QzTfNzxEeE4nRZU93b3yKVppyAv1nPLy67eV3/S3Z2Y1nbTwwGQwtVlBPnpJMyyJtpOulTYeV/yk3012rcQhGsz/q5pT+WMLH6AG46yEQz0qalxSod6YTr8hbE+2a2Qq8joE3SlR8lWYoR0A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB3340.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39850400004)(396003)(346002)(366004)(136003)(376002)(71200400001)(316002)(2906002)(19627405001)(83380400001)(55016002)(478600001)(6506007)(7696005)(52536014)(66556008)(66476007)(66446008)(66946007)(76116006)(64756008)(6916009)(9686003)(8936002)(33656002)(53546011)(86362001)(5660300002)(8676002)(186003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: P/PrwvdJVOtqk0h2x1ripr/V4ZnrX6Xv582RdxJsH+axnBj8caP7Ijef2/IWnUv8KSq4zeBdO2lxC17IkxHx7LaS6qSU+B2EB7CNLl+Hg7fpSmG08JwKWjFRS6gnvc9VuWgkIjbzb66PFRYESQV224YBF6yjFJRxXOwSuBFhER3tij/JLIqGQPZh9CjKC4anripqzjEOPRjQCNiLYulhvNHDO8lyRtEPisuM74d9fgGm7CYIstx2MJWTE3RhHtQmP/fbLgfcx+WQo+KvxCw+001IDi8YyAoybHeu1PrC2e+sJWIGTGlq5ci6E/BNrteIPQOpCyXORz/tBlxquwxv4HhzrzcYxHIMfiXcANNuls9KpkIKho65DsZTArizFsx7BqCSkN8/LAHvVgsMzb7rXROnRaQkAuP+3cb/iUVfUZhOlClFhwbKoBGM81xAdqQD/3F/0Gl93Cm3jZo0kqrOgtTUP51wGgpV3r/9nD8AlNo7ot+i2w6LH5d1apJUGrH1NpZryzSxgGcFeRqOTCWhdP/5irqDyXfSfWJYSRvuDfmvQBk8whfJZv3I8eO+AXRmtrdoyxujgPck7m5J262C+oyHA6wifDXQvdGaPa8rB7yzyT8bW5E8MhHz/v9kLsrMrn2FkVusrlqhtFLLXbf9Y7Vnoa4bq54/CCnW2Qh28IEjDGWrYeuy+PRw961F0MFbMBf+cXGFKxODdECguZGslQ== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3340.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e827515f-485e-4ce7-1db5-08d85f44bb7f X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 22:13:27.9261 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5ril3wuR+7Ot68MhTMj7oJO/xqYfR3ArSVFD2o1av7s0Uuc0rRrLYxIbDdo0fepDS9DI04vldCvd1fb5Lfq7qg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2874 Return-Path: jbrasen@nvidia.com X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1600812796; bh=NV1Lz1CDm8fdJvFa2UWqSezIuDAcVJz+xnu0DQ7s2oY=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: x-ms-exchange-transport-forked:Content-Type:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=NO7/Qdv92WO3izuW6dJqNrjvgxOMMt+5rmGKri0QMzrMCSQ0+iTcZ6R/lgb7rubFh 55IWdDUAn21mIK1oa3YlSBPBAsNvIw0sDQDWz9RKG0YwXHvQXSUAAPAcaKcA5U9HvL I4iFs5cMb0s6Gda5+tingCPAklyiNOfkhjnXi2w1I6mViZjpkOtkFduAciBomCzBBW tiqMWUD9nhKZiML1DNTXODKor0cTcO74Yczv0cLoFnsZj+087qatrrWXc2B65U89Vp hogAV3jgH6/+VgiYNz/z6wS72rHP7Fc4LB+d4aOu/MKoANgJzTF8Tl2kfk2kkN6b/B szBlQ4s2/2teg== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM6PR12MB33408428FA3D46BECD089992CB3B0DM6PR12MB3340namp_" --_000_DM6PR12MB33408428FA3D46BECD089992CB3B0DM6PR12MB3340namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Any comments on this change? Thanks, Jeff ________________________________ From: Jeff Brasen Sent: Friday, September 11, 2020 11:23 AM To: devel@edk2.groups.io Cc: Jeff Brasen Subject: [PATCH] uefi-sct/SctPkg: Correct issue with memory protection enab= led. On systems with memory protection enabled the modification of local function initialization data results in permission issue. Make a copy of data prior to modification. Signed-off-by: Jeff Brasen --- .../UnicodeCollationBBTestFunction.c | 38 ++++++++++--------- .../UnicodeCollation2BBTestFunction.c | 38 ++++++++++--------- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation/Bl= ackBoxTest/UnicodeCollationBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI= /EFI/Protocol/UnicodeCollation/BlackBoxTest/UnicodeCollationBBTestFunction.= c index 6fa11e6c..e0b4c1d9 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation/BlackBoxT= est/UnicodeCollationBBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation/BlackBoxT= est/UnicodeCollationBBTestFunction.c @@ -25,7 +25,7 @@ Abstract: --*/ -#include "SctLib.h" +#include "SctLib.h" #include "UnicodeCollationBBTestMain.h" @@ -337,6 +337,7 @@ BBTestStrLwrFunctionAutoTest ( }; CHAR16 TestDataSav[MAX_SIZE_OF_STRING + 1]= ; + CHAR16 TestDataRw[MAX_SIZE_OF_STRING + 1]; @@ -368,14 +369,15 @@ BBTestStrLwrFunctionAutoTest ( // // Backup current test data // + CopyUnicodeString (TestDataRw, TestData[Index]); CopyUnicodeString (TestDataSav, TestData[Index]); // // For each test data, test the StrLwr functionality. // - UnicodeCollation->StrLwr (UnicodeCollation, TestData[Index]); + UnicodeCollation->StrLwr (UnicodeCollation, TestDataRw); - if (CheckStrLwr (TestDataSav, TestData[Index])) { + if (CheckStrLwr (TestDataSav, TestDataRw)) { AssertionType =3D EFI_TEST_ASSERTION_PASSED; } else { AssertionType =3D EFI_TEST_ASSERTION_FAILED; @@ -390,15 +392,15 @@ BBTestStrLwrFunctionAutoTest ( __FILE__, (UINTN)__LINE__, TestDataSav, - TestData[Index] + TestDataRw ); - CopyUnicodeString (TestDataSav, TestData[Index]); - UnicodeCollation->StrUpr (UnicodeCollation, TestData[Index]); - UnicodeCollation->StrLwr (UnicodeCollation, TestData[Index]); + CopyUnicodeString (TestDataSav, TestDataRw); + UnicodeCollation->StrUpr (UnicodeCollation, TestDataRw); + UnicodeCollation->StrLwr (UnicodeCollation, TestDataRw); - if (CheckStrEql (TestDataSav, TestData[Index])) { + if (CheckStrEql (TestDataSav, TestDataRw)) { AssertionType =3D EFI_TEST_ASSERTION_PASSED; } else { AssertionType =3D EFI_TEST_ASSERTION_FAILED; @@ -413,7 +415,7 @@ BBTestStrLwrFunctionAutoTest ( __FILE__, (UINTN)__LINE__, TestDataSav, - TestData[Index] + TestDataRw ); }; @@ -458,6 +460,7 @@ BBTestStrUprFunctionAutoTest ( }; CHAR16 TestDataSav[MAX_SIZE_OF_STRING + 1]= ; + CHAR16 TestDataRw[MAX_SIZE_OF_STRING + 1]; @@ -490,13 +493,14 @@ BBTestStrUprFunctionAutoTest ( // Backup current test data // CopyUnicodeString (TestDataSav, TestData[Index]); + CopyUnicodeString (TestDataRw, TestData[Index]); // // For each test data, test the StrUpr functionality. // - UnicodeCollation->StrUpr (UnicodeCollation, TestData[Index]); + UnicodeCollation->StrUpr (UnicodeCollation, TestDataRw); - if (CheckStrUpr (TestDataSav, TestData[Index])) { + if (CheckStrUpr (TestDataSav, TestDataRw)) { AssertionType =3D EFI_TEST_ASSERTION_PASSED; } else { AssertionType =3D EFI_TEST_ASSERTION_FAILED; @@ -511,14 +515,14 @@ BBTestStrUprFunctionAutoTest ( __FILE__, (UINTN)__LINE__, TestDataSav, - TestData[Index] + TestDataRw ); - CopyUnicodeString (TestDataSav, TestData[Index]); - UnicodeCollation->StrLwr (UnicodeCollation, TestData[Index]); - UnicodeCollation->StrUpr (UnicodeCollation, TestData[Index]); + CopyUnicodeString (TestDataSav, TestDataRw); + UnicodeCollation->StrLwr (UnicodeCollation, TestDataRw); + UnicodeCollation->StrUpr (UnicodeCollation, TestDataRw); - if (CheckStrEql (TestDataSav, TestData[Index])) { + if (CheckStrEql (TestDataSav, TestDataRw)) { AssertionType =3D EFI_TEST_ASSERTION_PASSED; } else { AssertionType =3D EFI_TEST_ASSERTION_FAILED; @@ -533,7 +537,7 @@ BBTestStrUprFunctionAutoTest ( __FILE__, (UINTN)__LINE__, TestDataSav, - TestData[Index] + TestDataRw ); }; diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/B= lackBoxTest/UnicodeCollation2BBTestFunction.c b/uefi-sct/SctPkg/TestCase/UE= FI/EFI/Protocol/UnicodeCollation2/BlackBoxTest/UnicodeCollation2BBTestFunct= ion.c index 653b263a..19ff6764 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/BlackBox= Test/UnicodeCollation2BBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/BlackBox= Test/UnicodeCollation2BBTestFunction.c @@ -25,7 +25,7 @@ Abstract: --*/ -#include "SctLib.h" +#include "SctLib.h" #include "UnicodeCollation2BBTestMain.h" STATIC CONST STRICOLL_TEST_DATA_FIELD mStriCollTestData[] =3D{ @@ -335,6 +335,7 @@ BBTestStrLwrFunctionAutoTest ( }; CHAR16 TestDataSav[MAX_SIZE_OF_STRING + 1]= ; + CHAR16 TestDataRw[MAX_SIZE_OF_STRING + 1]; @@ -367,13 +368,14 @@ BBTestStrLwrFunctionAutoTest ( // Backup current test data // CopyUnicodeString (TestDataSav, TestData[Index]); + CopyUnicodeString (TestDataRw, TestData[Index]); // // For each test data, test the StrLwr functionality. // - UnicodeCollation->StrLwr (UnicodeCollation, TestData[Index]); + UnicodeCollation->StrLwr (UnicodeCollation, TestDataRw); - if (CheckStrLwr (TestDataSav, TestData[Index])) { + if (CheckStrLwr (TestDataSav, TestDataRw)) { AssertionType =3D EFI_TEST_ASSERTION_PASSED; } else { AssertionType =3D EFI_TEST_ASSERTION_FAILED; @@ -388,15 +390,15 @@ BBTestStrLwrFunctionAutoTest ( __FILE__, (UINTN)__LINE__, TestDataSav, - TestData[Index] + TestDataRw ); - CopyUnicodeString (TestDataSav, TestData[Index]); - UnicodeCollation->StrUpr (UnicodeCollation, TestData[Index]); - UnicodeCollation->StrLwr (UnicodeCollation, TestData[Index]); + CopyUnicodeString (TestDataSav, TestDataRw); + UnicodeCollation->StrUpr (UnicodeCollation, TestDataRw); + UnicodeCollation->StrLwr (UnicodeCollation, TestDataRw); - if (CheckStrEql (TestDataSav, TestData[Index])) { + if (CheckStrEql (TestDataSav, TestDataRw)) { AssertionType =3D EFI_TEST_ASSERTION_PASSED; } else { AssertionType =3D EFI_TEST_ASSERTION_FAILED; @@ -411,7 +413,7 @@ BBTestStrLwrFunctionAutoTest ( __FILE__, (UINTN)__LINE__, TestDataSav, - TestData[Index] + TestDataRw ); }; @@ -456,6 +458,7 @@ BBTestStrUprFunctionAutoTest ( }; CHAR16 TestDataSav[MAX_SIZE_OF_STRING + 1]= ; + CHAR16 TestDataRw[MAX_SIZE_OF_STRING + 1]; @@ -488,13 +491,14 @@ BBTestStrUprFunctionAutoTest ( // Backup current test data // CopyUnicodeString (TestDataSav, TestData[Index]); + CopyUnicodeString (TestDataRw, TestData[Index]); // // For each test data, test the StrUpr functionality. // - UnicodeCollation->StrUpr (UnicodeCollation, TestData[Index]); + UnicodeCollation->StrUpr (UnicodeCollation, TestDataRw); - if (CheckStrUpr (TestDataSav, TestData[Index])) { + if (CheckStrUpr (TestDataSav, TestDataRw)) { AssertionType =3D EFI_TEST_ASSERTION_PASSED; } else { AssertionType =3D EFI_TEST_ASSERTION_FAILED; @@ -509,14 +513,14 @@ BBTestStrUprFunctionAutoTest ( __FILE__, (UINTN)__LINE__, TestDataSav, - TestData[Index] + TestDataRw ); - CopyUnicodeString (TestDataSav, TestData[Index]); - UnicodeCollation->StrLwr (UnicodeCollation, TestData[Index]); - UnicodeCollation->StrUpr (UnicodeCollation, TestData[Index]); + CopyUnicodeString (TestDataSav, TestDataRw); + UnicodeCollation->StrLwr (UnicodeCollation, TestDataRw); + UnicodeCollation->StrUpr (UnicodeCollation, TestDataRw); - if (CheckStrEql (TestDataSav, TestData[Index])) { + if (CheckStrEql (TestDataSav, TestDataRw)) { AssertionType =3D EFI_TEST_ASSERTION_PASSED; } else { AssertionType =3D EFI_TEST_ASSERTION_FAILED; @@ -531,7 +535,7 @@ BBTestStrUprFunctionAutoTest ( __FILE__, (UINTN)__LINE__, TestDataSav, - TestData[Index] + TestDataRw ); }; -- 2.25.1 --_000_DM6PR12MB33408428FA3D46BECD089992CB3B0DM6PR12MB3340namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Any comments on this change?

Thanks,

Jeff


From: Jeff Brasen <jbras= en@nvidia.com>
Sent: Friday, September 11, 2020 11:23 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Subject: [PATCH] uefi-sct/SctPkg: Correct issue with memory protecti= on enabled.
 
On systems with memory protection enabled the modi= fication of local
function initialization data results in permission issue. Make a copy of data prior to modification.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
---
 .../UnicodeCollationBBTestFunction.c     &nb= sp;    | 38 ++++++++++---------
 .../UnicodeCollation2BBTestFunction.c     &n= bsp;   | 38 ++++++++++---------
 2 files changed, 42 insertions(+), 34 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation/Bl= ackBoxTest/UnicodeCollationBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI= /EFI/Protocol/UnicodeCollation/BlackBoxTest/UnicodeCollationBBTestFunction.= c
index 6fa11e6c..e0b4c1d9 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation/BlackBoxT= est/UnicodeCollationBBTestFunction.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation/BlackBoxT= est/UnicodeCollationBBTestFunction.c
@@ -25,7 +25,7 @@ Abstract:
 --*/

 

 

-#include "SctLib.h"
+#include "SctLib.h"

 #include "UnicodeCollationBBTestMain.h"

 

 

@@ -337,6 +337,7 @@ BBTestStrLwrFunctionAutoTest (
            &nb= sp;            =             &nb= sp;   };

 

   CHAR16         &n= bsp;            = ;         TestDataSav[MAX_SIZE_OF_S= TRING + 1];

+  CHAR16          &= nbsp;           &nbs= p;        TestDataRw[MAX_SIZE_OF_STRING = + 1];

 

 

 

@@ -368,14 +369,15 @@ BBTestStrLwrFunctionAutoTest (
     //

     // Backup current test data

     //

+    CopyUnicodeString (TestDataRw, TestData[Index]);

     CopyUnicodeString (TestDataSav, TestData[Index]);<= br>
 

     //

     // For each test data, test the StrLwr functionali= ty.

     //

-    UnicodeCollation->StrLwr (UnicodeCollation, TestData= [Index]);

+    UnicodeCollation->StrLwr (UnicodeCollation, TestData= Rw);

 

-    if (CheckStrLwr (TestDataSav, TestData[Index])) {

+    if (CheckStrLwr (TestDataSav, TestDataRw)) {

       AssertionType =3D EFI_TEST_ASSERTION_P= ASSED;

     } else {

       AssertionType =3D EFI_TEST_ASSERTION_F= AILED;

@@ -390,15 +392,15 @@ BBTestStrLwrFunctionAutoTest (
            &nb= sp;       __FILE__,

            &nb= sp;       (UINTN)__LINE__,

            &nb= sp;       TestDataSav,

-            &n= bsp;      TestData[Index]

+            &n= bsp;      TestDataRw

            &nb= sp;       );

 

 

-    CopyUnicodeString (TestDataSav, TestData[Index]);

-    UnicodeCollation->StrUpr (UnicodeCollation, TestData= [Index]);

-    UnicodeCollation->StrLwr (UnicodeCollation, TestData= [Index]);

+    CopyUnicodeString (TestDataSav, TestDataRw);

+    UnicodeCollation->StrUpr (UnicodeCollation, TestData= Rw);

+    UnicodeCollation->StrLwr (UnicodeCollation, TestData= Rw);

 

-    if (CheckStrEql (TestDataSav, TestData[Index])) {

+    if (CheckStrEql (TestDataSav, TestDataRw)) {

       AssertionType =3D EFI_TEST_ASSERTION_P= ASSED;

     } else {

       AssertionType =3D EFI_TEST_ASSERTION_F= AILED;

@@ -413,7 +415,7 @@ BBTestStrLwrFunctionAutoTest (
            &nb= sp;       __FILE__,

            &nb= sp;       (UINTN)__LINE__,

            &nb= sp;       TestDataSav,

-            &n= bsp;      TestData[Index]

+            &n= bsp;      TestDataRw

            &nb= sp;       );

   };

 

@@ -458,6 +460,7 @@ BBTestStrUprFunctionAutoTest (
            &nb= sp;            =             &nb= sp;   };

 

   CHAR16         &n= bsp;            = ;         TestDataSav[MAX_SIZE_OF_S= TRING + 1];

+  CHAR16          &= nbsp;           &nbs= p;        TestDataRw[MAX_SIZE_OF_STRING = + 1];

 

 

 

@@ -490,13 +493,14 @@ BBTestStrUprFunctionAutoTest (
     // Backup current test data

     //

     CopyUnicodeString (TestDataSav, TestData[Index]);<= br>
+    CopyUnicodeString (TestDataRw, TestData[Index]);

 

     //

     // For each test data, test the StrUpr functionali= ty.

     //

-    UnicodeCollation->StrUpr (UnicodeCollation, TestData= [Index]);

+    UnicodeCollation->StrUpr (UnicodeCollation, TestData= Rw);

 

-    if (CheckStrUpr (TestDataSav, TestData[Index])) {

+    if (CheckStrUpr (TestDataSav, TestDataRw)) {

       AssertionType =3D EFI_TEST_ASSERTION_P= ASSED;

     } else {

       AssertionType =3D EFI_TEST_ASSERTION_F= AILED;

@@ -511,14 +515,14 @@ BBTestStrUprFunctionAutoTest (
            &nb= sp;       __FILE__,

            &nb= sp;       (UINTN)__LINE__,

            &nb= sp;       TestDataSav,

-            &n= bsp;      TestData[Index]

+            &n= bsp;      TestDataRw

            &nb= sp;       );

 

-    CopyUnicodeString (TestDataSav, TestData[Index]);

-    UnicodeCollation->StrLwr (UnicodeCollation, TestData= [Index]);

-    UnicodeCollation->StrUpr (UnicodeCollation, TestData= [Index]);

+    CopyUnicodeString (TestDataSav, TestDataRw);

+    UnicodeCollation->StrLwr (UnicodeCollation, TestData= Rw);

+    UnicodeCollation->StrUpr (UnicodeCollation, TestData= Rw);

 

-    if (CheckStrEql (TestDataSav, TestData[Index])) {

+    if (CheckStrEql (TestDataSav, TestDataRw)) {

       AssertionType =3D EFI_TEST_ASSERTION_P= ASSED;

     } else {

       AssertionType =3D EFI_TEST_ASSERTION_F= AILED;

@@ -533,7 +537,7 @@ BBTestStrUprFunctionAutoTest (
            &nb= sp;       __FILE__,

            &nb= sp;       (UINTN)__LINE__,

            &nb= sp;       TestDataSav,

-            &n= bsp;      TestData[Index]

+            &n= bsp;      TestDataRw

            &nb= sp;       );

   };

 

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/B= lackBoxTest/UnicodeCollation2BBTestFunction.c b/uefi-sct/SctPkg/TestCase/UE= FI/EFI/Protocol/UnicodeCollation2/BlackBoxTest/UnicodeCollation2BBTestFunct= ion.c
index 653b263a..19ff6764 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/BlackBox= Test/UnicodeCollation2BBTestFunction.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/BlackBox= Test/UnicodeCollation2BBTestFunction.c
@@ -25,7 +25,7 @@ Abstract:
 --*/

 

 

-#include "SctLib.h"
+#include "SctLib.h"

 #include "UnicodeCollation2BBTestMain.h"

 

 STATIC CONST STRICOLL_TEST_DATA_FIELD     &n= bsp;       mStriCollTestData[] =3D{

@@ -335,6 +335,7 @@ BBTestStrLwrFunctionAutoTest (
            &nb= sp;            =             &nb= sp;   };

 

   CHAR16         &n= bsp;            = ;         TestDataSav[MAX_SIZE_OF_S= TRING + 1];

+  CHAR16          &= nbsp;           &nbs= p;        TestDataRw[MAX_SIZE_OF_STRING = + 1];

 

 

 

@@ -367,13 +368,14 @@ BBTestStrLwrFunctionAutoTest (
     // Backup current test data

     //

     CopyUnicodeString (TestDataSav, TestData[Index]);<= br>
+    CopyUnicodeString (TestDataRw, TestData[Index]);

 

     //

     // For each test data, test the StrLwr functionali= ty.

     //

-    UnicodeCollation->StrLwr (UnicodeCollation, TestData= [Index]);

+    UnicodeCollation->StrLwr (UnicodeCollation, TestData= Rw);

 

-    if (CheckStrLwr (TestDataSav, TestData[Index])) {

+    if (CheckStrLwr (TestDataSav, TestDataRw)) {

       AssertionType =3D EFI_TEST_ASSERTION_P= ASSED;

     } else {

       AssertionType =3D EFI_TEST_ASSERTION_F= AILED;

@@ -388,15 +390,15 @@ BBTestStrLwrFunctionAutoTest (
            &nb= sp;       __FILE__,

            &nb= sp;       (UINTN)__LINE__,

            &nb= sp;       TestDataSav,

-            &n= bsp;      TestData[Index]

+            &n= bsp;      TestDataRw

            &nb= sp;       );

 

 

-    CopyUnicodeString (TestDataSav, TestData[Index]);

-    UnicodeCollation->StrUpr (UnicodeCollation, TestData= [Index]);

-    UnicodeCollation->StrLwr (UnicodeCollation, TestData= [Index]);

+    CopyUnicodeString (TestDataSav, TestDataRw);

+    UnicodeCollation->StrUpr (UnicodeCollation, TestData= Rw);

+    UnicodeCollation->StrLwr (UnicodeCollation, TestData= Rw);

 

-    if (CheckStrEql (TestDataSav, TestData[Index])) {

+    if (CheckStrEql (TestDataSav, TestDataRw)) {

       AssertionType =3D EFI_TEST_ASSERTION_P= ASSED;

     } else {

       AssertionType =3D EFI_TEST_ASSERTION_F= AILED;

@@ -411,7 +413,7 @@ BBTestStrLwrFunctionAutoTest (
            &nb= sp;       __FILE__,

            &nb= sp;       (UINTN)__LINE__,

            &nb= sp;       TestDataSav,

-            &n= bsp;      TestData[Index]

+            &n= bsp;      TestDataRw

            &nb= sp;       );

   };

 

@@ -456,6 +458,7 @@ BBTestStrUprFunctionAutoTest (
            &nb= sp;            =             &nb= sp;   };

 

   CHAR16         &n= bsp;            = ;         TestDataSav[MAX_SIZE_OF_S= TRING + 1];

+  CHAR16          &= nbsp;           &nbs= p;        TestDataRw[MAX_SIZE_OF_STRING = + 1];

 

 

 

@@ -488,13 +491,14 @@ BBTestStrUprFunctionAutoTest (
     // Backup current test data

     //

     CopyUnicodeString (TestDataSav, TestData[Index]);<= br>
+    CopyUnicodeString (TestDataRw, TestData[Index]);

 

     //

     // For each test data, test the StrUpr functionali= ty.

     //

-    UnicodeCollation->StrUpr (UnicodeCollation, TestData= [Index]);

+    UnicodeCollation->StrUpr (UnicodeCollation, TestData= Rw);

 

-    if (CheckStrUpr (TestDataSav, TestData[Index])) {

+    if (CheckStrUpr (TestDataSav, TestDataRw)) {

       AssertionType =3D EFI_TEST_ASSERTION_P= ASSED;

     } else {

       AssertionType =3D EFI_TEST_ASSERTION_F= AILED;

@@ -509,14 +513,14 @@ BBTestStrUprFunctionAutoTest (
            &nb= sp;       __FILE__,

            &nb= sp;       (UINTN)__LINE__,

            &nb= sp;       TestDataSav,

-            &n= bsp;      TestData[Index]

+            &n= bsp;      TestDataRw

            &nb= sp;       );

 

-    CopyUnicodeString (TestDataSav, TestData[Index]);

-    UnicodeCollation->StrLwr (UnicodeCollation, TestData= [Index]);

-    UnicodeCollation->StrUpr (UnicodeCollation, TestData= [Index]);

+    CopyUnicodeString (TestDataSav, TestDataRw);

+    UnicodeCollation->StrLwr (UnicodeCollation, TestData= Rw);

+    UnicodeCollation->StrUpr (UnicodeCollation, TestData= Rw);

 

-    if (CheckStrEql (TestDataSav, TestData[Index])) {

+    if (CheckStrEql (TestDataSav, TestDataRw)) {

       AssertionType =3D EFI_TEST_ASSERTION_P= ASSED;

     } else {

       AssertionType =3D EFI_TEST_ASSERTION_F= AILED;

@@ -531,7 +535,7 @@ BBTestStrUprFunctionAutoTest (
            &nb= sp;       __FILE__,

            &nb= sp;       (UINTN)__LINE__,

            &nb= sp;       TestDataSav,

-            &n= bsp;      TestData[Index]

+            &n= bsp;      TestDataRw

            &nb= sp;       );

   };

 

--
2.25.1

--_000_DM6PR12MB33408428FA3D46BECD089992CB3B0DM6PR12MB3340namp_--