From: Heinrich Schuchardt Date: Sun, 3 Nov 2024 20:46:42 +0000 (+0100) Subject: test: print_printf() must check availability of %ls X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-logo.png?a=commitdiff_plain;h=20b23f049f869cc696f5a6d318fa00a61196a209;p=u-boot.git test: print_printf() must check availability of %ls Availability of %ls in printf() depends on having CONFIG_EFI_LOADER or CONFIG_EFI_APP. Respect this when testing. Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- diff --git a/test/common/print.c b/test/common/print.c index f1eb9072d9..464e425ede 100644 --- a/test/common/print.c +++ b/test/common/print.c @@ -115,8 +115,10 @@ static int print_printf(struct unit_test_state *uts) snprintf(str, 0, "testing none"); ut_asserteq('x', *str); - sprintf(big_str, "_%ls_", u"foo"); - ut_assertok(strcmp("_foo_", big_str)); + if (CONFIG_IS_ENABLED(EFI_LOADER) || IS_ENABLED(CONFIG_EFI_APP)) { + sprintf(big_str, "_%ls_", u"foo"); + ut_assertok(strcmp("_foo_", big_str)); + } /* Test the banner function */ s = display_options_get_banner(true, str, sizeof(str));