summaryrefslogtreecommitdiff
path: root/tests/gem_evict_everything.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_evict_everything.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_evict_everything.c')
-rw-r--r--tests/gem_evict_everything.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/gem_evict_everything.c b/tests/gem_evict_everything.c
index 6daf6c06..c1eb3bde 100644
--- a/tests/gem_evict_everything.c
+++ b/tests/gem_evict_everything.c
@@ -51,8 +51,8 @@
#define HEIGHT 256
#define WIDTH 1024
-static void
-copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int error)
+static int
+copy(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];
@@ -122,10 +122,11 @@ copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int error)
ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &exec);
if (ret)
ret = errno;
- igt_assert(ret == error);
gem_close(fd, handle);
free(obj);
+
+ return ret;
}
static void clear(int fd, uint32_t handle, int size)