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>
This commit is contained in:
Chris Wilson 2016-02-12 16:38:04 +00:00
parent ed40329c30
commit ca3d355846

View File

@ -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