[PATCH i-g-t v2 22/66] tests/xe_eudebug: Add coverage for sysfs debugger toggle

Piatkowski, Dominik Karol dominik.karol.piatkowski at intel.com
Thu Aug 1 12:28:11 UTC 2024


With typo fixed:
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 22/66] tests/xe_eudebug: Add coverage for sysfs
> debugger toggle
> 
> Add subtest for checking sysfs debugger toggle logic and debugger state.
> 
> Signed-off-by: Christoph Manszewski <christoph.manszewski at intel.com>
> Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> ---
>  tests/intel/xe_eudebug.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/tests/intel/xe_eudebug.c b/tests/intel/xe_eudebug.c index
> de8edb485..b565785e3 100644
> --- a/tests/intel/xe_eudebug.c
> +++ b/tests/intel/xe_eudebug.c
> @@ -22,6 +22,30 @@
>  #include "xe/xe_ioctl.h"
>  #include "xe/xe_query.h"
> 
> +/**
> + * SUBTEST: sysfs-toggle
> + * Description:
> + *      Excercise the debugger enable/disable sysfs toggle logic

Typo: Exercise

> + */
> +static void test_sysfs_toggle(int fd)
> +{
> +	xe_eudebug_enable(fd, false);
> +	igt_assert(!xe_eudebug_debugger_available(fd));
> +
> +	xe_eudebug_enable(fd, true);
> +	igt_assert(xe_eudebug_debugger_available(fd));
> +	xe_eudebug_enable(fd, true);
> +	igt_assert(xe_eudebug_debugger_available(fd));
> +
> +	xe_eudebug_enable(fd, false);
> +	igt_assert(!xe_eudebug_debugger_available(fd));
> +	xe_eudebug_enable(fd, false);
> +	igt_assert(!xe_eudebug_debugger_available(fd));
> +
> +	xe_eudebug_enable(fd, true);
> +	igt_assert(xe_eudebug_debugger_available(fd));
> +}
> +
>  #define CREATE_VMS (1 << 0)
>  #define CREATE_EXEC_QUEUES (1 << 1)
>  #define VM_BIND (1 << 2)
> @@ -1146,6 +1170,9 @@ igt_main
>  		was_enabled = xe_eudebug_enable(fd, true);
>  	}
> 
> +	igt_subtest("sysfs-toggle")
> +		test_sysfs_toggle(fd);
> +
>  	igt_subtest("basic-connect")
>  		test_connect(fd);
> 
> --
> 2.34.1



More information about the igt-dev mailing list