[PATCH i-g-t v2 0/3] Introduce memory mapping tests
Krzysztof Niemiec
krzysztof.niemiec at intel.com
Wed Aug 21 13:59:40 UTC 2024
Hi,
This series introduces various tests related to memory mapping.
partial-remap (patch 1), mmap-boundaries (patch 2) and mmap-unmap (patch
3) tests were developed based on test cases made by Jann Horn.
partial-mmap and partial-unmap (both in patch 1) were developed to
replicate Mesa usage, as suggested by Lionel Landwerlin.
This series has been used to test these patches:
1ac5167b3a90 ("drm/i915/gem: Adjust vma offset for framebuffer mmap offset")
8bdd9ef7e9b1 ("drm/i915/gem: Fix Virtual Memory mapping boundaries calculation")
and
https://patchwork.freedesktop.org/series/136981/
Changelog:
v2:
- Wrap uint64_t to pointer casts in from_user_pointer() so that the
tests compile on 32-bit machines,
- Fix duplicate handle assignment in mmap-unmap,
- Prevent the tests from failing, if a map call fails - it might
succeed on another offset type,
- Swap mmap fail check and memory access in mmap-unmap to prevent a
segfault,
- Use gem_close() at the end of tests.
Thanks
Krzysztof
Chris Wilson (1):
tests/intel/gem_mmap_offset: Partial mmap and munmap
Krzysztof Niemiec (2):
tests/intel/gem_mmap_offset: Introduce mmap-boundaries test
tests/intel/gem_mmap_offset: Introduce mmap-unmap test
tests/intel/gem_mmap_offset.c | 285 ++++++++++++++++++++++++++++++++++
1 file changed, 285 insertions(+)
--
2.45.2
More information about the igt-dev
mailing list