Skip to content
Commit 384426bd authored by David Gow's avatar David Gow Committed by Shuah Khan
Browse files

kunit: Fix result propagation for parameterised tests



When one parameter of a parameterised test failed, its failure would be
propagated to the overall test, but not to the suite result (unless it
was the last parameter).

This is because test_case->success was being reset to the test->success
result after each parameter was used, so a failing test's result would
be overwritten by a non-failing result. The overall test result was
handled in a third variable, test_result, but this was discarded after
the status line was printed.

Instead, just propagate the result after each parameter run.

Signed-off-by: default avatarDavid Gow <davidgow@google.com>
Fixes: fadb08e7 ("kunit: Support for Parameterized Testing")
Reviewed-by: default avatarMarco Elver <elver@google.com>
Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent d7eab3df
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment