mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 18:06:13 +00:00
tests/gem_tiled_swapping: Use igt_require
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
cd1f220847
commit
fa06b0bce3
@ -111,22 +111,12 @@ main(int argc, char **argv)
|
|||||||
idx_arr = calloc(count, sizeof(int));
|
idx_arr = calloc(count, sizeof(int));
|
||||||
igt_assert(idx_arr);
|
igt_assert(idx_arr);
|
||||||
|
|
||||||
if (intel_get_total_swap_mb() == 0) {
|
igt_require(intel_get_total_ram_mb() / 4 < intel_get_total_swap_mb());
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
bo_handles[i] = create_bo_and_fill(fd);
|
bo_handles[i] = create_bo_and_fill(fd);
|
||||||
if (bo_handles[i] == 0) {
|
/* Not enough mmap address space possible. */
|
||||||
printf("insufficient address space\n");
|
igt_require(bo_handles[i] == 0);
|
||||||
return 77;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user