[igt-dev] [PATCH i-g-t] gem_exec_capture: Don't dump the whole error state

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Apr 18 19:18:47 UTC 2023


From: Petri Latvala <petri.latvala at intel.com>

The error state, when it includes full guc log, leads to a total
of ~80MB of stderr dumped when the test fails on particular
platforms. Stop dumping the full error state, keep only first 4k.

v2: Dump the first 4k of the error state still (Chris)
    [small edit of commit message Kamil]

Cc: Petri Latvala <adrinael at adrinael.net>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 tests/i915/gem_exec_capture.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c
index d0499a831..9c391192d 100644
--- a/tests/i915/gem_exec_capture.c
+++ b/tests/i915/gem_exec_capture.c
@@ -131,6 +131,7 @@ ascii85_decode(char *in, uint32_t **out, bool inflate, char **end)
 static int check_error_state(int dir, struct offset *obj_offsets, int obj_count,
 			     uint64_t obj_size, bool incremental)
 {
+	int error_dump_limit = 4096;
 	char *error, *str;
 	int blobs = 0;
 
@@ -139,7 +140,7 @@ static int check_error_state(int dir, struct offset *obj_offsets, int obj_count,
 	igt_sysfs_set(dir, "error", "Begone!");
 	igt_assert(error);
 	igt_assert(errno != ENOMEM);
-	igt_debug("%s\n", error);
+	igt_debug("%.*s\n", error_dump_limit, error);
 
 	/* render ring --- user = 0x00000000 ffffd000 */
 	for (str = error; (str = strstr(str, "--- user = ")); ) {
-- 
2.37.2



More information about the igt-dev mailing list