tests/gem_reloc_overflow: Polish after Rafael's patch

- use void* for generic pointer.
- Fix const usage.
- Shut up gcc about uninitizialized var.
- Be paranoid about the moved tests and make double-sure that the
  batch would indeed work safe for the condition being tested.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2013-11-07 13:43:43 +01:00
parent c537c23efc
commit 4cf1d089eb

View File

@ -64,8 +64,8 @@ uint32_t batch_handle;
static void source_offset_tests(int devid, bool reloc_gtt)
{
struct drm_i915_gem_relocation_entry single_reloc;
char *dst_gtt;
char *relocation_type;
void *dst_gtt;
const char *relocation_type = "";
igt_fixture {
handle = gem_create(fd, 8192);
@ -214,6 +214,12 @@ static void reloc_tests(void)
execobjs[0].relocs_ptr = 0;
execbuf.buffer_count = 1;
/* Make sure the batch would succeed except for the thing we're
* testing. */
execbuf.batch_start_offset = 0;
execbuf.batch_len = 8;
igt_assert(ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf) == 0);
}
igt_subtest("batch-start-unaligned") {