[edk2-devel] [PATCH 1/1] uefi-sct/SctPkg: format string BBTestFatToStrFunctionAutoTest

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Jan 1 19:52:27 UTC 2021


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

EFI_UNICODE_COLLATION_PROTOCOL.FatToStr() expects as parameter Fat an ASCII
string not a wide string.

In function BBTestFatToStrFunctionAutoTest() this string is supplied as
TestData[Index].

When printing this string we cannot use "%s" but we must use "%a".

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 .../BlackBoxTest/UnicodeCollation2BBTestFunction.c          | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 8bf5170f..22b57f21 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
@@ -636,7 +636,7 @@ BBTestFatToStrFunctionAutoTest (
                    AssertionType,
                    gUnicodeCollationFunctionTestAssertionGuid007,
                    L"EFI_UNICODE_COLLATION_PROTOCOL.FatToStr - Verification of FatToStr interface",
-                   L"%a:%d: Fat='%s', FatToStr='%s', FatSize=%d, StrSize=%d",
+                   L"%a:%d: Fat='%a', FatToStr='%s', FatSize=%d, StrSize=%d",
                    __FILE__,
                    (UINTN)__LINE__,
                    TestData[Index],
@@ -668,7 +668,7 @@ BBTestFatToStrFunctionAutoTest (
                      AssertionType,
                      gUnicodeCollationFunctionTestAssertionGuid008,
                      L"EFI_UNICODE_COLLATION_PROTOCOL.FatToStr - Verification of FatToStr interface",
-                     L"%a:%d: Fat='%s', FatToStr='%s', FatSize=%d, StrSize=%d",
+                     L"%a:%d: Fat='%a', FatToStr='%s', FatSize=%d, StrSize=%d",
                      __FILE__,
                      (UINTN)__LINE__,
                      TestData[Index],
@@ -701,7 +701,7 @@ BBTestFatToStrFunctionAutoTest (
                      AssertionType,
                      gUnicodeCollationFunctionTestAssertionGuid009,
                      L"EFI_UNICODE_COLLATION_PROTOCOL.FatToStr - Verification of FatToStr interface",
-                     L"%a:%d: Fat='%s', FatToStr='%s', FatSize=%d, StrSize=%d",
+                     L"%a:%d: Fat='%a', FatToStr='%s', FatSize=%d, StrSize=%d",
                      __FILE__,
                      (UINTN)__LINE__,
                      TestData[Index],
--
2.29.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69512): https://edk2.groups.io/g/devel/message/69512
Mute This Topic: https://groups.io/mt/79364715/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