From: Marco Elver Date: Fri, 25 Jun 2021 06:58:15 +0000 (-0700) Subject: kasan: test: make use of kunit_skip() X-Git-Tag: accepted/tizen/unified/20230118.172025~6926^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40eb5cf4cc913dbb615eb97d05f2353f0404a464;p=platform%2Fkernel%2Flinux-rpi.git kasan: test: make use of kunit_skip() Make use of the recently added kunit_skip() to skip tests, as it permits TAP parsers to recognize if a test was deliberately skipped. Signed-off-by: Marco Elver Signed-off-by: David Gow Reviewed-by: Daniel Latypov Reviewed-by: Andrey Konovalov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan --- diff --git a/lib/test_kasan.c b/lib/test_kasan.c index cacbbbd..0a2029d 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -111,17 +111,13 @@ static void kasan_test_exit(struct kunit *test) } while (0) #define KASAN_TEST_NEEDS_CONFIG_ON(test, config) do { \ - if (!IS_ENABLED(config)) { \ - kunit_info((test), "skipping, " #config " required"); \ - return; \ - } \ + if (!IS_ENABLED(config)) \ + kunit_skip((test), "Test requires " #config "=y"); \ } while (0) #define KASAN_TEST_NEEDS_CONFIG_OFF(test, config) do { \ - if (IS_ENABLED(config)) { \ - kunit_info((test), "skipping, " #config " enabled"); \ - return; \ - } \ + if (IS_ENABLED(config)) \ + kunit_skip((test), "Test requires " #config "=n"); \ } while (0) static void kmalloc_oob_right(struct kunit *test)