Re: [PATCH 2/3] kunit: tool: fix minor typing issue with None status
From: David Gow
Date: Thu Dec 03 2020 - 23:17:52 EST
On Fri, Dec 4, 2020 at 3:41 AM Daniel Latypov <dlatypov@xxxxxxxxxx> wrote:
>
This seems good to me, but I have a few questions, particularly around
the description.
> The code to handle aggregating statuses didn't check that the status
> actually got set.
I don't understand what you mean here. Does this refer to
Test{Case,Suite}::status potentially being None, and that not being
supported properly in bubble_up_{suite_,test_case_,}errors(), or
something else? Either way, I can't see any additional code to "check"
that the status has been set. As far as I can tell everything except
the default to SUCCESS is a no-op, or am I missing something?
> Default the value to SUCCESS.
I'm a little iffy about defaulting this to success, but I think it's
okay for now: the skip test support will eventually change this to a
SKIPPED value.
>
> This sorta follows the precedent in commit 3fc48259d525 ("kunit: Don't
> fail test suites if one of them is empty").
>
> Also slightly simplify the code and add type annotations.
>
> Signed-off-by: Daniel Latypov <dlatypov@xxxxxxxxxx>
> ---
Otherwise, the actual code changes all seem sensible, and it worked
fine when I tested it, so:
Reviewed-by: David Gow <davidgow@xxxxxxxxxx>
-- David