diff mbox

[i-g-t,v11,04/21] tests/sw_sync: Add subtest test_alloc_fence_invalid_timeline

Message ID 20161207200754.7690-5-robert.foss@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Foss Dec. 7, 2016, 8:07 p.m. UTC
This subtests tests that creating fences on negative timelines fail.

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

Patch

diff --git a/tests/sw_sync.c b/tests/sw_sync.c
index 3db62cd0..1ec88741 100644
--- a/tests/sw_sync.c
+++ b/tests/sw_sync.c
@@ -55,6 +55,11 @@  static void test_alloc_fence(void)
 	close(timeline);
 }
 
+static void test_alloc_fence_invalid_timeline(void)
+{
+	igt_assert_f(__sw_sync_fence_create(-1, 0) < 0,
+	    "Did not fail to create fence on invalid timeline\n");
+}
 
 igt_main
 {
@@ -63,5 +68,8 @@  igt_main
 
 	igt_subtest("alloc_fence")
 		test_alloc_fence();
+
+	igt_subtest("alloc_fence_invalid_timeline")
+		test_alloc_fence_invalid_timeline();
 }