[PATCH i-g-t 2/3] lib/kunit: Report early kernel taints explicitly

Janusz Krzysztofik janusz.krzysztofik at linux.intel.com
Thu Jan 25 16:52:11 UTC 2024


When we find the kernel tainted after loading our kunit test module in
list only mode, report that taint immediately as the reason for skip
instead of executing and blaming our ktap parser.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
---
 lib/igt_kmod.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index 4f96dafe01..01198e75dc 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -1213,6 +1213,7 @@ static void kunit_get_tests(struct igt_list_head *tests,
 	}
 
 	igt_skip_on(modprobe(tst->kmod, opts));
+	igt_skip_on(igt_kernel_tainted(&taints));
 
 	ktap = igt_ktap_alloc(tests);
 	igt_require(ktap);
-- 
2.43.0



More information about the igt-dev mailing list