diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-01-23 09:44:19 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-01-27 14:45:18 +0000 |
commit | e3b68bb66683ad4cb4c80df904a3a21c98a2b6c2 (patch) | |
tree | 88a796e097456e3f1c3e8d821da1d91529626679 /tests/gem_fenced_exec_thrash.c | |
parent | 711398e82af469394559105a4f4c6dc21f582ffe (diff) |
lib: Share common __gem_execbuf()
An oft-repeated function to check EXECBUFFER2 for a particular fail
condition.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_fenced_exec_thrash.c')
-rw-r--r-- | tests/gem_fenced_exec_thrash.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/gem_fenced_exec_thrash.c b/tests/gem_fenced_exec_thrash.c index a74bc361..53ab7d05 100644 --- a/tests/gem_fenced_exec_thrash.c +++ b/tests/gem_fenced_exec_thrash.c @@ -141,14 +141,6 @@ static void fill_reloc(struct drm_i915_gem_relocation_entry *reloc, uint32_t han reloc->write_domain = 0; } -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *eb) -{ - int err = 0; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, eb)) - err = errno; - return err; -} - #define BUSY_LOAD (1 << 0) #define INTERRUPTIBLE (1 << 1) @@ -200,8 +192,8 @@ static void run_test(int fd, int num_fences, int expected_errno, if (flags & BUSY_LOAD) emit_dummy_load(); - igt_assert_eq(__gem_execbuf(fd, &execbuf[0]), expected_errno); - igt_assert_eq(__gem_execbuf(fd, &execbuf[1]), expected_errno); + igt_assert_eq(__gem_execbuf(fd, &execbuf[0]), -expected_errno); + igt_assert_eq(__gem_execbuf(fd, &execbuf[1]), -expected_errno); } while (--loop); if (flags & INTERRUPTIBLE) |