[PATCH 0/9] selftests/mm: improve mremap_test

From: Sarthak Sharma

Date: Thu Sep 17 2026 - 07:29:21 EST


This series fixes several correctness issues in mremap_test and
simplifies and strengthens its data validation.

Patch 1 converts the mremap_test to use kselftest helpers, removes
manual tracking of failed tests and corrects some spelling errors.

Patches 2 to 5 fix userfaultfd skipping, unexpected mremap success
handling, multi-VMA data validation and failure reporting when data
corruption is detected.

Patch 6 removes the randomization and uses a simple pattern based approach.

Patch 7 removes perf tests and timing infrastructure.

Patch 8 removes validation threshold and always validates complete mappings.

Patch 9 strengthens the multi VMA validation by also checking the
mapping state of holes after remapping.

Sarthak Sharma (9):
selftests/mm: mremap_test: use kselftest helpers
selftests/mm: mremap_test: skip test when userfaultfd is unavailable
selftests/mm: mremap_test: fail unexpected mremap successes
selftests/mm: mremap_test: correct multiple VMA range size
selftests/mm: mremap_test: fail on data corruption
selftests/mm: mremap_test: replace random data with deterministic
pattern
selftests/mm: mremap_test: remove perf tests and timing
selftests/mm: mremap_test: remove validation threshold
selftests/mm: mremap_test: strengthen multi VMA validation

tools/testing/selftests/mm/mremap_test.c | 600 +++++++++--------------
1 file changed, 220 insertions(+), 380 deletions(-)

--
2.53.0