summaryrefslogtreecommitdiff
path: root/tests/eviction_common.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-17 14:43:33 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-17 14:43:33 +0100
commita535cdedfbd280c5e07be1c2445e09973836509a (patch)
tree22239380a3016c00a09249c9d4c5c0f32bf16055 /tests/eviction_common.c
parentaa63fc740c510ed44c1a8dc0fc00f0c92c0581a2 (diff)
lib/os: Pust igt_require into memory check function
More in line with the usual igt pattern and simplifies the code - every called just wrapped it in igt_require. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'tests/eviction_common.c')
-rw-r--r--tests/eviction_common.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/eviction_common.c b/tests/eviction_common.c
index 03d8e8c7..52578e25 100644
--- a/tests/eviction_common.c
+++ b/tests/eviction_common.c
@@ -77,7 +77,7 @@ static int minor_evictions(int fd, struct igt_eviction_test_ops *ops,
total_surfaces = gem_aperture_size(fd) / surface_size + 1;
igt_require(nr_surfaces < total_surfaces);
- igt_require(intel_check_memory(total_surfaces, surface_size, CHECK_RAM));
+ intel_require_memory(total_surfaces, surface_size, CHECK_RAM);
bo = malloc((nr_surfaces + total_surfaces)*sizeof(*bo));
igt_assert(bo);
@@ -112,7 +112,7 @@ static int major_evictions(int fd, struct igt_eviction_test_ops *ops,
uint32_t *bo;
int ret;
- igt_require(intel_check_memory(nr_surfaces, surface_size, CHECK_RAM));
+ intel_require_memory(nr_surfaces, surface_size, CHECK_RAM);
bo = malloc(nr_surfaces*sizeof(*bo));
igt_assert(bo);
@@ -141,12 +141,12 @@ static int swapping_evictions(int fd, struct igt_eviction_test_ops *ops,
uint32_t *bo;
int i, n, pass, ret;
- igt_require(intel_check_memory(working_surfaces, surface_size, CHECK_RAM));
+ intel_require_memory(working_surfaces, surface_size, CHECK_RAM);
if (trash_surfaces < working_surfaces)
trash_surfaces = working_surfaces;
- igt_require(intel_check_memory(trash_surfaces, surface_size, CHECK_RAM | CHECK_SWAP));
+ intel_require_memory(trash_surfaces, surface_size, CHECK_RAM | CHECK_SWAP);
bo = malloc(trash_surfaces*sizeof(*bo));
igt_assert(bo);
@@ -179,7 +179,7 @@ static int forking_evictions(int fd, struct igt_eviction_test_ops *ops,
int num_threads = sysconf(_SC_NPROCESSORS_ONLN);
int bo_count;
- igt_require(intel_check_memory(working_surfaces, surface_size, CHECK_RAM));
+ intel_require_memory(working_surfaces, surface_size, CHECK_RAM);
if (flags & FORKING_EVICTIONS_SWAPPING) {
bo_count = trash_surfaces;
@@ -190,7 +190,7 @@ static int forking_evictions(int fd, struct igt_eviction_test_ops *ops,
bo_count = working_surfaces;
igt_assert(working_surfaces <= bo_count);
- igt_require(intel_check_memory(bo_count, surface_size, CHECK_RAM | CHECK_SWAP));
+ intel_require_memory(bo_count, surface_size, CHECK_RAM | CHECK_SWAP);
bo = malloc(bo_count*sizeof(*bo));
igt_assert(bo);