[igt-dev] [PATCH i-g-t] lib/kmod: Stop producing results at all for kernel selftests on taint

Petri Latvala petri.latvala at intel.com
Thu Feb 25 08:35:53 UTC 2021


Instead of producing skips for the rest when one selftest taints the
kernel, stop running them altogether. Having the skips produced yields
no value and just makes future improvements (like correctly tagging
tests that cause taints) harder. In effect, this gets us back to the
old setup when tainting made igt_runner immediately kill the test and
similarly made us not get spurious results for the rest of the
selftests.

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
 lib/igt_kmod.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index 2ae45a1a..55295fa5 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -658,9 +658,16 @@ void igt_kselftests(const char *module_name,
 	igt_kselftest_get_tests(tst.kmod, filter, &tests);
 	igt_subtest_with_dynamic(filter ?: "all") {
 		igt_list_for_each_entry_safe(tl, tn, &tests, link) {
+			unsigned long taints;
+
 			igt_dynamic_f("%s", unfilter(filter, tl->name))
 				igt_kselftest_execute(&tst, tl, options, result);
 			free(tl);
+
+			if (igt_kernel_tainted(&taints)) {
+				igt_info("Kernel tainted, not executing more selftests.\n");
+				break;
+			}
 		}
 	}
 
-- 
2.29.2



More information about the igt-dev mailing list