public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] uefi-sct/SctPkg: format string BBTestFatToStrFunctionAutoTest
@ 2021-01-01 19:52 Heinrich Schuchardt
  2021-01-05 15:13 ` G Edhaya Chandran
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2021-01-01 19:52 UTC (permalink / raw)
  To: EDK II Development
  Cc: Eric Jin, G Edhaya Chandran, Barton Gao, Arvin Chen,
	Samer El-Haj-Mahmoud, Heinrich Schuchardt

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] uefi-sct/SctPkg: format string BBTestFatToStrFunctionAutoTest
  2021-01-01 19:52 [PATCH 1/1] uefi-sct/SctPkg: format string BBTestFatToStrFunctionAutoTest Heinrich Schuchardt
@ 2021-01-05 15:13 ` G Edhaya Chandran
  0 siblings, 0 replies; 2+ messages in thread
From: G Edhaya Chandran @ 2021-01-05 15:13 UTC (permalink / raw)
  To: Heinrich Schuchardt, EDK II Development
  Cc: Eric Jin, Barton Gao, Arvin Chen, Samer El-Haj-Mahmoud

Reviewed-By: G Edhaya Chandran <edhaya.chandran@arm.com>

> -----Original Message-----
> From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Sent: 02 January 2021 01:22
> To: EDK II Development <devel@edk2.groups.io>
> Cc: Eric Jin <eric.jin@intel.com>; G Edhaya Chandran
> <Edhaya.Chandran@arm.com>; Barton Gao <gaojie@byosoft.com.cn>; Arvin
> Chen <arvinx.chen@intel.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; Heinrich Schuchardt <xypron.glpk@gmx.de>
> Subject: [PATCH 1/1] uefi-sct/SctPkg: format string
> BBTestFatToStrFunctionAutoTest
>
> 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@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/Unicod
> eCollation2BBTestFunction.c b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/BlackBoxTest/Unicod
> eCollation2BBTestFunction.c
> index 8bf5170f..22b57f21 100644
> --- a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/BlackBoxTest/Unicod
> eCollation2BBTestFunction.c
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UnicodeCollation2/Black
> +++ BoxTest/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

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-05 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-01 19:52 [PATCH 1/1] uefi-sct/SctPkg: format string BBTestFatToStrFunctionAutoTest Heinrich Schuchardt
2021-01-05 15:13 ` G Edhaya Chandran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox