From: Daniel Vetter Date: Thu, 29 Aug 2013 12:01:34 +0000 (+0200) Subject: tests/gem_tiled_swapping: Use igt_require X-Git-Tag: intel-gpu-tools-1.4~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa06b0bce3f45321f88f769d090af6c3a56eab9a;p=platform%2Fupstream%2Fintel-gpu-tools.git tests/gem_tiled_swapping: Use igt_require Signed-off-by: Daniel Vetter --- diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c index ce7119c..c28a393 100644 --- a/tests/gem_tiled_swapping.c +++ b/tests/gem_tiled_swapping.c @@ -111,22 +111,12 @@ main(int argc, char **argv) idx_arr = calloc(count, sizeof(int)); igt_assert(idx_arr); - if (intel_get_total_swap_mb() == 0) { - printf("no swap detected\n"); - return 77; - } - - if (intel_get_total_ram_mb() / 4 > intel_get_total_swap_mb()) { - printf("not enough swap detected\n"); - return 77; - } + igt_require(intel_get_total_ram_mb() / 4 < intel_get_total_swap_mb()); for (i = 0; i < count; i++) { bo_handles[i] = create_bo_and_fill(fd); - if (bo_handles[i] == 0) { - printf("insufficient address space\n"); - return 77; - } + /* Not enough mmap address space possible. */ + igt_require(bo_handles[i] == 0); } for (i = 0; i < count; i++)