public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Heinrich Schuchardt" <xypron.glpk@gmx.de>
To: devel@edk2.groups.io
Cc: Eric Jin <eric.jin@intel.com>,
	Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
	Stephano Cetola <stephano.cetola@linux.intel.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: [edk2-test] [PATCH] uefi-sct/SctPkg: StrUpr() test for cyrillic letters
Date: Mon,  2 Sep 2019 11:56:51 +0200	[thread overview]
Message-ID: <20190902095651.4585-1-xypron.glpk@gmx.de> (raw)

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@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/BlackBoxTest/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


             reply	other threads:[~2019-09-02  9:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02  9:56 Heinrich Schuchardt [this message]
2019-09-03  7:42 ` [edk2-test] [PATCH] uefi-sct/SctPkg: StrUpr() test for cyrillic letters Eric Jin
     [not found] ` <15C0DDD5C482E821.17907@groups.io>
2019-09-06  3:53   ` [edk2-devel] " Eric Jin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190902095651.4585-1-xypron.glpk@gmx.de \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox