[Intel-gfx] [PATCH i-g-t v6 16/21] tests/sw_sync: Add subtest test_timeline_closed_signaled
robert.foss at collabora.com
robert.foss at collabora.com
Fri Nov 18 15:00:10 UTC 2016
From: Robert Foss <robert.foss at collabora.com>
Add subtest test_timeline_closed_signaled that verifies that a signaled fence
stays signaled after its timeline has been closed.
Signed-off-by: Robert Foss <robert.foss at collabora.com>
---
tests/sw_sync.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tests/sw_sync.c b/tests/sw_sync.c
index 1d2c921..ef21af6 100644
--- a/tests/sw_sync.c
+++ b/tests/sw_sync.c
@@ -89,6 +89,21 @@ static void test_timeline_closed(void)
"Failure waiting on unsignaled fence on closed timeline\n");
}
+static void test_timeline_closed_signaled(void)
+{
+ int fence, ret;
+ int timeline;
+
+ timeline = sw_sync_timeline_create();
+ fence = sw_sync_fence_create(timeline, 1);
+
+ sw_sync_timeline_inc(timeline, 1);
+ close(timeline);
+ ret = sync_wait(fence, 0);
+ igt_assert_f(ret == 0,
+ "Failure waiting on signaled fence for closed timeline\n");
+}
+
static void test_alloc_merge_fence(void)
{
int in_fence[2];
@@ -724,6 +739,9 @@ igt_main
igt_subtest("timeline_closed")
test_timeline_closed();
+ igt_subtest("timeline_closed_signaled")
+ test_timeline_closed_signaled();
+
igt_subtest("alloc_merge_fence")
test_alloc_merge_fence();
--
2.10.2
More information about the Intel-gfx
mailing list