[PATCH i-g-t v2 21/66] tests/xe_eudebug: Add support for dynamic debugger sysfs toggle

Christoph Manszewski christoph.manszewski at intel.com
Tue Jul 30 11:44:38 UTC 2024


>From now on the debugger is disabled by default so it is required
to enable the debugger before using it. This change addresses that
fact by calling necessary library functions within test fixtures.

Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
Signed-off-by: Christoph Manszewski <christoph.manszewski at intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
---
 tests/intel/xe_eudebug.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/intel/xe_eudebug.c b/tests/intel/xe_eudebug.c
index 577985ba7..de8edb485 100644
--- a/tests/intel/xe_eudebug.c
+++ b/tests/intel/xe_eudebug.c
@@ -1138,10 +1138,12 @@ static void test_metadata_attach(int fd, unsigned int flags, int num_clients)
 
 igt_main
 {
+	bool was_enabled;
 	int fd;
 
 	igt_fixture {
 		fd = drm_open_driver(DRIVER_XE);
+		was_enabled = xe_eudebug_enable(fd, true);
 	}
 
 	igt_subtest("basic-connect")
@@ -1192,6 +1194,8 @@ igt_main
 	igt_subtest("discovery-empty-clients")
 		test_empty_discovery(fd, DISCOVERY_DESTROY_RESOURCES, 16);
 
-	igt_fixture
+	igt_fixture {
+		xe_eudebug_enable(fd, was_enabled);
 		drm_close_driver(fd);
+	}
 }
-- 
2.34.1



More information about the igt-dev mailing list