Re: [PATCH v2 1/3] kunit: tool: readability tweaks in KernelCI json generation logic

From: Brendan Higgins
Date: Wed Mar 23 2022 - 17:21:04 EST


On Thu, Feb 24, 2022 at 2:20 PM Daniel Latypov <dlatypov@xxxxxxxxxx> wrote:
>
> Use a more idiomatic check that a list is non-empty (`if mylist:`) and
> simplify the function body by dedenting and using a dict to map between
> the kunit TestStatus enum => KernelCI json status string.
>
> The dict hopefully makes it less likely to have bugs like commit
> 9a6bb30a8830 ("kunit: tool: fix --json output for skipped tests").
>
> Signed-off-by: Daniel Latypov <dlatypov@xxxxxxxxxx>
> Reviewed-by: David Gow <davidgow@xxxxxxxxxx>

Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx>