mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 17:36:11 +00:00
igt/gem_exec_parse: Use a macro for pretty printing the test failure
By moving the assert up a level, we get an much improved assertion failure message (e.g. it includes the batch string that fails). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
a1e4ec4a68
commit
b9b82fdc5f
@ -103,8 +103,8 @@ static void exec_batch_patched(int fd, uint32_t cmd_bo, uint32_t *cmds,
|
||||
gem_close(fd, target_bo);
|
||||
}
|
||||
|
||||
static void exec_batch(int fd, uint32_t cmd_bo, uint32_t *cmds,
|
||||
int size, int ring, int expected_ret)
|
||||
static int __exec_batch(int fd, uint32_t cmd_bo, uint32_t *cmds,
|
||||
int size, int ring)
|
||||
{
|
||||
struct drm_i915_gem_execbuffer2 execbuf;
|
||||
struct drm_i915_gem_exec_object2 objs[1];
|
||||
@ -132,10 +132,10 @@ static void exec_batch(int fd, uint32_t cmd_bo, uint32_t *cmds,
|
||||
i915_execbuffer2_set_context_id(execbuf, 0);
|
||||
execbuf.rsvd2 = 0;
|
||||
|
||||
igt_assert_eq(__gem_execbuf(fd, &execbuf), expected_ret);
|
||||
|
||||
gem_sync(fd, cmd_bo);
|
||||
return __gem_execbuf(fd, &execbuf);
|
||||
}
|
||||
#define exec_batch(fd, bo, cmds, sz, ring, expected) \
|
||||
igt_assert_eq(__exec_batch(fd, bo, cmds, sz, ring), expected)
|
||||
|
||||
static void exec_split_batch(int fd, uint32_t *cmds,
|
||||
int size, int ring, int expected_ret)
|
||||
|
Loading…
x
Reference in New Issue
Block a user