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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-05-08 16:44:40 +01:00
parent 578795ff95
commit 09f4175889

View File

@ -345,9 +345,12 @@ test_huge_copy(int fd, int huge, int tiling_a, int tiling_b)
char *a, *b; char *a, *b;
switch (huge) { switch (huge) {
case -1: case -2:
huge_object_size = gem_mappable_aperture_size() / 4; huge_object_size = gem_mappable_aperture_size() / 4;
break; break;
case -1:
huge_object_size = gem_mappable_aperture_size() / 2;
break;
case 0: case 0:
huge_object_size = gem_mappable_aperture_size() + PAGE_SIZE; huge_object_size = gem_mappable_aperture_size() + PAGE_SIZE;
break; break;
@ -575,8 +578,12 @@ igt_main
test_huge_bo(fd, 1, I915_TILING_Y); test_huge_bo(fd, 1, I915_TILING_Y);
igt_subtest("small-copy") 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") 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); test_huge_copy(fd, -1, I915_TILING_X, I915_TILING_Y);
igt_subtest("big-copy") igt_subtest("big-copy")
test_huge_copy(fd, 0, I915_TILING_NONE, I915_TILING_NONE); test_huge_copy(fd, 0, I915_TILING_NONE, I915_TILING_NONE);