Re: [PATCH igt] igt/sw_sync: Fix up close(timeline) tests for unsignaled fences

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

 



On Mon, Sep 11, 2017 at 01:35:10PM +0100, Chris Wilson wrote:
> Following
> 
> kernel commit ea4d5a270b57fa8d4871f372ca9b97b7697fdfda
> Author: Dominik Behr <dbehr@xxxxxxxxxxxx>
> Date:   Thu Sep 7 16:02:46 2017 -0300
> 
>     dma-buf/sw_sync: force signal all unsignaled fences on dying timeline
> 
>     To avoid hanging userspace components that might have been waiting on the
>     active fences of the destroyed timeline we need to signal with error all
>     remaining fences on such timeline.
> 
>     This restore the default behaviour of the Android sw_sync framework, which
>     Android still relies on. It was broken on the dma fence conversion a few
>     years ago and never fixed.
> 
> unsignaled fences are now signaled and flagged with ENOENT when the
> timeline is closed. Fixup timeline_closed_signaled to match.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102650
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Michał Winiarski <michal.winiarski@xxxxxxxxx>

-Michał

> ---
>  tests/sw_sync.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/sw_sync.c b/tests/sw_sync.c
> index 946592e8..20dfbbb9 100644
> --- a/tests/sw_sync.c
> +++ b/tests/sw_sync.c
> @@ -82,8 +82,10 @@ static void test_timeline_closed(void)
>  	fence = sw_sync_timeline_create_fence(timeline, 1);
>  
>  	close(timeline);
> -	igt_assert_f(sync_fence_wait(fence, 0) == -ETIME,
> +	igt_assert_f(sync_fence_wait(fence, 0) == 0,
>  		     "Failure waiting on unsignaled fence on closed timeline\n");
> +	igt_assert_f(sync_fence_status(fence) == -ENOENT,
> +		     "Failure in marking up an unsignaled fence on closed timeline\n");
>  }
>  
>  static void test_timeline_closed_signaled(void)
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux