[igt-dev] [PATCH i-g-t v2 07/11] lib/ktap: Drop workaround for missing top level KTAP headers
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Mon Oct 9 12:27:58 UTC 2023
A workaround was implemented in IGT KTAP parser so it could accepted KTAP
reports with missing top level KTAP version and test suite plan headers.
Since kernel side commit c95e7c05c139 ("kunit: Report the count of test
suites in a module"), included in the mainline kernel since v6.6-rc1, has
fixed that issue, that workaround is no longer needed. Drop it.
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
---
lib/igt_ktap.c | 12 ------------
lib/tests/igt_ktap_parser.c | 3 +--
2 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c
index 53a6c63288..7c52ba11ed 100644
--- a/lib/igt_ktap.c
+++ b/lib/igt_ktap.c
@@ -84,18 +84,6 @@ int igt_ktap_parse(const char *buf, struct igt_ktap_results *ktap)
igt_debug_on(sscanf(buf,
"%*1[ ]%*1[ ]%*1[ ]%*1[ ]KTAP%*[ ]version%*[ ]%u %n",
&n, &len) == 1 && len == strlen(buf))) {
- /*
- * TODO: drop the following workaround as soon as
- * kernel side issue of missing lines with top level
- * KTAP version and test suite plan is fixed.
- */
- if (ktap->expect == KTAP_START) {
- ktap->suite_count = 1;
- ktap->suite_last = 0;
- ktap->suite_name = NULL;
- ktap->expect = SUITE_START;
- }
-
if (igt_debug_on(ktap->expect != SUITE_START))
return -EPROTO;
diff --git a/lib/tests/igt_ktap_parser.c b/lib/tests/igt_ktap_parser.c
index 6357bdf6a5..476e14092f 100644
--- a/lib/tests/igt_ktap_parser.c
+++ b/lib/tests/igt_ktap_parser.c
@@ -190,8 +190,7 @@ static void ktap_top_version(void)
ktap = igt_ktap_alloc(&results);
igt_require(ktap);
- /* TODO: change to -EPROTO as soon as related workaround is dropped */
- igt_assert_eq(igt_ktap_parse(" KTAP version 1\n", ktap), -EINPROGRESS);
+ igt_assert_eq(igt_ktap_parse(" KTAP version 1\n", ktap), -EPROTO);
igt_ktap_free(ktap);
ktap = igt_ktap_alloc(&results);
--
2.42.0
More information about the igt-dev
mailing list