[PATCH i-g-t 1/1] lib/igt_ktap: fix parsing problems for parametrized tests with no params
Jan Sokolowski
jan.sokolowski at intel.com
Fri May 23 08:35:44 UTC 2025
In some cases, parametrized test might have no params and therefore no
results to be reported, which causes parser failures.
Add a condition that checks for that in the parser.
Signed-off-by: Jan Sokolowski <jan.sokolowski at intel.com>
Suggested-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
---
lib/igt_ktap.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c
index 300fb2bb5..34306a1a0 100644
--- a/lib/igt_ktap.c
+++ b/lib/igt_ktap.c
@@ -250,6 +250,10 @@ int igt_ktap_parse(const char *buf, struct igt_ktap_results *ktap)
return -EINPROGRESS;
}
+ /* in case of parametrized test having no params and hence no results */
+ if (igt_debug_on(ktap->expect == SUB_RESULT && code == IGT_EXIT_SKIP))
+ ktap->expect = CASE_RESULT;
+
/* neither a test case name nor result */
if (ktap->expect != SUB_RESULT && code == IGT_EXIT_INVALID)
return -EINPROGRESS;
--
2.34.1
More information about the igt-dev
mailing list