[PATCH i-g-t v1 1/1] tests/intel/xe_eudebug: move multigpu requirement to test block

Piatkowski, Dominik Karol dominik.karol.piatkowski at intel.com
Fri Jun 27 08:02:10 UTC 2025


LGTM,
Reviewed-by: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>

> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Jan
> Sokolowski
> Sent: Friday, June 27, 2025 9:42 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Sokolowski, Jan <jan.sokolowski at intel.com>; Piecielska, Katarzyna
> <katarzyna.piecielska at intel.com>; Kamil Konieczny
> <kamil.konieczny at linux.intel.com>
> Subject: [PATCH i-g-t v1 1/1] tests/intel/xe_eudebug: move multigpu
> requirement to test block
> 
> As test fixtures are called regardless whether an associated
> test is going to be executed or not, calling eg.
> ./xe_eudebug --run basic-connect
> would execute
> igt_require(gpu_count >= 2);
> from later in the igt_main function, despite it being
> unnecessary and printing a misleading and unrelated
> requirements check when ran on single gpu host.
> 
> Move igt_require(gpu_count >= 2) from fixture block
> to test block.
> 
> Signed-off-by: Jan Sokolowski <jan.sokolowski at intel.com>
> Cc: Katarzyna Piecielska <katarzyna.piecielska at intel.com>
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
>  tests/intel/xe_eudebug.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/intel/xe_eudebug.c b/tests/intel/xe_eudebug.c
> index bdf73c4e9..d2a1932fb 100644
> --- a/tests/intel/xe_eudebug.c
> +++ b/tests/intel/xe_eudebug.c
> @@ -2923,7 +2923,6 @@ igt_main
>  	igt_subtest_group {
>  		igt_fixture {
>  			gpu_count =
> drm_prepare_filtered_multigpu(DRIVER_XE);
> -			igt_require(gpu_count >= 2);
> 
>  			multigpu_was_enabled = malloc(gpu_count *
> sizeof(bool));
>  			igt_assert(multigpu_was_enabled);
> @@ -2935,6 +2934,7 @@ igt_main
>  		}
> 
>  		igt_subtest("multigpu-basic-client") {
> +			igt_require(gpu_count >= 2);
>  			igt_multi_fork(child, gpu_count) {
>  				fd = drm_open_filtered_card(child);
>  				igt_assert_f(fd > 0, "cannot open gpu-%d,
> errno=%d\n",
> @@ -2948,6 +2948,7 @@ igt_main
>  		}
> 
>  		igt_subtest("multigpu-basic-client-many") {
> +			igt_require(gpu_count >= 2);
>  			igt_multi_fork(child, gpu_count) {
>  				fd = drm_open_filtered_card(child);
>  				igt_assert_f(fd > 0, "cannot open gpu-%d,
> errno=%d\n",
> --
> 2.34.1



More information about the igt-dev mailing list