From 874163d5c8433012bcfd00e990c289fa6d2a64ce Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Sun, 27 Mar 2011 14:02:49 +0200 Subject: [PATCH] gem_stress: dump complete failed tile Signed-off-by: Daniel Vetter --- tests/gem_stress.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/gem_stress.c b/tests/gem_stress.c index e8d91880..a58d2292 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -179,6 +179,7 @@ static void cpucpy2d(uint32_t *src, unsigned src_stride, unsigned src_x, unsigne unsigned logical_tile_no) { int i, j; + int failed = 0; for (i = 0; i < TILE_SIZE; i++) { for (j = 0; j < TILE_SIZE; j++) { @@ -189,12 +190,14 @@ static void cpucpy2d(uint32_t *src, unsigned src_stride, unsigned src_x, unsigne uint32_t tmp = src[src_ofs]; if (tmp != expect) { printf("mismatch at tile %i pos %i, read %u, expected %u\n", - logical_tile_no, j*TILE_SIZE, tmp, expect); - exit(1); + logical_tile_no, i*TILE_SIZE + j, tmp, expect); + failed = 1; } dst[dst_ofs] = tmp; } } + if (failed) + exit(1); } static void next_copyfunc(void);