summaryrefslogtreecommitdiff
path: root/tests/gem_tiled_swapping.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-29 14:01:34 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-29 18:18:33 +0200
commitfa06b0bce3f45321f88f769d090af6c3a56eab9a (patch)
treeed63fdc40a1aab8a564c1157a52014e2be4d9454 /tests/gem_tiled_swapping.c
parentcd1f220847c34610ab9e07c3cf1c5a7e77284eb8 (diff)
tests/gem_tiled_swapping: Use igt_require
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_tiled_swapping.c')
-rw-r--r--tests/gem_tiled_swapping.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c
index ce7119cc..c28a393e 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++)