From: Kamil Konieczny <kamil.konieczny@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] Revert "runner: check disk limit at dumping kmsg"
Date: Fri, 28 Apr 2023 11:13:32 +0200 [thread overview]
Message-ID: <20230428091332.12330-1-kamil.konieczny@linux.intel.com> (raw)
This reverts commit 3bd8bf9bca97bbfb7b4b408f9fccd0cf6f742d4c.
After some tests it seems that runner is not reporting failures
properly from i915_selftest due to this change, also after
re-thinking I come to conclusion that clipping may be applied
after runner/resume processes a tests dmesg from a run into
rusults.json
Fixes: 3bd8bf9bca97 ("runner: check disk limit at dumping kmsg")
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Petri Latvala <adrinael@adrinael.net>
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
runner/executor.c | 24 +++++-------------------
1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/runner/executor.c b/runner/executor.c
index ae6cf1bba..597cd7f58 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -584,7 +584,7 @@ void close_outputs(int *fds)
}
/* Returns the number of bytes written to disk, or a negative number on error */
-static long dump_dmesg(int kmsgfd, int outfd, size_t disk_limit)
+static long dump_dmesg(int kmsgfd, int outfd)
{
/*
* Write kernel messages to the log file until we reach
@@ -599,18 +599,12 @@ static long dump_dmesg(int kmsgfd, int outfd, size_t disk_limit)
bool underflow_once = false;
char cont;
char buf[2048];
- ssize_t r, disk_written;
+ ssize_t r;
long written = 0;
if (kmsgfd < 0)
return 0;
- disk_written = lseek(outfd, 0, SEEK_SET);
- if (disk_written > disk_limit) {
- errf("Error dumping kmsg: disk limit already exceeded\n");
- return 0; /* number of written bytes */
- }
-
comparefd = open("/dev/kmsg", O_RDONLY | O_NONBLOCK);
if (comparefd < 0) {
errf("Error opening another fd for /dev/kmsg\n");
@@ -661,13 +655,6 @@ static long dump_dmesg(int kmsgfd, int outfd, size_t disk_limit)
write(outfd, buf, r);
written += r;
- disk_written += r;
-
- if (disk_written > disk_limit) {
- close(comparefd);
- errf("Error dumping kmsg: disk limit exceeded\n");
- return written;
- }
if (comparefd < 0 && sscanf(buf, "%u,%llu,%llu,%c;",
&flags, &seq, &usec, &cont) == 4) {
@@ -903,7 +890,6 @@ static int monitor_output(pid_t child,
unsigned long taints = 0;
bool aborting = false;
size_t disk_usage = 0;
- const size_t mon_disk_limit = settings->disk_usage_limit ? : (~(size_t)0);
bool socket_comms_used = false; /* whether the test actually uses comms */
bool results_received = false; /* whether we already have test results that might need overriding if we detect an abort condition */
@@ -1233,7 +1219,7 @@ static int monitor_output(pid_t child,
time_last_activity = time_now;
- dmesgwritten = dump_dmesg(kmsgfd, outputs[_F_DMESG], mon_disk_limit);
+ dmesgwritten = dump_dmesg(kmsgfd, outputs[_F_DMESG]);
if (settings->sync)
fdatasync(outputs[_F_DMESG]);
@@ -1471,7 +1457,7 @@ static int monitor_output(pid_t child,
asprintf(abortreason, "Child refuses to die, tainted 0x%lx.", taints);
}
- dump_dmesg(kmsgfd, outputs[_F_DMESG], mon_disk_limit);
+ dump_dmesg(kmsgfd, outputs[_F_DMESG]);
if (settings->sync)
fdatasync(outputs[_F_DMESG]);
@@ -1497,7 +1483,7 @@ static int monitor_output(pid_t child,
}
}
- dump_dmesg(kmsgfd, outputs[_F_DMESG], mon_disk_limit);
+ dump_dmesg(kmsgfd, outputs[_F_DMESG]);
if (settings->sync)
fdatasync(outputs[_F_DMESG]);
--
2.37.2
next reply other threads:[~2023-04-28 9:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 9:13 Kamil Konieczny [this message]
2023-04-28 9:14 ` [igt-dev] [PATCH i-g-t] Revert "runner: check disk limit at dumping kmsg" Andrzej Hajda
2023-04-28 9:46 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-28 11:57 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20230428091332.12330-1-kamil.konieczny@linux.intel.com \
--to=kamil.konieczny@linux.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