[PATCH i-g-t] tests/intel/gem_exec_capture: Check for partial register captures

John.C.Harrison at Intel.com John.C.Harrison at Intel.com
Fri Feb 23 20:38:24 UTC 2024


From: John Harrison <John.C.Harrison at Intel.com>

If there is an error in the register list provided to GuC by the KMD
then GuC will refuse to capture the invalid entries. This is reported
as a 'partial-capture' when decoding the register state. Check for
this and flag it as an error.

Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
---
 tests/intel/gem_exec_capture.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/intel/gem_exec_capture.c b/tests/intel/gem_exec_capture.c
index d231c53b98e1..1671f6774f64 100644
--- a/tests/intel/gem_exec_capture.c
+++ b/tests/intel/gem_exec_capture.c
@@ -24,6 +24,7 @@
 #include <sys/poll.h>
 #include <zlib.h>
 #include <sched.h>
+#include <ctype.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
@@ -184,6 +185,19 @@ static int check_error_state(int dir, struct offset *obj_offsets, int obj_count,
 	igt_assert(errno != ENOMEM);
 	igt_debug("%.*s\n", error_dump_limit, error);
 
+	/*
+	 * global --- GuC Error Capture on rcs0 command stream:
+	 * Coverage:  partial-capture
+	 * Coverage:  full-capture
+	 */
+	for (str = error; (str = strstr(str, "Coverage: ")); ) {
+		str += 10;
+		while (isspace(*str))
+			str++;
+
+		igt_assert(strncmp(str, "full-capture", 12) == 0);
+	}
+
 	/* render ring --- user = 0x00000000 ffffd000 */
 	for (str = error; (str = strstr(str, "--- user = ")); ) {
 		uint32_t *data = NULL;
-- 
2.43.0



More information about the igt-dev mailing list