summaryrefslogtreecommitdiff
path: root/tests/sw_sync.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-09-11 13:23:27 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-09-12 15:03:17 +0100
commitc7e116007e907f32c18cc2669e2dc4046553c8e6 (patch)
tree5fcb2199c847370ab4ddd07fadab60337bad23fe /tests/sw_sync.c
parentaf4158671c030c9e7f3fbe9e7e2032d145f86d4d (diff)
igt/sw_sync: Fix up close(timeline) tests for unsignaled fences
Following kernel commit ea4d5a270b57fa8d4871f372ca9b97b7697fdfda Author: Dominik Behr <dbehr@chromium.org> Date: Thu Sep 7 16:02:46 2017 -0300 dma-buf/sw_sync: force signal all unsignaled fences on dying timeline To avoid hanging userspace components that might have been waiting on the active fences of the destroyed timeline we need to signal with error all remaining fences on such timeline. This restore the default behaviour of the Android sw_sync framework, which Android still relies on. It was broken on the dma fence conversion a few years ago and never fixed. unsignaled fences are now signaled and flagged with ENOENT when the timeline is closed. Fixup timeline_closed_signaled to match. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102650 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
Diffstat (limited to 'tests/sw_sync.c')
-rw-r--r--tests/sw_sync.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/sw_sync.c b/tests/sw_sync.c
index 946592e8..20dfbbb9 100644
--- a/tests/sw_sync.c
+++ b/tests/sw_sync.c
@@ -82,8 +82,10 @@ static void test_timeline_closed(void)
fence = sw_sync_timeline_create_fence(timeline, 1);
close(timeline);
- igt_assert_f(sync_fence_wait(fence, 0) == -ETIME,
+ igt_assert_f(sync_fence_wait(fence, 0) == 0,
"Failure waiting on unsignaled fence on closed timeline\n");
+ igt_assert_f(sync_fence_status(fence) == -ENOENT,
+ "Failure in marking up an unsignaled fence on closed timeline\n");
}
static void test_timeline_closed_signaled(void)