[Intel-gfx] [PATCH igt 2/2] igt/syncobj_wait: Close the sw_sync timeline after the test

Chris Wilson chris at chris-wilson.co.uk
Tue Oct 10 17:19:10 UTC 2017


Closing the sw_sync timeline now signals any remaining fences upon it;
but test_wait_interrupted requires the fence to be busy for the
__syncobj_wait() not to immediately return with -ETIME (and so be
interrupted instead).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103187
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Jason Ekstrand <jason at jlekstrand.net>
Cc: Dave Airlie <airlied at redhat.com
---
 tests/syncobj_wait.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/syncobj_wait.c b/tests/syncobj_wait.c
index 78ed1fc5..5fd37808 100644
--- a/tests/syncobj_wait.c
+++ b/tests/syncobj_wait.c
@@ -726,13 +726,13 @@ test_wait_interrupted(int fd, uint32_t test_flags)
 	}
 
 	timeline = syncobj_attach_sw_sync(fd, syncobj);
-	close(timeline);
 
 	wait.timeout_nsec = short_timeout();
 	igt_while_interruptible(true)
 		igt_assert_eq(__syncobj_wait(fd, &wait), -ETIME);
 
 	syncobj_destroy(fd, syncobj);
+	close(timeline);
 }
 
 static bool
-- 
2.15.0.rc0



More information about the Intel-gfx mailing list