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>
This commit is contained in:
Chris Wilson
2014-06-03 07:31:49 +01:00
parent 21fb118f3b
commit a384e55b49
3 changed files with 26 additions and 17 deletions
+4 -4
View File
@@ -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