summaryrefslogtreecommitdiffstats
path: root/lib/kunit/test.c
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2023-05-17 13:18:15 +0200
committerShuah Khan <skhan@linuxfoundation.org>2023-05-26 08:44:03 -0600
commitb08f75b9bb0196a626a804e76970733f0a05de94 (patch)
treea96f95964a163040acab9a85e9c21c7acc87e0cd /lib/kunit/test.c
parentd273b72846d636a7a9072587b5c53e7c0aeb791b (diff)
downloadlinux-b08f75b9bb0196a626a804e76970733f0a05de94.tar.gz
linux-b08f75b9bb0196a626a804e76970733f0a05de94.tar.bz2
linux-b08f75b9bb0196a626a804e76970733f0a05de94.zip
kunit: Fix reporting of the skipped parameterized tests
Logs from the parameterized tests that were skipped don't include SKIP directive thus they are displayed as PASSED. Fix that. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: David Gow <davidgow@google.com> Reviewed-by: Rae Moar <rmoar@google.com> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/kunit/test.c')
-rw-r--r--lib/kunit/test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/kunit/test.c b/lib/kunit/test.c
index d3fb93a23ccc..b09047907a47 100644
--- a/lib/kunit/test.c
+++ b/lib/kunit/test.c
@@ -627,9 +627,11 @@ int kunit_run_tests(struct kunit_suite *suite)
kunit_log(KERN_INFO, &test,
KUNIT_SUBTEST_INDENT KUNIT_SUBTEST_INDENT
- "%s %d %s",
+ "%s %d %s%s%s",
kunit_status_to_ok_not_ok(test.status),
- test.param_index + 1, param_desc);
+ test.param_index + 1, param_desc,
+ test.status == KUNIT_SKIPPED ? " # SKIP " : "",
+ test.status == KUNIT_SKIPPED ? test.status_comment : "");
/* Get next param. */
param_desc[0] = '\0';