WSL2-Linux-Kernel/tools/testing/selftests
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
..
alsa
amd-pstate
arm64
bpf selftests/bpf: add a test for iter/task_vma for short-lived processes 2022-12-28 14:11:48 -08:00
breakpoints
capabilities
cgroup MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
clone3
core
cpu-hotplug
cpufreq
damon selftests/damon/sysfs: test filters directory 2023-01-18 17:12:44 -08:00
dma
dmabuf-heaps
drivers selftests: devlink: add a warning for interfaces coming up 2022-12-16 10:21:37 +00:00
efivarfs
exec
filesystems
firmware
fpu
ftrace Trace probes updates for 6.2: 2022-12-21 18:57:24 -08:00
futex
gpio
ia64
intel_pstate
iommu
ipc
ir
kcmp
kexec
kmod
kselftest
kvm KVM: selftests: restore special vmmcall code layout needed by the harness 2022-12-28 07:18:01 -05:00
landlock Landlock updates for v6.2-rc1 2022-12-13 09:14:50 -08:00
lib
livepatch
lkdtm
locking
media_tests
membarrier
memfd selftests/memfd: add tests for MFD_NOEXEC_SEAL MFD_EXEC 2023-01-18 17:12:37 -08:00
memory-hotplug
mincore
mm selftest/vm: add mremap expand merge offset test 2023-01-18 17:12:56 -08:00
mount
mount_setattr
move_mount_set_group
mqueue
nci
net selftests/net: l2_tos_ttl_inherit.sh: Ensure environment cleanup on failure. 2023-01-10 10:13:52 +01:00
netfilter
nolibc
nsfs
ntb
openat2
perf_events
pid_namespace
pidfd
powerpc
prctl
proc proc: fix PIE proc-empty-vm, proc-pid-vm tests 2023-01-11 16:14:22 -08:00
pstore
ptp
ptrace
rcutorture
resctrl
rlimits
rseq
rtc
safesetid
sched
seccomp
sgx
sigaltstack
size
sparc64
splice
static_keys
sync
syscall_user_dispatch
sysctl
tc-testing
tdx
timens
timers
tmpfs
tpm2
uevent
user
user_events
vDSO
watchdog
wireguard
x86
zram
.gitignore
Makefile selftests/vm: rename selftests/vm to selftests/mm 2023-01-18 17:12:56 -08:00
gen_kselftest_tar.sh
kselftest.h
kselftest_deps.sh selftests/vm: rename selftests/vm to selftests/mm 2023-01-18 17:12:56 -08:00
kselftest_harness.h
kselftest_install.sh
kselftest_module.h
lib.mk linux-kselftest-next-6.2-rc1 2022-12-12 16:39:38 -08:00
run_kselftest.sh