diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-11-14 07:45:40 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-11-14 09:17:01 +0000 |
commit | f674a1f61fe1e63209ba3fab05313ba14ffd071e (patch) | |
tree | 3c0063e26811faab099c3929fae803d3d6979b0a /tests/gem_tiled_blits.c | |
parent | d77eda6614a1955717f224be023dedf74eb7735d (diff) |
igt/gem_tiled_blits: Require that we do the full test
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_tiled_blits.c')
-rw-r--r-- | tests/gem_tiled_blits.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/gem_tiled_blits.c b/tests/gem_tiled_blits.c index 58810cac..02a46958 100644 --- a/tests/gem_tiled_blits.c +++ b/tests/gem_tiled_blits.c @@ -123,6 +123,8 @@ static void run_test(int count) uint32_t start = 0; int i; + igt_debug("Using %d 1MiB buffers\n", count); + bo = malloc(sizeof(drm_intel_bo *)*count); bo_start_val = malloc(sizeof(uint32_t)*count); @@ -195,43 +197,41 @@ int fd; int main(int argc, char **argv) { - int count = 0; - igt_subtest_init(argc, argv); igt_fixture { fd = drm_open_any(); - if (igt_run_in_simulation()) - count = 2; - if (argc > 1) - count = atoi(argv[1]); - if (count == 0) { - count = 3 * gem_aperture_size(fd) / (1024*1024) / 2; - count += (count & 1) == 0; - } else if (count < 2) { - fprintf(stderr, "count must be >= 2\n"); - return 1; - } - - if (count > intel_get_total_ram_mb() * 9 / 10) { - count = intel_get_total_ram_mb() * 9 / 10; - igt_info("not enough RAM to run test, reducing buffer count\n"); - } - - igt_info("Using %d 1MiB buffers\n", count); - igt_require(intel_check_memory(count, 1024*1024, CHECK_RAM)); - bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); drm_intel_bufmgr_gem_enable_reuse(bufmgr); drm_intel_bufmgr_gem_set_vma_cache_size(bufmgr, 32); batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd)); } - igt_subtest("normal") + igt_subtest("basic") + run_test(2); + + igt_subtest("normal") { + int count; + + igt_skip_on_simulation(); + + count = 3 * gem_aperture_size(fd) / (1024*1024) / 2; + count += (count & 1) == 0; + igt_require(intel_check_memory(count, 1024*1024, CHECK_RAM)); + run_test(count); + } igt_subtest("interruptible") { + int count; + + igt_skip_on_simulation(); + + count = 3 * gem_aperture_size(fd) / (1024*1024) / 2; + count += (count & 1) == 0; + igt_require(intel_check_memory(count, 1024*1024, CHECK_RAM)); + igt_fork_signal_helper(); run_test(count); igt_stop_signal_helper(); |