linux/tools/testing
Lorenzo Stoakes da0618c146 selftest/vm: add mremap expand merge offset test
Add a test to assert that we can mremap() and expand a mapping starting
from an offset within an existing mapping.  We unmap the last page in a 3
page mapping to ensure that the remap should always succeed, before
remapping from the 2nd page.

This is additionally a regression test for the issue solved in "mm,
mremap: fix mremap() expanding vma with addr inside vma" and confirmed to
fail prior to the change and pass after it.

Finally, this patch updates the existing mremap expand merge test to check
error conditions and reduce code duplication between the two tests.

[lstoakes@gmail.com: increment num_expand_tests so test doesn't complain about unexpected tests being run]
  Link: https://lkml.kernel.org/r/8ff3ba3cadc0b6c1b2688ae5c851bf73aa062d57.1673701836.git.lstoakes@gmail.com
Link: https://lkml.kernel.org/r/02b117a8ffd52acc01dc66c2fb39754f08d92c0e.1672675824.git.lstoakes@gmail.com
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Jakub Matěna <matenajakub@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-01-18 17:12:56 -08:00
..
crypto/chacha20-s390
cxl tools/testing/cxl: Require cache invalidation bypass 2022-12-05 12:33:20 -08:00
fault-injection
ktest ktest.pl: Add shell commands to variables 2022-12-08 23:23:05 -05:00
kunit kunit: tool: make parser preserve whitespace when printing test log 2022-12-12 14:13:48 -07:00
memblock mm: Always release pages to the buddy allocator in memblock_free_late(). 2023-01-08 18:49:33 +02:00
nvdimm libnvdimm: Introduce CONFIG_NVDIMM_SECURITY_TEST flag 2022-12-01 12:42:35 -08:00
radix-tree maple_tree: remove GFP_ZERO from kmem_cache_alloc() and kmem_cache_alloc_bulk() 2023-01-18 17:12:54 -08:00
scatterlist
selftests selftest/vm: add mremap expand merge offset test 2023-01-18 17:12:56 -08:00
vsock vsock_test: POLLIN + SO_RCVLOWAT test 2022-08-23 10:43:12 +02:00