summaryrefslogtreecommitdiff
path: root/tests/i915/api_intel_allocator.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/i915/api_intel_allocator.c')
-rw-r--r--tests/i915/api_intel_allocator.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/i915/api_intel_allocator.c b/tests/i915/api_intel_allocator.c
index 7ff92a17..182d9ba7 100644
--- a/tests/i915/api_intel_allocator.c
+++ b/tests/i915/api_intel_allocator.c
@@ -50,10 +50,19 @@ static void alloc_simple(int fd)
intel_allocator_get_address_range(ahnd, &start, &end);
offset0 = intel_allocator_alloc(ahnd, 1, end - start, 0);
- offset1 = __intel_allocator_alloc(ahnd, 2, 4096, 0);
+ offset1 = __intel_allocator_alloc(ahnd, 2, 4096, 0, ALLOC_STRATEGY_NONE);
igt_assert(offset1 == ALLOC_INVALID_ADDRESS);
intel_allocator_free(ahnd, 1);
+ offset0 = intel_allocator_alloc_with_strategy(ahnd, 1, 4096, 0,
+ ALLOC_STRATEGY_HIGH_TO_LOW);
+ offset1 = intel_allocator_alloc_with_strategy(ahnd, 2, 4096, 0,
+ ALLOC_STRATEGY_LOW_TO_HIGH);
+ igt_assert(offset0 > offset1);
+
+ intel_allocator_free(ahnd, 1);
+ intel_allocator_free(ahnd, 2);
+
igt_assert_eq(intel_allocator_close(ahnd), true);
}