diff options
| author | Heinrich Schuchardt <[email protected]> | 2024-11-03 21:46:42 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-11-14 18:14:06 -0600 |
| commit | 20b23f049f869cc696f5a6d318fa00a61196a209 (patch) | |
| tree | ab7dcccb3405df824ac33cc864fb75deabba38d1 /test/common | |
| parent | d8c5bcbd224fddd983f0796886409ede880d11ac (diff) | |
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 <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'test/common')
| -rw-r--r-- | test/common/print.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/common/print.c b/test/common/print.c index f1eb9072d97..464e425edee 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)); |
