mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +00:00
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:
parent
c537c23efc
commit
4cf1d089eb
@ -64,8 +64,8 @@ uint32_t batch_handle;
|
|||||||
static void source_offset_tests(int devid, bool reloc_gtt)
|
static void source_offset_tests(int devid, bool reloc_gtt)
|
||||||
{
|
{
|
||||||
struct drm_i915_gem_relocation_entry single_reloc;
|
struct drm_i915_gem_relocation_entry single_reloc;
|
||||||
char *dst_gtt;
|
void *dst_gtt;
|
||||||
char *relocation_type;
|
const char *relocation_type = "";
|
||||||
|
|
||||||
igt_fixture {
|
igt_fixture {
|
||||||
handle = gem_create(fd, 8192);
|
handle = gem_create(fd, 8192);
|
||||||
@ -214,6 +214,12 @@ static void reloc_tests(void)
|
|||||||
execobjs[0].relocs_ptr = 0;
|
execobjs[0].relocs_ptr = 0;
|
||||||
|
|
||||||
execbuf.buffer_count = 1;
|
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") {
|
igt_subtest("batch-start-unaligned") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user