[PATCH v4] selftest/vm: Move the 128 TB mmap boundary test to the generic VM directory

From: Ingo Molnar
Date: Mon Jan 08 2018 - 11:14:44 EST



* Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> wrote:

> Architectures like ppc64 do support mmap hint addr based large address space
> selection. This test can be run on those architectures too. Move the test to
> selftest/vm so that other archs can use the same.
>
> We also add a few new test scenarios in this patch. We do test few boundary
> condition before we do a high address mmap. ppc64 use the addr limit to validate
> addr in the fault path. We had bugs in this area w.r.t slb fault handling
> before we updated the addr limit.
>
> We also touch the allocated space to make sure we don't have any bugs in the
> fault handling path.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
> ---
> Changes from V2:
> * Rebase on top of -tip tree.
> * update the correct license
> * use memset to touch the full mmap range.
>
> tools/testing/selftests/vm/Makefile | 1 +
> tools/testing/selftests/vm/run_vmtests | 11 ++
> tools/testing/selftests/vm/va_128TBswitch.c | 297 ++++++++++++++++++++++++++++
> tools/testing/selftests/x86/5lvl.c | 177 -----------------
> 4 files changed, 309 insertions(+), 177 deletions(-)
> create mode 100644 tools/testing/selftests/vm/va_128TBswitch.c
> delete mode 100644 tools/testing/selftests/x86/5lvl.c

This will now apply (almost) cleanly to Linus's latest tree - I fixed up a trivial
conflict in selftests/vm/Makefile.

Note that I also improved the changelog.

Note #2: I'd suggest this patch to be split into two patches:

- patch 1 moves the testcase to vm/selftests
- patch 2 does all the additional improvements

because this way all the deltas will be much easier to see and review.

Thanks,

Ingo

=================>