From 09f4175889a2107691a9e21d27d74fcd572121b0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 8 May 2015 16:44:40 +0100 Subject: [PATCH] igt/gem_mmap_gtt: Add pagefault-of-doom failure case This is a test that should be a showcase for partial views... Signed-off-by: Chris Wilson --- tests/gem_mmap_gtt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c index 75e67c1e..a95b98a3 100644 --- a/tests/gem_mmap_gtt.c +++ b/tests/gem_mmap_gtt.c @@ -345,9 +345,12 @@ test_huge_copy(int fd, int huge, int tiling_a, int tiling_b) char *a, *b; switch (huge) { - case -1: + case -2: huge_object_size = gem_mappable_aperture_size() / 4; break; + case -1: + huge_object_size = gem_mappable_aperture_size() / 2; + break; case 0: huge_object_size = gem_mappable_aperture_size() + PAGE_SIZE; break; @@ -575,8 +578,12 @@ igt_main test_huge_bo(fd, 1, I915_TILING_Y); igt_subtest("small-copy") - test_huge_copy(fd, -1, I915_TILING_NONE, I915_TILING_NONE); + test_huge_copy(fd, -2, I915_TILING_NONE, I915_TILING_NONE); igt_subtest("small-copy-XY") + test_huge_copy(fd, -2, I915_TILING_X, I915_TILING_Y); + igt_subtest("medium-copy") + test_huge_copy(fd, -1, I915_TILING_NONE, I915_TILING_NONE); + igt_subtest("medium-copy-XY") test_huge_copy(fd, -1, I915_TILING_X, I915_TILING_Y); igt_subtest("big-copy") test_huge_copy(fd, 0, I915_TILING_NONE, I915_TILING_NONE);