summaryrefslogtreecommitdiff
path: root/runner
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-11-27 13:46:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-11-27 13:46:41 +0000
commit7b1f355a9923e6fa9d043a0219111f546c777a03 (patch)
treed35992a87e2a9a0793007f35bf86e091e45c88c8 /runner
parent0be3f3e7c1613dcaf27267fce778025ea46a36c1 (diff)
Revert "runner: Treat dmesg warnings as pure warnings"
Accidentally pushed, believing this was the kill(child, 0) switcheroo. This reverts commit 0be3f3e7c1613dcaf27267fce778025ea46a36c1. Acked-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'runner')
-rw-r--r--runner/resultgen.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/runner/resultgen.c b/runner/resultgen.c
index 74e6d21f..b0933ad7 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -466,8 +466,8 @@ static bool fill_from_output(int fd, const char *binary, const char *key,
/*
* This regexp controls the kmsg handling. All kernel log records that
- * have log level of warning or higher convert a passing result to
- * warn unless they match this regexp.
+ * have log level of warning or higher convert the result to
+ * dmesg-warn/dmesg-fail unless they match this regexp.
*
* TODO: Move this to external files, i915-suppressions.txt,
* general-suppressions.txt et al.
@@ -826,11 +826,14 @@ static void override_result_single(struct json_object *obj)
{
const char *errtext = NULL, *result = NULL;
struct json_object *textobj;
+ bool dmesgwarns = false;
if (json_object_object_get_ex(obj, "err", &textobj))
errtext = json_object_get_string(textobj);
if (json_object_object_get_ex(obj, "result", &textobj))
result = json_object_get_string(textobj);
+ if (json_object_object_get_ex(obj, "dmesg-warnings", &textobj))
+ dmesgwarns = true;
if (!strcmp(result, "pass") &&
count_lines(errtext, errtext + strlen(errtext)) > 2) {
@@ -838,9 +841,13 @@ static void override_result_single(struct json_object *obj)
result = "warn";
}
- if (json_object_object_get_ex(obj, "dmesg-warnings", &textobj) &&
- !strcmp(result, "pass"))
- set_result(obj, "warn");
+ if (dmesgwarns) {
+ if (!strcmp(result, "pass") || !strcmp(result, "warn")) {
+ set_result(obj, "dmesg-warn");
+ } else if (!strcmp(result, "fail")) {
+ set_result(obj, "dmesg-fail");
+ }
+ }
}
static void override_results(char *binary,