diff options
author | Robert Foss <robert.foss@collabora.com> | 2016-12-07 15:07:36 -0500 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2016-12-14 09:24:11 +0100 |
commit | b7bb0556a71eeca04de9dba8cd8044c439187f39 (patch) | |
tree | 4553d61e4d7bb199685cd8d463ebea91544a7abd /tests/sw_sync.c | |
parent | fb5ef0ebc32a935ef6a4d6d593754316bbf88889 (diff) |
tests/sw_sync: Add subtest test_alloc_fence
Add subtest alloc_fence that verifies that it's possible to allocate a fence
on a timeline.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Diffstat (limited to 'tests/sw_sync.c')
-rw-r--r-- | tests/sw_sync.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/sw_sync.c b/tests/sw_sync.c index 42fc1e2b..3db62cd0 100644 --- a/tests/sw_sync.c +++ b/tests/sw_sync.c @@ -43,9 +43,25 @@ static void test_alloc_timeline(void) close(timeline); } +static void test_alloc_fence(void) +{ + int in_fence; + int timeline; + + timeline = sw_sync_timeline_create(); + in_fence = sw_sync_fence_create(timeline, 0); + + close(in_fence); + close(timeline); +} + + igt_main { igt_subtest("alloc_timeline") test_alloc_timeline(); + + igt_subtest("alloc_fence") + test_alloc_fence(); } |