diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-09-25 14:36:59 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-09-25 14:37:07 +0200 |
commit | f3c54d0cb4744af9d58b5be45f574b625bbc8231 (patch) | |
tree | 9c4bd1af155ee0b1b51382a617109aa2e5f119b2 /tests/gem_double_irq_loop.c | |
parent | 88ad6d7be8ab5741b7019a535952145c96577c9c (diff) |
tests: use igt_assert/igt_require more
With the new _f variants we can replace almost all of them.
Also remove a ton of checks for argc != 1, they're a bit useless ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_double_irq_loop.c')
-rw-r--r-- | tests/gem_double_irq_loop.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/tests/gem_double_irq_loop.c b/tests/gem_double_irq_loop.c index bc128614..2dcfaca4 100644 --- a/tests/gem_double_irq_loop.c +++ b/tests/gem_double_irq_loop.c @@ -99,11 +99,6 @@ int main(int argc, char **argv) igt_skip_on_simulation(); - if (argc != 1) { - fprintf(stderr, "usage: %s\n", argv[0]); - igt_fail(-1); - } - fd = drm_open_any(); devid = intel_get_drm_devid(fd); if (!HAS_BLT_RING(devid)) { @@ -112,29 +107,17 @@ int main(int argc, char **argv) } bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); - if (!bufmgr) { - fprintf(stderr, "failed to init libdrm\n"); - igt_fail(-1); - } + igt_assert(bufmgr); drm_intel_bufmgr_gem_enable_reuse(bufmgr); batch = intel_batchbuffer_alloc(bufmgr, devid); - if (!batch) { - fprintf(stderr, "failed to create batch buffer\n"); - igt_fail(-1); - } + igt_assert(batch); target_buffer = drm_intel_bo_alloc(bufmgr, "target bo", 4096, 4096); - if (!target_buffer) { - fprintf(stderr, "failed to alloc target buffer\n"); - igt_fail(-1); - } + igt_assert(target_buffer); blt_bo = drm_intel_bo_alloc(bufmgr, "target bo", 4*4096*4096, 4096); - if (!blt_bo) { - fprintf(stderr, "failed to alloc blt buffer\n"); - igt_fail(-1); - } + igt_assert(blt_bo); dummy_reloc_loop(); |