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 | d77eda6614a1955717f224be023dedf74eb7735d (patch) | |
tree | ac95d3fb060d1a126dbca1d775fe9e0510a7bb97 /tests/gem_linear_blits.c | |
parent | b35b1505f762839b0e9a0f8a146804444566a92a (diff) |
igt/gem_linear_blits: Require that we do the full test
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_linear_blits.c')
-rw-r--r-- | tests/gem_linear_blits.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c index 08f4ea4e..0ef583f6 100644 --- a/tests/gem_linear_blits.c +++ b/tests/gem_linear_blits.c @@ -192,6 +192,8 @@ static void run_test(int fd, int count) uint32_t start = 0; int i; + igt_debug("Using %d 1MiB buffers\n", count); + handle = malloc(sizeof(uint32_t)*count*2); start_val = handle + count; @@ -248,37 +250,36 @@ static void run_test(int fd, int count) int main(int argc, char **argv) { - int fd = 0, count = 0; - - igt_skip_on_simulation(); + int fd = 0; igt_subtest_init(argc, argv); igt_fixture { fd = drm_open_any(); - - if (argc > 1) - count = atoi(argv[1]); - if (count == 0) - count = 3 * gem_aperture_size(fd) / (1024*1024) / 2; - 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, sizeof(linear), CHECK_RAM)); } - igt_subtest("normal") + igt_subtest("basic") + run_test(fd, 2); + + igt_subtest("normal") { + int count; + + igt_skip_on_simulation(); + + count = 3 * gem_aperture_size(fd) / (1024*1024) / 2; + igt_require(count > 1); + igt_require(intel_check_memory(count, sizeof(linear), CHECK_RAM)); run_test(fd, count); + } igt_subtest("interruptible") { + int count; + + igt_skip_on_simulation(); + + count = 3 * gem_aperture_size(fd) / (1024*1024) / 2; + igt_require(count > 1); + igt_require(intel_check_memory(count, sizeof(linear), CHECK_RAM)); igt_fork_signal_helper(); run_test(fd, count); igt_stop_signal_helper(); |