From ca3d355846c0b9746d2d6892bd0a4c1413b2abab Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 12 Feb 2016 16:38:04 +0000 Subject: [PATCH] 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 --- tests/gem_userptr_blits.c | 5 ++--- 1 file 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