[igt-dev] [PATCH i-g-t 3/3] runner/resultgen: compress dmesg if size limit hit
Kamil Konieczny
kamil.konieczny at linux.intel.com
Fri Aug 18 19:22:03 UTC 2023
If dmesg log size is exceeding its limit do compressing of it
with the help of external program, given in option --compress.
Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
runner/resultgen.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/runner/resultgen.c b/runner/resultgen.c
index 0dc26b335..95b9eadca 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -1204,6 +1204,13 @@ static bool fill_from_dmesg(int fd, char *dirname,
g_regex_unref(re);
fclose(f);
+ if (limit && settings->compressor) {
+ char comp[2*PATH_MAX + 256];
+
+ snprintf(comp, sizeof(comp), "%s %s/%s/%s", settings->compressor, settings->results_path, dirname, "dmesg.txt");
+ system(comp);
+ }
+
return true;
}
--
2.39.2
More information about the igt-dev
mailing list