diff options
author | John Harrison <John.C.Harrison@Intel.com> | 2022-01-20 17:09:28 -0800 |
---|---|---|
committer | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2022-01-21 11:03:32 -0800 |
commit | f73008bac9a8db0779264b170f630483e9165764 (patch) | |
tree | ac8e8f8a0b5e5a97c80dafc10b8bf7113e89b2ee | |
parent | 38f656fdd61119105ecfa2c4dac157cd7dcad204 (diff) |
tests/i915/gem_exec_capture: Fix memory object size in gem_exec_capture
The capture tests require knowing exactly how big the test allocation
is. Part of the test is to compare the captured size against the
allocated size to make sure they match. That doesn't work if the
allocator creates an object of a different size than was requested
without reporting the larger size.
Fixes: 85a593809 ("tests/i915/gem_exec_capture: Add support for local memory")
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
-rw-r--r-- | tests/i915/gem_exec_capture.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c index 5b248251..60f8df04 100644 --- a/tests/i915/gem_exec_capture.c +++ b/tests/i915/gem_exec_capture.c @@ -387,10 +387,9 @@ static void capture(int fd, int dir, const intel_ctx_t *ctx, const struct intel_execution_engine2 *e, uint32_t region) { uint32_t handle; - uint64_t ahnd; - int obj_size = 4096; + uint64_t ahnd, obj_size = 4096; - handle = gem_create_in_memory_regions(fd, obj_size, region); + igt_assert_eq(__gem_create_in_memory_regions(fd, &handle, &obj_size, region), 0); ahnd = get_reloc_ahnd(fd, ctx->id); __capture1(fd, dir, ahnd, ctx, e, handle, obj_size, region); |