[edk2-devel] [edk2-test] [PATCH] uefi-sct/SctPkg: StrUpr() test for cyrillic letters

Eric Jin eric.jin at intel.com
Fri Sep 6 03:53:47 UTC 2019


Pushed at cce43fc3ae30d343964fe02f09242ec8604eb44b

-----Original Message-----
From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Eric Jin
Sent: Tuesday, September 3, 2019 3:43 PM
To: Heinrich Schuchardt <xypron.glpk at gmx.de>; devel at edk2.groups.io
Cc: Supreeth Venkatesh <supreeth.venkatesh at arm.com>; Stephano Cetola <stephano.cetola at linux.intel.com>
Subject: Re: [edk2-devel] [edk2-test] [PATCH] uefi-sct/SctPkg: StrUpr() test for cyrillic letters

Reviewed-by: Eric Jin <eric.jin at intel.com>

-----Original Message-----
From: Heinrich Schuchardt <xypron.glpk at gmx.de> 
Sent: Monday, September 2, 2019 5:57 PM
To: devel at edk2.groups.io
Cc: Jin, Eric <eric.jin at intel.com>; Supreeth Venkatesh <supreeth.venkatesh at arm.com>; Stephano Cetola <stephano.cetola at linux.intel.com>; Heinrich Schuchardt <xypron.glpk at gmx.de>
Subject: [edk2-test] [PATCH] uefi-sct/SctPkg: StrUpr() test for cyrillic letters

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1911

The test of StrUpr() of the UnicodeCollationProtocol2 uses the following test string:

L"\x30\x50[A-D]\x40\x20\x30\x50f\x40\x20"

This string contains the Unicode code point 0x050f (CYRILLIC SMALL LETTER KOMI TJE). The correct conversion to upper case is 0x050e (CYRILLIC CAPITAL LETTER KOMI TJE).

The SCT code uses function ToUpper() which is not a part of the SCT code itself for the verification. As the EDK2 implementation of StrUpr() does not support upper-casing cyrillic letters it does not convert 0x050f but leaves it unchanged.

This leads to rejecting the output of UEFI implementations fully supporting cyrillic letters.

Replace cyrillic 0x50f by 0x50 ('P') to avoid false positives.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 .../BlackBoxTest/UnicodeCollation2BBTestFunction.c              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/BlackBoxTest/UnicodeCollation2BBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/BlackBoxTest/UnicodeCollation2BBTestFunction.c
index a8652a5c..653b263a 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/BlackBoxTest/UnicodeCollation2BBTestFunction.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/Black
+++ BoxTest/UnicodeCollation2BBTestFunction.c
@@ -451,7 +451,7 @@ BBTestStrUprFunctionAutoTest (
   CHAR16                               *TestData[] ={                                              L"\x21\x22\x31\x32\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5Ax61\x62\x7D\x7E",                                              L"\x30\x50[abcdzyxw!)(@#*]\x40\x20\x30\x50\ab\x40\x20",-                                             L"\x30\x50[A-D]\x40\x20\x30\x50f\x40\x20",+                                             L"\x30\x50[A-D]\x40\x20\x30\x50\x40\x20",                                              L""                                         }; -- 
2.20.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46958): https://edk2.groups.io/g/devel/message/46958
Mute This Topic: https://groups.io/mt/33109522/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list