From 83440953e50d1c46217ce9bdcd74aa9a4671913d Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 13 Aug 2013 12:35:58 +0200 Subject: tests: s/assert/igt_assert Just a wholesale rollout for now, we can refine later on. Signed-off-by: Daniel Vetter --- tests/prime_nv_pcopy.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/prime_nv_pcopy.c') diff --git a/tests/prime_nv_pcopy.c b/tests/prime_nv_pcopy.c index a0fb9d26..b7aad707 100644 --- a/tests/prime_nv_pcopy.c +++ b/tests/prime_nv_pcopy.c @@ -356,8 +356,8 @@ static int swtile_y(uint8_t *out, const uint8_t *in, int w, int h) { uint32_t x, y, dx, dy; uint8_t *endptr = out + w * h; - assert(!(w % 128)); - assert(!(h % 32)); + igt_assert(!(w % 128)); + igt_assert(!(h % 32)); for (y = 0; y < h; y += 32) { for (x = 0; x < w; x += 128, out += TILE_SIZE) { @@ -365,8 +365,8 @@ static int swtile_y(uint8_t *out, const uint8_t *in, int w, int h) for (dy = 0; dy < 32; ++dy) { uint32_t out_ofs = (dx * 32 + dy) * 16; uint32_t in_ofs = (y + dy) * w + (x + 16 * dx); - assert(out_ofs < TILE_SIZE); - assert(in_ofs < w*h); + igt_assert(out_ofs < TILE_SIZE); + igt_assert(in_ofs < w*h); // To do the Y tiling quirk: // out_ofs = out_ofs ^ (((out_ofs >> 9) & 1) << 6); @@ -375,7 +375,7 @@ static int swtile_y(uint8_t *out, const uint8_t *in, int w, int h) } } } - assert(out == endptr); + igt_assert(out == endptr); return 0; } @@ -383,21 +383,21 @@ static int swtile_x(uint8_t *out, const uint8_t *in, int w, int h) { uint32_t x, y, dy; uint8_t *endptr = out + w * h; - assert(!(w % 512)); - assert(!(h % 8)); + igt_assert(!(w % 512)); + igt_assert(!(h % 8)); for (y = 0; y < h; y += 8) { for (x = 0; x < w; x += 512, out += TILE_SIZE) { for (dy = 0; dy < 8; ++dy) { uint32_t out_ofs = 512 * dy; uint32_t in_ofs = (y + dy) * w + x; - assert(out_ofs < TILE_SIZE); - assert(in_ofs < w*h); + igt_assert(out_ofs < TILE_SIZE); + igt_assert(in_ofs < w*h); memcpy(&out[out_ofs], &in[in_ofs], 512); } } } - assert(out == endptr); + igt_assert(out == endptr); return 0; } -- cgit v1.2.3