From e8eb9afd4c53e67d834f520a42a641adb874a463 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 8 Mar 2017 13:09:00 +0000 Subject: igt: Exercise the shrinker Introduce a new fork helper that spawns a process that just repeatedly calls i915_gem_shrink_all() and watch what happens as we try to use objects that have been shrunk. Signed-off-by: Chris Wilson --- tests/gem_render_linear_blits.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/gem_render_linear_blits.c') diff --git a/tests/gem_render_linear_blits.c b/tests/gem_render_linear_blits.c index 13f76a56..acc3bd5a 100644 --- a/tests/gem_render_linear_blits.c +++ b/tests/gem_render_linear_blits.c @@ -197,12 +197,22 @@ igt_main /* the rest of the tests are too long for simulation */ igt_skip_on_simulation(); - igt_subtest("apperture-thrash") { + igt_subtest("aperture-thrash") { count = 3 * gem_aperture_size(fd) / SIZE / 2; intel_require_memory(count, SIZE, CHECK_RAM); run_test(fd, count); } + igt_subtest("aperture-shrink") { + igt_fork_shrink_helper(); + + count = 3 * gem_aperture_size(fd) / SIZE / 2; + intel_require_memory(count, SIZE, CHECK_RAM); + run_test(fd, count); + + igt_stop_shrink_helper(); + } + igt_subtest("swap-thrash") { uint64_t swap_mb = intel_get_total_swap_mb(); igt_require(swap_mb > 0); -- cgit v1.2.3