[Intel-gfx] [PATCH i-g-t v10 03/21] tests/sw_sync: Add subtest test_alloc_fence

Robert Foss robert.foss at collabora.com
Wed Dec 7 02:51:55 UTC 2016


Add subtest alloc_fence that verifies that it's possible to allocate a fence
on a timeline.

Signed-off-by: Robert Foss <robert.foss at collabora.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
---
 tests/sw_sync.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

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();
 }
 
-- 
2.11.0



More information about the Intel-gfx mailing list