[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210625065815.322131-4-davidgow@google.com>
Date: Thu, 24 Jun 2021 23:58:15 -0700
From: David Gow <davidgow@...gle.com>
To: Brendan Higgins <brendanhiggins@...gle.com>,
Alan Maguire <alan.maguire@...cle.com>
Cc: Marco Elver <elver@...gle.com>,
Daniel Latypov <dlatypov@...gle.com>,
Shuah Khan <skhan@...uxfoundation.org>,
kunit-dev@...glegroups.com, kasan-dev@...glegroups.com,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
David Gow <davidgow@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>
Subject: [PATCH kunit-fixes v5 4/4] kasan: test: make use of kunit_skip()
From: Marco Elver <elver@...gle.com>
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@...gle.com>
Signed-off-by: David Gow <davidgow@...gle.com>
Reviewed-by: Daniel Latypov <dlatypov@...gle.com>
Reviewed-by: Andrey Konovalov <andreyknvl@...il.com>
Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>
---
No changes since v4:
https://lore.kernel.org/linux-kselftest/20210611070802.1318911-4-davidgow@google.com/
- Rebased on top of kselftest/kunit-fixes
No changes since v3:
https://lore.kernel.org/linux-kselftest/20210608065128.610640-1-davidgow@google.com/
No changes since v2:
https://lore.kernel.org/linux-kselftest/20210528075932.347154-4-davidgow@google.com
lib/test_kasan.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/lib/test_kasan.c b/lib/test_kasan.c
index cacbbbdef768..0a2029d14c91 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)
--
2.32.0.93.g670b81a890-goog
Powered by blists - more mailing lists