Re: [PATCH i-g-t] tests/prime_vgem: Give meaningful messages on SKIP

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

 



On Wed, Dec 11, 2019 at 10:42:43AM +0100, Janusz Krzysztofik wrote:
> Messages displayed on SKIPs introduced by commit 92caadb4e551
> ("tests/prime_vgem: Skip basic-read/write subtests if not supported")
> don't inform clearly enough that those SKIPs are expected behavior.
> Fix it.
> 
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@xxxxxxxxxxxxxxx>
> Cc: Ewelina Musial <ewelina.musial@xxxxxxxxx>
> ---
>  tests/prime_vgem.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
> index 6595818c..3bdb2300 100644
> --- a/tests/prime_vgem.c
> +++ b/tests/prime_vgem.c
> @@ -46,7 +46,8 @@ static void test_read(int vgem, int i915)
>  	handle = prime_fd_to_handle(i915, dmabuf);
>  	close(dmabuf);
>  
> -	igt_skip_on(__gem_read(i915, handle, 0, &i, sizeof(i)));
> +	igt_skip_on_f(__gem_read(i915, handle, 0, &i, sizeof(i)),
> +		      "PREAD from dma-buf not supported on this hardware\n");
>  
>  	ptr = vgem_mmap(vgem, &scratch, PROT_WRITE);
>  	for (i = 0; i < 1024; i++)
> @@ -83,7 +84,8 @@ static void test_fence_read(int i915, int vgem)
>  	handle = prime_fd_to_handle(i915, dmabuf);
>  	close(dmabuf);
>  
> -	igt_skip_on(__gem_read(i915, handle, 0, &i, sizeof(i)));
> +	igt_skip_on_f(__gem_read(i915, handle, 0, &i, sizeof(i)),
> +		      "PREAD from dma-buf not supported on this hardware\n");
>  
>  	igt_fork(child, 1) {
>  		close(master[0]);
> @@ -195,7 +197,8 @@ static void test_write(int vgem, int i915)
>  	handle = prime_fd_to_handle(i915, dmabuf);
>  	close(dmabuf);
>  
> -	igt_skip_on(__gem_write(i915, handle, 0, &i, sizeof(i)));
> +	igt_skip_on_f(__gem_write(i915, handle, 0, &i, sizeof(i)),
> +		      "PWRITE to dma-buf not supported on this hardware\n");
>  
>  	ptr = vgem_mmap(vgem, &scratch, PROT_READ);
>  	gem_close(vgem, scratch.handle);
> -- 
> 2.21.0
> 

Reviewed-by: Ewelina Musial <ewelina.musial@xxxxxxxxx>
_______________________________________________
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