diff mbox

[i-g-t,v3,04/13] tests/sw_sync: Add subtest test_alloc_fence_invalid_timeline

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

Commit Message

Robert Foss Sept. 13, 2016, 6:22 p.m. UTC
From: Robert Foss <robert.foss@collabora.com>

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>
---
 tests/sw_sync.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox

Patch

diff --git a/tests/sw_sync.c b/tests/sw_sync.c
index 8f6208b..0bc5026 100644
--- a/tests/sw_sync.c
+++ b/tests/sw_sync.c
@@ -56,6 +56,10 @@  static void test_alloc_fence(void)
 	close(timeline);
 }
 
+static void test_alloc_fence_invalid_timeline(void)
+{
+	sw_sync_fence_create(-1, 0);
+}
 
 igt_main
 {
@@ -64,5 +68,8 @@  igt_main
 
 	igt_subtest("alloc_fence")
 		test_alloc_fence();
+
+	igt_subtest("alloc_fence_invalid_timeline")
+		test_alloc_fence_invalid_timeline();
 }