Re: [igt-dev] [PATCH i-g-t 4/9] tests/gem_gpgpu_fill: Convert from simple to standard igt_main

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 19, 2021 at 03:53:32PM +0100, Matthew Auld wrote:
> From: Dominik Grzegorzek <dominik.grzegorzek@xxxxxxxxx>
> 
> As we need to add new test variants, convert the code to standard
> igt_main format so those variants can be easily accommodated.
> 
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@xxxxxxxxxxxxxxx>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@xxxxxxxxxxxxxxx>
> Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx>

I'm not sure but Janusz likely started migration so you can remove
me from SoB. Then I can give:

Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@xxxxxxxxx>

--
Zbigniew

> ---
>  tests/i915/gem_gpgpu_fill.c | 25 ++++++++++++++++---------
>  1 file changed, 16 insertions(+), 9 deletions(-)
> 
> diff --git a/tests/i915/gem_gpgpu_fill.c b/tests/i915/gem_gpgpu_fill.c
> index c605629f..5b11fb35 100644
> --- a/tests/i915/gem_gpgpu_fill.c
> +++ b/tests/i915/gem_gpgpu_fill.c
> @@ -123,20 +123,27 @@ static void gpgpu_fill(data_t *data, igt_fillfunc_t fill)
>  
>  	munmap(ptr, buf->surface[0].size);
>  }
> -
> -igt_simple_main
> +igt_main
>  {
>  	data_t data = {0, };
>  	igt_fillfunc_t fill_fn = NULL;
>  
> -	data.drm_fd = drm_open_driver_render(DRIVER_INTEL);
> -	data.devid = intel_get_drm_devid(data.drm_fd);
> -	igt_require_gem(data.drm_fd);
> -	data.bops = buf_ops_create(data.drm_fd);
> +	igt_fixture {
> +		data.drm_fd = drm_open_driver_render(DRIVER_INTEL);
> +		data.devid = intel_get_drm_devid(data.drm_fd);
> +		igt_require_gem(data.drm_fd);
> +		data.bops = buf_ops_create(data.drm_fd);
> +
> +		fill_fn = igt_get_gpgpu_fillfunc(data.devid);
> +
> +		igt_require_f(fill_fn, "no gpgpu-fill function\n");
>  
> -	fill_fn = igt_get_gpgpu_fillfunc(data.devid);
> +	}
>  
> -	igt_require_f(fill_fn, "no gpgpu-fill function\n");
> +	igt_subtest("basic")
> +		gpgpu_fill(&data, fill_fn);
>  
> -	gpgpu_fill(&data, fill_fn);
> +	igt_fixture {
> +		buf_ops_destroy(data.bops);
> +	}
>  }
> -- 
> 2.26.3
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux