Skip to content

selftests/mm: assorted fixes for hmm-tests

Aboorva Devarajan linux-kselftest linux-mm lkml 3 versions – Applied

Status from this message: [merged mm-stable] selftests-mm-fix-exclusive_cow-test-fork-handling.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 4 repliesApplied 3/3
  2. v23 patches 2 repliesSuperseded
  3. v13 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Rebased onto current mm-new.
- Patch 1: reworked the compound testcase check in response to the Shashiko review. Instead of an ASSERT_TRUE() that ORs the PMD and PUD cases on every page (which loses the expected/observed values on failure and would let a fragmented PMD+PUD mapping pass), determine the mapping level once from the first page and then enforce that every page matches it exactly with ASSERT_EQ().
- Patch 2: Unchanged from v2.
- Patch 3: No functional change from v2.

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3selftests/mm: allow PUD-level entries in compound testcase of hmm teststools/testing/selftests/mm/hmm-tests.c+24 -82 repliesApplied
2/3selftests/mm: remove hardcoded THP sizing assumptions in hmm teststools/testing/selftests/mm/hmm-tests.c+43 -191 replyApplied
3/3selftests/mm: fix exclusive_cow test fork() handlingtools/testing/selftests/mm/hmm-tests.c+28 -31 replyApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchBalbir Singh
1/3
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] selftests/mm: assorted fixes for hmm-tests

Hi all,

This series fixes a few issues in hmm-tests that show up when page-size and huge-page configuration differ from the hardcoded assumptions the tests were written for (PMD/THP sizing, default hugepage size, and related cases).

It also includes a fix to exclusive_cow: the test ignored the return value of fork(), so both parent and child ran the same teardown path.

Changes in v3:
- Rebased onto current mm-new.
- Patch 1: reworked the compound testcase check in response to the Shashiko review. Instead of an ASSERT_TRUE() that ORs the PMD and PUD cases on every page (which loses the expected/observed values on failure and would let a fragmented PMD+PUD mapping pass), determine the mapping level once from the first page and then enforce that every page matches it exactly with ASSERT_EQ().
- Patch 2: Unchanged from v2.
- Patch 3: No functional change from v2.

v1: https://lore.kernel.org/all/[email protected]/
v2: https://lore.kernel.org/all/[email protected]/

Please let us know if you have any comments.

Thanks,
Aboorva

Aboorva Devarajan (1):
selftests/mm: fix exclusive_cow test fork() handling

Sayali Patil (2):
selftests/mm: allow PUD-level entries in compound testcase of hmm
tests
selftests/mm: remove hardcoded THP sizing assumptions in hmm tests

 tools/testing/selftests/mm/hmm-tests.c | 125 +++++++++++++++++++------
 1 file changed, 95 insertions(+), 30 deletions(-)

base-commit: 801c5efa788952095586d076fed1ea4902facff8 --
2.54.0