From c27aaca295d3ca2a38521e571c012449371e4bb5 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 19 Nov 2018 12:03:22 +0100 Subject: tests/i915/gem_render_tiled_blits: Make sure igt_buf is initially zero'd gen8_bind_buf looks at buf->aux.stride/offset, which is not set by the test. When I added the bpp field, it was enough to make the test fail, fix this by making sure that the buf is initially zero'd explicitly, which fixes the test to run reliably 100% of the time. Signed-off-by: Maarten Lankhorst Reviewed-by: Petri Latvala #irc --- tests/i915/gem_render_tiled_blits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i915/gem_render_tiled_blits.c b/tests/i915/gem_render_tiled_blits.c index 3484d561..ef81c787 100644 --- a/tests/i915/gem_render_tiled_blits.c +++ b/tests/i915/gem_render_tiled_blits.c @@ -120,7 +120,7 @@ static void run_test (int fd, int count) igt_info("Using a snoop linear buffer for comparisons\n"); } - buf = malloc(sizeof(*buf)*count); + buf = calloc(sizeof(*buf), count); start_val = malloc(sizeof(*start_val)*count); for (i = 0; i < count; i++) { -- cgit v1.2.3