From: Michal Wajdeczko Date: Wed, 17 May 2023 11:18:15 +0000 (+0200) Subject: kunit: Fix reporting of the skipped parameterized tests X-Git-Tag: v6.6.17~4599^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b08f75b9bb0196a626a804e76970733f0a05de94;p=platform%2Fkernel%2Flinux-rpi.git 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 Cc: David Gow Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan --- diff --git a/lib/kunit/test.c b/lib/kunit/test.c index d3fb93a..b090479 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';