From: Chris Wilson <chris@chris-wilson.co.uk>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t] runner: Only show the kmsg underflow/overflow message once
Date: Wed, 25 Mar 2020 12:33:18 +0000 [thread overview]
Message-ID: <20200325123318.240545-1-chris@chris-wilson.co.uk> (raw)
Instead of repeating every single time we underflow the read from kmsg,
just once per test is enough warning.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
---
runner/executor.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/runner/executor.c b/runner/executor.c
index a56cb5d66..b26cb7bc7 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -549,6 +549,8 @@ static int dump_dmesg(int kmsgfd, int outfd)
int comparefd;
unsigned flags;
unsigned long long seq, cmpseq, usec;
+ bool underflow_once = false;
+ bool overflow_once = false;
char cont;
char buf[2048];
ssize_t r;
@@ -586,10 +588,16 @@ static int dump_dmesg(int kmsgfd, int outfd)
r = read(kmsgfd, buf, sizeof(buf));
if (r < 0) {
if (errno == EPIPE) {
- errf("Warning: kernel log ringbuffer underflow, some records lost.\n");
+ if (!overflow_once) {
+ errf("Warning: kernel log ringbuffer underflow, some records lost.\n");
+ overflow_once = true;
+ }
continue;
} else if (errno == EINVAL) {
- errf("Warning: Buffer too small for kernel log record, record lost.\n");
+ if (!underflow_once) {
+ errf("Warning: Buffer too small for kernel log record, record lost.\n");
+ underflow_once = true;
+ }
continue;
} else if (errno != EAGAIN) {
errf("Error reading from kmsg: %m\n");
--
2.26.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2020-03-25 12:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 12:33 Chris Wilson [this message]
2020-03-25 12:41 ` [igt-dev] ✗ GitLab.Pipeline: warning for runner: Only show the kmsg underflow/overflow message once Patchwork
2020-03-25 12:52 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
2020-03-25 12:58 ` [igt-dev] [PATCH i-g-t v2] runner: Only show the kmsg overflow " Chris Wilson
2020-03-25 13:14 ` Petri Latvala
2020-03-25 13:06 ` [igt-dev] ✓ Fi.CI.BAT: success for runner: Only show the kmsg underflow/overflow " Patchwork
2020-03-25 13:30 ` [igt-dev] ✓ Fi.CI.BAT: success for runner: Only show the kmsg underflow/overflow message once (rev2) Patchwork
2020-03-25 14:56 ` [igt-dev] ✓ Fi.CI.IGT: success for runner: Only show the kmsg underflow/overflow message once Patchwork
2020-03-25 15:38 ` [igt-dev] ✗ Fi.CI.IGT: failure for runner: Only show the kmsg underflow/overflow message once (rev2) 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=20200325123318.240545-1-chris@chris-wilson.co.uk \
--to=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
/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