summaryrefslogtreecommitdiff
path: root/tests/gem_render_linear_blits.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-03-08 13:09:00 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-03-10 12:51:16 +0000
commite8eb9afd4c53e67d834f520a42a641adb874a463 (patch)
treefd8b98d66685e4f0dfd097d39b51bdf92e116311 /tests/gem_render_linear_blits.c
parentdf75b388f915c813e69b3139e16c45ffe956c58b (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_render_linear_blits.c')
-rw-r--r--tests/gem_render_linear_blits.c12
1 files changed, 11 insertions, 1 deletions
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);