summaryrefslogtreecommitdiff
path: root/tests/gem_userptr_blits.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-03 07:31:49 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-03 07:35:54 +0100
commita384e55b49dce17eff1945536f957546bc7902cf (patch)
tree9c4efa06e13712237049bf2c2378b9a92ed416b1 /tests/gem_userptr_blits.c
parent21fb118f3b3f16f9cdc6cadf68204e745f0a8a68 (diff)
igt/gem_evict_everything: Move assertion
If we move the assertion from out of the callback, we can get a much more useful error message. References: https://bugs.freedesktop.org/show_bug.cgi?id=79573 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_userptr_blits.c')
-rw-r--r--tests/gem_userptr_blits.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gem_userptr_blits.c b/tests/gem_userptr_blits.c
index fcf6fa63..14efddae 100644
--- a/tests/gem_userptr_blits.c
+++ b/tests/gem_userptr_blits.c
@@ -223,8 +223,8 @@ copy(int fd, uint32_t dst, uint32_t src, unsigned int error)
gem_close(fd, handle);
}
-static void
-blit(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int error)
+static int
+blit(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo)
{
uint32_t batch[12];
struct drm_i915_gem_relocation_entry reloc[2];
@@ -297,10 +297,10 @@ blit(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int error)
if (ret)
ret = errno;
- igt_assert(ret == error);
-
gem_close(fd, handle);
free(obj);
+
+ return ret;
}
static uint32_t