[PATCH 1/1] test: print_printf() must check availability of %ls
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Sun Nov 3 21:46:42 CET 2024
Availability of %ls in printf() depends on having
CONFIG_EFI_LOADER or CONFIG_EFI_APP.
Respect this when testing.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
test/print_ut.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/print_ut.c b/test/print_ut.c
index f5e607b21a3..bffd446f6c0 100644
--- a/test/print_ut.c
+++ b/test/print_ut.c
@@ -118,8 +118,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));
--
2.45.2
More information about the U-Boot
mailing list