kunit: fix debugfs code to use enum kunit_status, not bool
authorDaniel Latypov <dlatypov@google.com>
Fri, 29 Apr 2022 18:12:59 +0000 (11:12 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 2 May 2022 18:36:03 +0000 (12:36 -0600)
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>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/debugfs.c

index b71db0abc12bf1babc9eab18f19f60fe8b4ba827..1048ef1b8d6ec09f28e48b27ea699e2742de3827 100644 (file)
@@ -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)