diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-05-14 09:56:53 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-05-14 09:56:53 +0200 |
commit | 0b7ce4ac2929ea56dfde508d551163a5304c66d8 (patch) | |
tree | 7af13f919437cc28ab61dbae3fee42a159fcfb6f /tests/gen3_render_tiledx_blits.c | |
parent | e624fa8a2e1a31494c6e47a65e378e480882422d (diff) |
tests: Use igt macros more
Often just folding together of the common if (cond) printf;
abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out
more since the igt macros will already print the condition and errno.
A few tests where more work (like ripping out return codes en masse)
is needed left as-is.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gen3_render_tiledx_blits.c')
-rw-r--r-- | tests/gen3_render_tiledx_blits.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/gen3_render_tiledx_blits.c b/tests/gen3_render_tiledx_blits.c index e9c0679e..95c0c96b 100644 --- a/tests/gen3_render_tiledx_blits.c +++ b/tests/gen3_render_tiledx_blits.c @@ -323,12 +323,10 @@ check_bo(int fd, uint32_t handle, uint32_t val) v = gem_mmap(fd, handle, WIDTH*HEIGHT*4, PROT_READ); igt_assert(v); for (i = 0; i < WIDTH*HEIGHT; i++) { - if (v[i] != val) { - fprintf(stderr, "Expected 0x%08x, found 0x%08x " - "at offset 0x%08x\n", - val, v[i], i * 4); - abort(); - } + igt_assert_f(v[i] == val, + "Expected 0x%08x, found 0x%08x " + "at offset 0x%08x\n", + val, v[i], i * 4); val++; } munmap(v, WIDTH*HEIGHT*4); @@ -344,10 +342,7 @@ int main(int argc, char **argv) fd = drm_open_any(); - if (!IS_GEN3(intel_get_drm_devid(fd))) { - printf("gen3-only test, doing nothing\n"); - return 77; - } + igt_require(IS_GEN3(intel_get_drm_devid(fd))); count = 0; if (argc > 1) |