summaryrefslogtreecommitdiff
path: root/runner/settings.c
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2018-08-30 15:51:39 +0300
committerPetri Latvala <petri.latvala@intel.com>2018-08-31 13:18:43 +0300
commitc7a0b451a9680d8ff1ea13b748f8295937d41399 (patch)
tree58e3765a74e8d27673393cbd80f84b48c3e66b1a /runner/settings.c
parentf2e4bbdb072b80c1fba854aabd1e15565a42eb76 (diff)
runner: Introduce --piglit-style-dmesg
With the flag, dmesg handling is done exactly as piglit does it: Level 5 (info) and higher dmesg lines, if they match a regexp, cause test result to change to dmesg-*. The default is false (use new method). Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Acked-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'runner/settings.c')
-rw-r--r--runner/settings.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/runner/settings.c b/runner/settings.c
index 060459b0..70fff3c0 100644
--- a/runner/settings.c
+++ b/runner/settings.c
@@ -16,6 +16,7 @@ enum {
OPT_ABORT_ON_ERROR,
OPT_TEST_LIST,
OPT_IGNORE_MISSING,
+ OPT_PIGLIT_DMESG,
OPT_HELP = 'h',
OPT_NAME = 'n',
OPT_DRY_RUN = 'd',
@@ -89,6 +90,12 @@ static const char *usage_str =
" --use-watchdog Use hardware watchdog for lethal enforcement of the\n"
" above timeout. Killing the test process is still\n"
" attempted at timeout trigger.\n"
+ " --piglit-style-dmesg Filter dmesg like piglit does. Piglit considers matches\n"
+ " against a short filter list to mean the test result\n"
+ " should be changed to dmesg-warn/dmesg-fail. Without\n"
+ " this option everything except matches against a\n"
+ " (longer) filter list means the test result should\n"
+ " change.\n"
" [test_root] Directory that contains the IGT tests. The environment\n"
" variable IGT_TEST_ROOT will be used if set, overriding\n"
" this option if given.\n"
@@ -192,6 +199,7 @@ bool parse_options(int argc, char **argv,
{"multiple-mode", no_argument, NULL, OPT_MULTIPLE},
{"inactivity-timeout", required_argument, NULL, OPT_TIMEOUT},
{"use-watchdog", no_argument, NULL, OPT_WATCHDOG},
+ {"piglit-style-dmesg", no_argument, NULL, OPT_PIGLIT_DMESG},
{ 0, 0, 0, 0},
};
@@ -248,6 +256,9 @@ bool parse_options(int argc, char **argv,
case OPT_WATCHDOG:
settings->use_watchdog = true;
break;
+ case OPT_PIGLIT_DMESG:
+ settings->piglit_style_dmesg = true;
+ break;
case '?':
usage(NULL, stderr);
goto error;
@@ -438,6 +449,7 @@ bool serialize_settings(struct settings *settings)
SERIALIZE_LINE(f, settings, multiple_mode, "%d");
SERIALIZE_LINE(f, settings, inactivity_timeout, "%d");
SERIALIZE_LINE(f, settings, use_watchdog, "%d");
+ SERIALIZE_LINE(f, settings, piglit_style_dmesg, "%d");
SERIALIZE_LINE(f, settings, test_root, "%s");
SERIALIZE_LINE(f, settings, results_path, "%s");
@@ -491,6 +503,7 @@ bool read_settings(struct settings *settings, int dirfd)
PARSE_LINE(settings, name, val, multiple_mode, numval);
PARSE_LINE(settings, name, val, inactivity_timeout, numval);
PARSE_LINE(settings, name, val, use_watchdog, numval);
+ PARSE_LINE(settings, name, val, piglit_style_dmesg, numval);
PARSE_LINE(settings, name, val, test_root, val ? strdup(val) : NULL);
PARSE_LINE(settings, name, val, results_path, val ? strdup(val) : NULL);