diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-12-05 10:09:08 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-12-05 10:18:03 +0100 |
commit | 53e184b228b9bda43df75aa4ff919bc23f5caa09 (patch) | |
tree | e29df0d7d973350435bc91dab274c031a6c5142a /tests | |
parent | ad5919617cbccd2f7a2c8311c8ebe83e6d0acd52 (diff) |
tests/gem_dummy_reloc_loop: some updates
- convert to subtests
- shut up stderr output for successful runs
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/gem_dummy_reloc_loop.c | 56 |
2 files changed, 31 insertions, 27 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 4658fced..4fd7c419 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,6 +17,7 @@ TESTS_progs_M = \ gem_cacheing \ gem_cpu_concurrent_blit \ gem_cs_tlb \ + gem_dummy_reloc_loop \ gem_exec_bad_domains \ gem_exec_nop \ gem_flink \ @@ -70,7 +71,6 @@ TESTS_progs = \ gem_storedw_loop_blt \ gem_storedw_loop_bsd \ gem_storedw_batches_loop \ - gem_dummy_reloc_loop \ gem_double_irq_loop \ gem_ring_sync_loop \ gem_pipe_control_store_loop \ diff --git a/tests/gem_dummy_reloc_loop.c b/tests/gem_dummy_reloc_loop.c index 82d8f77e..b67c7d34 100644 --- a/tests/gem_dummy_reloc_loop.c +++ b/tests/gem_dummy_reloc_loop.c @@ -127,10 +127,7 @@ int main(int argc, char **argv) int fd; int devid; - if (argc != 1) { - fprintf(stderr, "usage: %s\n", argv[0]); - exit(-1); - } + drmtest_subtest_init(argc, argv); fd = drm_open_any(); devid = intel_get_drm_devid(fd); @@ -158,32 +155,39 @@ int main(int argc, char **argv) exit(-1); } - fprintf(stderr, "running dummy loop on render\n"); - dummy_reloc_loop(I915_EXEC_RENDER); - fprintf(stderr, "dummy loop run on render completed\n"); - - if (!HAS_BSD_RING(devid)) - goto skip; - - sleep(2); - fprintf(stderr, "running dummy loop on bsd\n"); - dummy_reloc_loop(I915_EXEC_BSD); - fprintf(stderr, "dummy loop run on bsd completed\n"); + if (drmtest_run_subtest("render")) { + printf("running dummy loop on render\n"); + dummy_reloc_loop(I915_EXEC_RENDER); + printf("dummy loop run on render completed\n"); + } - if (!HAS_BLT_RING(devid)) - goto skip; + if (drmtest_run_subtest("bsd")) { + if (HAS_BSD_RING(devid)) { + sleep(2); + printf("running dummy loop on bsd\n"); + dummy_reloc_loop(I915_EXEC_BSD); + printf("dummy loop run on bsd completed\n"); + } + } - sleep(2); - fprintf(stderr, "running dummy loop on blt\n"); - dummy_reloc_loop(I915_EXEC_BLT); - fprintf(stderr, "dummy loop run on blt completed\n"); + if (drmtest_run_subtest("blt")) { + if (HAS_BLT_RING(devid)) { + sleep(2); + printf("running dummy loop on blt\n"); + dummy_reloc_loop(I915_EXEC_BLT); + printf("dummy loop run on blt completed\n"); + } + } - sleep(2); - fprintf(stderr, "running dummy loop on random rings\n"); - dummy_reloc_loop_random_ring(); - fprintf(stderr, "dummy loop run on random rings completed\n"); + if (drmtest_run_subtest("mixed")) { + if (HAS_BLT_RING(devid) && HAS_BSD_RING(devid)) { + sleep(2); + printf("running dummy loop on random rings\n"); + dummy_reloc_loop_random_ring(); + printf("dummy loop run on random rings completed\n"); + } + } -skip: drm_intel_bo_unreference(target_buffer); intel_batchbuffer_free(batch); drm_intel_bufmgr_destroy(bufmgr); |