diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-10 18:11:47 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-11 08:32:50 +0100 |
commit | caa4a586f001e7c804a51df7090d2d05834d277f (patch) | |
tree | 63a6691d3169d3af0693ff392be9731664393bc5 /tests | |
parent | 145f294d1404e86d06cd7dbfbb6e2034b764ea06 (diff) |
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 <chris@chris-wilson.co.uk>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/syncobj_wait.c | 14 |
1 files changed, 5 insertions, 9 deletions
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); } |