diff mbox series

[v2,4/4] kunit: fix debugfs code to use enum kunit_status, not bool

Message ID 20220429181259.622060-4-dlatypov@google.com (mailing list archive)
State Accepted
Commit 38289a26e1b8a37755f3e07056ca416c1ee2a2e8
Delegated to: Brendan Higgins
Headers show
Series [v2,1/4] kunit: rename print_subtest_{start,end} for clarity (s/subtest/suite) | expand

Commit Message

Daniel Latypov April 29, 2022, 6:12 p.m. UTC
Commit 6d2426b2f258 ("kunit: Support skipped tests") switched to using
`enum kunit_status` to track the result of running a test/suite since we
now have more than just pass/fail.

This callsite wasn't updated, silently converting to enum to a bool and
then back.

Fixes: 6d2426b2f258 ("kunit: Support skipped tests")
Signed-off-by: Daniel Latypov <dlatypov@google.com>
---
v1 -> v2: added this patch.
---
 lib/kunit/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Brendan Higgins April 30, 2022, 7:48 a.m. UTC | #1
On Fri, Apr 29, 2022 at 2:13 PM Daniel Latypov <dlatypov@google.com> wrote:
>
> Commit 6d2426b2f258 ("kunit: Support skipped tests") switched to using
> `enum kunit_status` to track the result of running a test/suite since we
> now have more than just pass/fail.
>
> This callsite wasn't updated, silently converting to enum to a bool and
> then back.
>
> Fixes: 6d2426b2f258 ("kunit: Support skipped tests")
> Signed-off-by: Daniel Latypov <dlatypov@google.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
diff mbox series

Patch

diff --git a/lib/kunit/debugfs.c b/lib/kunit/debugfs.c
index b71db0abc12b..1048ef1b8d6e 100644
--- a/lib/kunit/debugfs.c
+++ b/lib/kunit/debugfs.c
@@ -52,7 +52,7 @@  static void debugfs_print_result(struct seq_file *seq,
 static int debugfs_print_results(struct seq_file *seq, void *v)
 {
 	struct kunit_suite *suite = (struct kunit_suite *)seq->private;
-	bool success = kunit_suite_has_succeeded(suite);
+	enum kunit_status success = kunit_suite_has_succeeded(suite);
 	struct kunit_case *test_case;
 
 	if (!suite || !suite->log)