From caa4a586f001e7c804a51df7090d2d05834d277f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 10 Oct 2017 18:11:47 +0100 Subject: igt/syncobj_wait: Replace open-coded calls to __syncobj_wait() Remove the bare igt_ioctl(SYNCOBJ_WAIT) in favour of __syncobj_wait() for tidier error reporting. Signed-off-by: Chris Wilson Cc: Jason Ekstrand Cc: Dave Airlie Reviewed-by: Jason Ekstrand --- tests/syncobj_wait.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'tests/syncobj_wait.c') diff --git a/tests/syncobj_wait.c b/tests/syncobj_wait.c index 385d8cd8..78ed1fc5 100644 --- a/tests/syncobj_wait.c +++ b/tests/syncobj_wait.c @@ -713,7 +713,7 @@ test_wait_interrupted(int fd, uint32_t test_flags) { struct local_syncobj_wait wait = { 0 }; uint32_t syncobj = syncobj_create(fd, 0); - int ret, timeline; + int timeline; wait.handles = to_user_pointer(&syncobj); wait.count_handles = 1; @@ -721,20 +721,16 @@ test_wait_interrupted(int fd, uint32_t test_flags) if (test_flags & WAIT_FOR_SUBMIT) { wait.timeout_nsec = short_timeout(); - igt_while_interruptible(true) { - ret = igt_ioctl(fd, LOCAL_IOCTL_SYNCOBJ_WAIT, &wait); - igt_assert(ret == -1 && errno == ETIME); - } + igt_while_interruptible(true) + igt_assert_eq(__syncobj_wait(fd, &wait), -ETIME); } timeline = syncobj_attach_sw_sync(fd, syncobj); close(timeline); wait.timeout_nsec = short_timeout(); - igt_while_interruptible(true) { - ret = igt_ioctl(fd, LOCAL_IOCTL_SYNCOBJ_WAIT, &wait); - igt_assert(ret == -1 && errno == ETIME); - } + igt_while_interruptible(true) + igt_assert_eq(__syncobj_wait(fd, &wait), -ETIME); syncobj_destroy(fd, syncobj); } -- cgit v1.2.3