[PATCH i-g-t v2 21/66] tests/xe_eudebug: Add support for dynamic debugger sysfs toggle
Piatkowski, Dominik Karol
dominik.karol.piatkowski at intel.com
Thu Aug 1 12:25:09 UTC 2024
Reviewed-by: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
> -----Original Message-----
> From: Manszewski, Christoph <christoph.manszewski at intel.com>
> Sent: Tuesday, July 30, 2024 1:45 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Kempczynski, Zbigniew <zbigniew.kempczynski at intel.com>; Kamil
> Konieczny <kamil.konieczny at linux.intel.com>; Grzegorzek, Dominik
> <dominik.grzegorzek at intel.com>; Patelczyk, Maciej
> <maciej.patelczyk at intel.com>; Piatkowski, Dominik Karol
> <dominik.karol.piatkowski at intel.com>; Sikora, Pawel
> <pawel.sikora at intel.com>; Hajda, Andrzej <andrzej.hajda at intel.com>;
> Kolanupaka Naveena <kolanupaka.naveena at intel.com>; Kuoppala, Mika
> <mika.kuoppala at intel.com>; Mun, Gwan-gyeong <gwan-
> gyeong.mun at intel.com>
> Subject: [PATCH i-g-t v2 21/66] tests/xe_eudebug: Add support for dynamic
> debugger sysfs toggle
>
> 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