[igt-dev] [RFC PATCH i-g-t v2] tests/gem_userptr_blits: Enhance invalid mapping exercise
Chris Wilson
chris at chris-wilson.co.uk
Tue Feb 11 16:44:59 UTC 2020
Quoting Janusz Krzysztofik (2020-02-11 14:30:48)
> @@ -2009,8 +2016,31 @@ igt_main_args("c:", NULL, help_str, opt_handler, NULL)
> igt_subtest("invalid-null-pointer")
> test_invalid_null_pointer(fd);
>
> - igt_subtest("invalid-gtt-mapping")
> - test_invalid_gtt_mapping(fd);
> + igt_describe("Verify userptr on top of GTT mapping to GEM object will fail");
> + igt_subtest("invalid-gtt-mapping") {
> + gem_require_mappable_ggtt(fd);
> + test_invalid_mapping(fd, I915_MMAP_OFFSET_GTT);
> + }
#include "i915/gem_mman.h"
igt_subtest_with_dynamic("invalid-mmap-offset") {
for_each_mmap_offset_type(t) {
igt_dynamic_f("%s", t->name)
test_invalid_mapping(fd, t);
In test_invalid_mapping, instead of do_ioctl(MMAP_OFFSET) use
igt_require(igt_ioctl(MMAP_OFFSET, &arg) == 0);
(Or igt_require_f if you like to keep the spiel.)
}
}
}
More information about the igt-dev
mailing list