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 v2] runner: Only show the kmsg overflow message once
Date: Wed, 25 Mar 2020 12:58:23 +0000 [thread overview]
Message-ID: <20200325125823.240720-1-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20200325123318.240545-1-chris@chris-wilson.co.uk>
Instead of repeating every single time we overflow the read from kmsg,
just once per test is enough warning.
v2: Just suppress the multiple s/underflow/overflow/ messages. Having a
buffer smaller than a single kmsg packet is unlikely.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
---
runner/executor.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/runner/executor.c b/runner/executor.c
index a56cb5d66..d72a59376 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -549,6 +549,7 @@ static int dump_dmesg(int kmsgfd, int outfd)
int comparefd;
unsigned flags;
unsigned long long seq, cmpseq, usec;
+ bool underflow_once = false;
char cont;
char buf[2048];
ssize_t r;
@@ -586,7 +587,10 @@ 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 (!underflow_once) {
+ errf("Warning: kernel log ringbuffer underflow, some records lost.\n");
+ underflow_once = true;
+ }
continue;
} else if (errno == EINVAL) {
errf("Warning: Buffer too small for kernel log record, record lost.\n");
--
2.26.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-03-25 12:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 12:33 [igt-dev] [PATCH i-g-t] runner: Only show the kmsg underflow/overflow message once Chris Wilson
2020-03-25 12:41 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2020-03-25 12:52 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
2020-03-25 12:58 ` Chris Wilson [this message]
2020-03-25 13:14 ` [igt-dev] [PATCH i-g-t v2] runner: Only show the kmsg overflow " 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=20200325125823.240720-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