All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: IGT development <igt-dev@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: [RFC PATCH 5/5] lib/core: report subtests that hit an igt_warning as WARNING
Date: Thu, 18 Jan 2018 14:59:55 +0100	[thread overview]
Message-ID: <20180118135955.10739-5-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20180118135955.10739-1-daniel.vetter@ffwll.ch>

This is another piece of prep work to push the detection of dmesg
warnings into igt itself, so that we can correctly report dmesg
issue on a per-subtest basis even when running the entire binary.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 lib/igt_core.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 65b394581e8f..d61d32295bb2 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1021,6 +1021,7 @@ void __igt_subtest_group_restore(int save)
 static bool skipped_one = false;
 static bool succeeded_one = false;
 static bool failed_one = false;
+static bool warned = false;
 
 static void exit_subtest(const char *) __attribute__((noreturn));
 static void exit_subtest(const char *result)
@@ -1037,6 +1038,7 @@ static void exit_subtest(const char *result)
 	igt_terminate_spin_batches();
 
 	in_subtest = NULL;
+	warned = false;
 	siglongjmp(igt_subtest_jmpbuf, 1);
 }
 
@@ -1126,7 +1128,7 @@ void igt_success(void)
 {
 	succeeded_one = true;
 	if (in_subtest)
-		exit_subtest("SUCCESS");
+		exit_subtest(warned ? "WARNING" : "SUCCESS");
 }
 
 /**
@@ -2120,6 +2122,9 @@ void igt_vlog(const char *domain, enum igt_log_level level, const char *format,
 	if (list_subtests && level <= IGT_LOG_WARN)
 		return;
 
+	if (level >= IGT_LOG_WARN)
+		warned = true;
+
 	if (vasprintf(&line, format, args) == -1)
 		return;
 
-- 
2.14.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: IGT development <igt-dev@lists.freedesktop.org>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: [igt-dev] [RFC PATCH 5/5] lib/core: report subtests that hit an igt_warning as WARNING
Date: Thu, 18 Jan 2018 14:59:55 +0100	[thread overview]
Message-ID: <20180118135955.10739-5-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20180118135955.10739-1-daniel.vetter@ffwll.ch>

This is another piece of prep work to push the detection of dmesg
warnings into igt itself, so that we can correctly report dmesg
issue on a per-subtest basis even when running the entire binary.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 lib/igt_core.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 65b394581e8f..d61d32295bb2 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1021,6 +1021,7 @@ void __igt_subtest_group_restore(int save)
 static bool skipped_one = false;
 static bool succeeded_one = false;
 static bool failed_one = false;
+static bool warned = false;
 
 static void exit_subtest(const char *) __attribute__((noreturn));
 static void exit_subtest(const char *result)
@@ -1037,6 +1038,7 @@ static void exit_subtest(const char *result)
 	igt_terminate_spin_batches();
 
 	in_subtest = NULL;
+	warned = false;
 	siglongjmp(igt_subtest_jmpbuf, 1);
 }
 
@@ -1126,7 +1128,7 @@ void igt_success(void)
 {
 	succeeded_one = true;
 	if (in_subtest)
-		exit_subtest("SUCCESS");
+		exit_subtest(warned ? "WARNING" : "SUCCESS");
 }
 
 /**
@@ -2120,6 +2122,9 @@ void igt_vlog(const char *domain, enum igt_log_level level, const char *format,
 	if (list_subtests && level <= IGT_LOG_WARN)
 		return;
 
+	if (level >= IGT_LOG_WARN)
+		warned = true;
+
 	if (vasprintf(&line, format, args) == -1)
 		return;
 
-- 
2.14.3

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

  parent reply	other threads:[~2018-01-18 14:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 13:59 [RFC PATCH 1/5] tests/sw_sync: use igt_fork_helper Daniel Vetter
2018-01-18 13:59 ` [igt-dev] " Daniel Vetter
2018-01-18 13:59 ` [RFC PATCH 2/5] lib/core: make logging pthread vs. fork safe Daniel Vetter
2018-01-18 13:59   ` [igt-dev] " Daniel Vetter
2018-01-18 13:59 ` [RFC PATCH 3/5] lib/core: Don't hide non-debug message when filtering for a debug log domain Daniel Vetter
2018-01-18 13:59   ` [igt-dev] " Daniel Vetter
2018-01-18 13:59 ` [RFC PATCH 4/5] igt/core: Initial simple interleaved kmsg filtering Daniel Vetter
2018-01-18 13:59   ` [igt-dev] " Daniel Vetter
2018-01-18 14:27   ` [RFC PATCH] " Daniel Vetter
2018-01-18 14:27     ` [igt-dev] " Daniel Vetter
2018-02-20 11:30     ` [igt-dev] [RFC PATCH v3 4/5] " Petri Latvala
2018-02-20 11:50       ` Daniel Vetter
2018-02-20 12:09         ` Daniel Vetter
2018-01-18 13:59 ` Daniel Vetter [this message]
2018-01-18 13:59   ` [igt-dev] [RFC PATCH 5/5] lib/core: report subtests that hit an igt_warning as WARNING Daniel Vetter
2018-01-18 14:21 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [RFC,1/5] tests/sw_sync: use igt_fork_helper Patchwork
2018-01-18 15:05 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [RFC,1/5] tests/sw_sync: use igt_fork_helper (rev2) Patchwork
2018-02-20 15:22 ` [igt-dev] ✗ Fi.CI.BAT: warning for series starting with [RFC,1/5] tests/sw_sync: use igt_fork_helper (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=20180118135955.10739-5-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.