[igt-dev] [PATCH i-g-t] runner: Abort the run after a kernel taint is discovered

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 6 14:00:35 UTC 2021


Since we no longer immediately abort a test upon a taint, that taint may
persist into the next test causing unrelated incompletes. Avoid the
tainted inheritance by aborting between tests if the kernel is tainted.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
---
 runner/executor.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/runner/executor.c b/runner/executor.c
index faf272d85..8cddcf1ce 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -1801,6 +1801,7 @@ bool execute(struct execute_state *state,
 
 	for (; state->next < job_list->size;
 	     state->next++) {
+		unsigned long taints;
 		char *reason = NULL;
 		int result;
 
@@ -1836,6 +1837,13 @@ bool execute(struct execute_state *state,
 			break;
 		}
 
+		if (settings->abort_mask & ABORT_TAINT && tainted(&taints)) {
+			outf("Stopping the rung because the kernel is tainted: %#x.\n",
+			     taintss);
+			status = false;
+			break;
+		}
+
 		reduce_time_left(settings, state, time_spent);
 
 		if (overall_timeout_exceeded(state)) {
-- 
2.30.0



More information about the igt-dev mailing list