summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-02-12 16:38:04 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-02-12 16:39:29 +0000
commitca3d355846c0b9746d2d6892bd0a4c1413b2abab (patch)
tree6aecb36d8342db4062fad4ae41a2b01b300e55ae /tests
parented40329c30b50c69b25c38fa728151ab9dae00cb (diff)
igt/gem_userptr_blits: Flip sign on error check
Following conversion to __gem_execbuf() we need to consider that it returns -errno when checking the result. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94117 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_userptr_blits.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/gem_userptr_blits.c b/tests/gem_userptr_blits.c
index e306d5c5..d1546571 100644
--- a/tests/gem_userptr_blits.c
+++ b/tests/gem_userptr_blits.c
@@ -149,13 +149,12 @@ copy(int fd, uint32_t dst, uint32_t src, unsigned int error)
exec.flags = HAS_BLT_RING(intel_get_drm_devid(fd)) ? I915_EXEC_BLT : 0;
ret = __gem_execbuf(fd, &exec);
+ gem_close(fd, handle);
if (error == ~0)
igt_assert_neq(ret, 0);
else
- igt_assert(ret == error);
-
- gem_close(fd, handle);
+ igt_assert_eq(ret, -error);
}
static int