public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2] HAX: add 'i915:' to dmesg patterns and disregard KERN_NOTICE
Date: Fri,  8 Mar 2019 13:48:19 +0200	[thread overview]
Message-ID: <20190308114819.29205-1-arkadiusz.hiler@intel.com> (raw)
In-Reply-To: <20190307081919.26606-1-arkadiusz.hiler@intel.com>

Stop-gap before dropping --piglit-style-dmesg completely.

This is just for testing, to asses the amount of work this will cause
for bug-reporting. When implemented properly it will end up as a
separate switch(es).
---
 runner/resultgen.c | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/runner/resultgen.c b/runner/resultgen.c
index 32b59d59..308f6419 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -496,21 +496,23 @@ static const char igt_dmesg_whitelist[] =
 	;
 #undef _
 
-static const char igt_piglit_style_dmesg_blacklist[] =
-	"(\\[drm:|drm_|intel_|i915_)";
+static const char igt_piglit_style_dmesg_filter[] =
+	"(\\[drm:|drm_|intel_|i915_|i915:)";
 
-static regex_t re;
+static regex_t whitelist_re, piglit_filter_re;
 
 static int init_regex_whitelist(struct settings *settings)
 {
 	static int status = -1;
 
 	if (status == -1) {
-		const char *regex = settings->piglit_style_dmesg ?
-			igt_piglit_style_dmesg_blacklist :
-			igt_dmesg_whitelist;
+		if (regcomp(&piglit_filter_re, igt_piglit_style_dmesg_filter, REG_EXTENDED | REG_NOSUB) != 0) {
+			fprintf(stderr, "Cannot compile dmesg regexp\n");
+			status = 1;
+			return false;
+		}
 
-		if (regcomp(&re, regex, REG_EXTENDED | REG_NOSUB) != 0) {
+		if (regcomp(&whitelist_re, igt_dmesg_whitelist, REG_EXTENDED | REG_NOSUB) != 0) {
 			fprintf(stderr, "Cannot compile dmesg regexp\n");
 			status = 1;
 			return false;
@@ -678,13 +680,14 @@ static bool fill_from_dmesg(int fd,
 		}
 
 		if (settings->piglit_style_dmesg) {
-			if ((flags & 0x07) <= 5 && continuation != 'c' &&
-			    regexec(&re, message, (size_t)0, NULL, 0) != REG_NOMATCH) {
+			if ((flags & 0x07) <= 4 && continuation != 'c' &&
+			    regexec(&piglit_filter_re, message, (size_t)0, NULL, 0) != REG_NOMATCH &&
+			    regexec(&whitelist_re, message, (size_t)0, NULL, 0) == REG_NOMATCH) {
 				append_line(&warnings, &warningslen, formatted);
 			}
 		} else {
 			if ((flags & 0x07) <= 4 && continuation != 'c' &&
-			    regexec(&re, message, (size_t)0, NULL, 0) == REG_NOMATCH) {
+			    regexec(&whitelist_re, message, (size_t)0, NULL, 0) == REG_NOMATCH) {
 				append_line(&warnings, &warningslen, formatted);
 			}
 		}
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-03-08 11:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07  8:19 [igt-dev] [PATCH i-g-t] HAX: add 'i915:' to dmesg patterns and disregard KERN_NOTICE Arkadiusz Hiler
2019-03-07 16:31 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2019-03-08 11:48 ` Arkadiusz Hiler [this message]
2019-03-08 16:04 ` [igt-dev] ✗ Fi.CI.BAT: failure for HAX: add 'i915:' to dmesg patterns and disregard KERN_NOTICE (rev2) Patchwork
2019-03-13 11:12 ` [igt-dev] ✗ Fi.CI.BAT: failure for HAX: add 'i915:' to dmesg patterns and disregard KERN_NOTICE (rev3) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190308114819.29205-1-arkadiusz.hiler@intel.com \
    --to=arkadiusz.hiler@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox