[igt-dev] [PATCH i-g-t] runner: Make the result an incomplete if a test is killed due to taint

Petri Latvala petri.latvala at intel.com
Wed Jan 29 13:56:19 UTC 2020


If we're checking for taints, we kill the test as soon as we notice a
taint. Out of the box, such killing will get marked as such and yields
a 'timeout' result, which is misleading. The test didn't spend too
much time, it just did nasties.

Make sure taint-killing results in an 'incomplete' result
instead. It's still not completely truthful for the state of the
testing but closer than a 'timeout'. And stands out more in CI result
analysis.

Suggested-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
 runner/executor.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/runner/executor.c b/runner/executor.c
index ca9a12e3..dbe6fa57 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -1010,8 +1010,26 @@ static int monitor_output(pid_t child,
 				time = 0.0;
 
 			if (!aborting) {
+				const char *exitline;
+
+				exitline = killed ? EXECUTOR_TIMEOUT : EXECUTOR_EXIT;
+
+				/* If we're stopping because we killed
+				 * the test for tainting, let's not
+				 * call it a timeout. Since the test
+				 * execution was still going on, we
+				 * probably didn't yet get the subtest
+				 * result line printed. Such a case is
+				 * parsed as an incomplete unless the
+				 * journal says timeout, ergo to make
+				 * the result an incomplete we avoid
+				 * journaling a timeout here.
+				 */
+				if (is_tainted(taints))
+					exitline = EXECUTOR_EXIT;
+
 				dprintf(outputs[_F_JOURNAL], "%s%d (%.3fs)\n",
-					killed ? EXECUTOR_TIMEOUT : EXECUTOR_EXIT,
+					exitline,
 					status, time);
 				if (settings->sync) {
 					fdatasync(outputs[_F_JOURNAL]);
-- 
2.20.1



More information about the igt-dev mailing list