summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/gem_tiled_swapping.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c
index 1af36525..d1484f0e 100644
--- a/tests/gem_tiled_swapping.c
+++ b/tests/gem_tiled_swapping.c
@@ -112,6 +112,11 @@ main(int argc, char **argv)
return 77;
}
+ if (intel_get_total_ram_mb() / 4 > intel_get_total_swap_mb()) {
+ printf("not enough swap detected\n");
+ return 77;
+ }
+
for (i = 0; i < count; i++)
bo_handles[i] = create_bo_and_fill(fd);