summaryrefslogtreecommitdiff
path: root/runner
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2020-01-29 15:56:19 +0200
committerPetri Latvala <petri.latvala@intel.com>2020-02-03 13:05:55 +0200
commita88d34245b65173eb6ef7af125189c3623652575 (patch)
tree75f79b729e29ca1dc65de45a0376f6175c7c91aa /runner
parent86c6ab8a0b6696bdb2153febd350af7fa02fbb00 (diff)
runner: Make the result an incomplete if a test is killed due to taint
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@chris-wilson.co.uk> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'runner')
-rw-r--r--runner/executor.c20
1 files changed, 19 insertions, 1 deletions
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]);