[igt-dev] [PATCH i-g-t v2 3/3] tests/intel/xe_create: add multi-GPU basic test

Piatkowski, Dominik Karol dominik.karol.piatkowski at intel.com
Wed Nov 15 10:34:24 UTC 2023


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 Kamil
> Konieczny
> Sent: Friday, November 3, 2023 5:02 PM
> To: igt-dev at lists.freedesktop.org
> Subject: [igt-dev] [PATCH i-g-t v2 3/3] tests/intel/xe_create: add multi-GPU
> basic test
> 
> Add basic multi-GPU test using drm filtered helpers.
> 
> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> 
> ---
> v2: use new helper
> ---
>  tests/intel/xe_create.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c index
> d99bd51cf..ac5418ef2 100644
> --- a/tests/intel/xe_create.c
> +++ b/tests/intel/xe_create.c
> @@ -191,6 +191,13 @@ static void create_execqueues(int fd, enum
> exec_queue_destroy ed)
>   * Test category: functionality test
>   * Description: Verifies xe bo create returns expected error code on massive
>   *              buffer sizes.
> + *
> + * SUBTEST: multigpu-create-massive-size
> + * Functionality: ioctl
> + * Test category: functionality test
> + * Feature: multigpu
> + * Description: Verifies xe bo create with massive buffer sizes runs correctly
> + *		on two or more GPUs.
>   */
>  static void create_massive_size(int fd)  { @@ -228,6 +235,25 @@ igt_main
>  		create_massive_size(xe);
>  	}
> 
> +	igt_subtest("multigpu-create-massive-size") {
> +		int gpu_count = drm_prepare_filtered_multigpu(DRIVER_XE);
> +
> +		igt_require(xe > 0);
> +		igt_require(gpu_count >= 2);
> +		igt_multi_fork(child, gpu_count) {
> +			int gpu_fd;
> +
> +			gpu_fd = drm_open_filtered_card(child);
> +			igt_assert_f(gpu_fd > 0, "cannot open gpu-%d,
> errno=%d\n", child, errno);
> +			igt_assert(is_xe_device(gpu_fd));
> +
> +			create_massive_size(gpu_fd);
> +			drm_close_driver(gpu_fd);
> +		}
> +		igt_waitchildren();
> +	}
> +
> +
>  	igt_fixture
>  		drm_close_driver(xe);
>  }
> --
> 2.42.0



More information about the igt-dev mailing list