[Intel-gfx] [PATCH i-g-t v6 04/21] tests/sw_sync: Add subtest test_alloc_fence_invalid_timeline

robert.foss at collabora.com robert.foss at collabora.com
Fri Nov 18 14:59:58 UTC 2016


From: Robert Foss <robert.foss at collabora.com>

This subtests tests that creating fences on negative timelines fail.

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

diff --git a/tests/sw_sync.c b/tests/sw_sync.c
index 8e7764a..f9d4fe9 100644
--- a/tests/sw_sync.c
+++ b/tests/sw_sync.c
@@ -58,6 +58,10 @@ static void test_alloc_fence(void)
 	close(timeline);
 }
 
+static void test_alloc_fence_invalid_timeline(void)
+{
+	igt_assert(__sw_sync_fence_create(-1, 0) < 0);
+}
 
 igt_main
 {
@@ -66,5 +70,8 @@ igt_main
 
 	igt_subtest("alloc_fence")
 		test_alloc_fence();
+
+	igt_subtest("alloc_fence_invalid_timeline")
+		test_alloc_fence_invalid_timeline();
 }
 
-- 
2.10.2



More information about the Intel-gfx mailing list