[Intel-gfx] [PATCH i-g-t v5 06/13] tests/sw_sync: Add subtest test_sync_wait
Chris Wilson
chris at chris-wilson.co.uk
Thu Sep 15 20:45:16 UTC 2016
On Thu, Sep 15, 2016 at 02:40:11PM -0400, robert.foss at collabora.com wrote:
> From: Robert Foss <robert.foss at collabora.com>
>
> This subtest verifies that waiting on fences works properly.
>
> Signed-off-by: Robert Foss <robert.foss at collabora.com>
> Reviewed-by: Eric Engestrom <eric at engestrom.ch>
> ---
> tests/sw_sync.c | 38 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/tests/sw_sync.c b/tests/sw_sync.c
> index fcb2f57..3061279 100644
> --- a/tests/sw_sync.c
> +++ b/tests/sw_sync.c
> @@ -81,6 +81,41 @@ static void test_alloc_merge_fence(void)
> close(timeline[1]);
> }
>
> +static void test_sync_wait(void)
> +{
Ah, you don't have a real test_sync_wait()
Nor do you check that fences are inherited across fork() or can be sent
over unix sockets.
For test_sync_wait(), some along the lines of create timeline in parent,
fork + create fence in child (wakeup parent) wait(fence), .timeout =
10s), in parent sleep another 1s, increment timeline. Usual assertions.
If the fence was created in the parent and forked to the child, the
parent can assert the fence was signaled to ensure that we expect the
wait to succeed.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list