[PATCH v2 2/4] unit-test: cover run_commandf() by test-cases

Simon Glass sjg at chromium.org
Mon Mar 20 19:40:09 CET 2023


On Mon, 20 Mar 2023 at 21:23, Evgeny Bachinin <EABachinin at sberdevices.ru> wrote:
>
> As run_commandf() is variadic version of run_command() and just a wrapper,
> hence apply similar run_command's test-cases.
>
> Let's avoid warning about empty string passing:
> warning: zero-length gnu_printf format string [-Wformat-zero-length]
>    assert(run_commandf("") == 0);
>
> Signed-off-by: Evgeny Bachinin <EABachinin at sberdevices.ru>
> ---
> Changes for v2:
> - s/EINVAL/ENOSPC/
> - rewrite test-case for truncation case
> - not apply Reviewed-by due to changes above
>
>  test/command_ut.c | 34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list