Re: [RFC PATCH v2 21/21] test: hush: Fix loop tests for hush 2021

Marek Behún
2022-02-06T19:07:26Z

On Sun, 6 Feb 2022 19:37:17 +0100
Francis Laniel <francis.laniel@amarulasolutions.com> wrote:

> Modifies return code got from while loop as hush 2021 always returns 0 from
> while loop.
>
> Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> test/hush/loop.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/test/hush/loop.c b/test/hush/loop.c
> index 519c78ef7e..56aae719dc 100644
> --- a/test/hush/loop.c
> +++ b/test/hush/loop.c
> @@ -20,7 +20,12 @@ static int hush_test_for(struct unit_test_state *uts)
> ut_assert_nextline("quux");
> ut_assert_console_end();
>
> +#if CONFIG_IS_ENABLED(HUSH_2021_PARSER)

No macro. Use ordinary if-else statements please.

Marek