Skip to content

tools/testing: expand mremap testing

Lorenzo Stoakes linux-mm lkml 1 version Applied

Status from this message: [merged mm-stable] tools-testing-selftests-explicitly-test-split-multi-vma-mremap-move.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3tools/testing/selftests: add mremap() shrink test for multiple VMAstools/testing/selftests/mm/mremap_test.c+82 -10 repliesApplied
2/3tools/testing/selftests: test MREMAP_DONTUNMAP on multiple VMA movetools/testing/selftests/mm/mremap_test.c+19 -100 repliesApplied
3/3tools/testing/selftests: explicitly test split multi VMA mremap movetools/testing/selftests/mm/mremap_test.c+126 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] tools/testing: expand mremap testing

Expand our mremap() testing to further assert that behaviour is as expected.

There is a poorly documented mremap() feature whereby it is possible to mremap() multiple VMAs (even with gaps) when shrinking, as long as the resultant shrunk range spans only a single VMA.

So we start by asserting this behaviour functions correctly both with an in-place shrink and a shrink/move.

Next, we further test the newly introduced ability to mremap() multiple VMAs when performing a MAP_FIXED move (that is without the size being changed), firstly by asserting that MREMAP_DONTUNMAP has no bearing on this behaviour.

Finally, we explicitly test that such moves, when splitting source VMAs, function correctly.

Lorenzo Stoakes (3):
tools/testing/selftests: add mremap() shrink test for multiple VMAs tools/testing/selftests: test MREMAP_DONTUNMAP on multiple VMA move tools/testing/selftests: explicitly test split multi VMA mremap move

 tools/testing/selftests/mm/mremap_test.c | 235 ++++++++++++++++++++++-
 1 file changed, 225 insertions(+), 10 deletions(-)

--
2.50.1