2023-07-18 22:11:15

by Thomas Weißschuh

[permalink] [raw]
Subject: [PATCH RFC 5/7] kselftest: support KTAP format

KTAP supports nested suites which we want to use for nolibc tests.
The TAP parser at tools/testing/kunit/kunit.py requires the header
"KTAP version 1" to parse nested suites.

Signed-off-by: Thomas Weißschuh <[email protected]>
---
tools/testing/selftests/kselftest.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index 829be379545a..811d720d50dd 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -117,6 +117,11 @@ static inline void ksft_print_header(void)
printf("TAP version 13\n");
}

+static inline void ksft_print_header_ktap(void)
+{
+ printf("KTAP version 1\n");
+}
+
static inline void ksft_set_plan(unsigned int plan)
{
ksft_plan = plan;

--
2.41.0