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 <elver@google.com> Signed-off-by: David Gow <davidgow@google.com> Reviewed-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
d99ea67514
commit
40eb5cf4cc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue