[PATCH i-g-t v2 03/13] tests/sw_sync: Add subtest test_alloc_fence

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

 



From: Robert Foss <robert.foss@xxxxxxxxxxxxx>

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

Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxxxxx>
Reviewed-by: Eric Engestrom <eric@xxxxxxxxxxxx>
---
 tests/sw_sync.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/sw_sync.c b/tests/sw_sync.c
index d2d4c42..a8c8ca4 100644
--- a/tests/sw_sync.c
+++ b/tests/sw_sync.c
@@ -43,9 +43,25 @@ static void test_alloc_timeline(void)
 	sw_sync_timeline_destroy(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);
+
+	sw_sync_fence_destroy(in_fence);
+	sw_sync_timeline_destroy(timeline);
+}
+
+
 igt_main
 {
 	igt_subtest("alloc_timeline")
 		test_alloc_timeline();
+
+	igt_subtest("alloc_fence")
+		test_alloc_fence();
 }
 
-- 
2.9.3

_______________________________________________
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