linux/tools/testing/selftests/mm
Donet Tom 08ff89b565 selftests/mm: add fork inheritance test for ksm_merging_pages counter
Add a new selftest to verify whether the `ksm_merging_pages` counter in
`mm_struct` is not inherited by a child process after fork.  This helps
ensure correctness of KSM accounting across process creation.

Link: https://lkml.kernel.org/r/e7bb17d374133bd31a3e423aa9e46e1122e74971.1758648700.git.donettom@linux.ibm.com
Signed-off-by: Donet Tom <donettom@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Aboorva Devarajan <aboorvad@linux.ibm.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-09-28 11:51:32 -07:00
..
page_frag mm: page_frag: fix a compile error when kernel is not compiled 2024-11-19 12:20:40 +01:00
.gitignore selftests/mm: test that rmap behaves as expected 2025-09-13 16:55:13 -07:00
Makefile selftests/mm: add -Wunreachable-code and fix warnings 2025-09-21 14:22:34 -07:00
charge_reserved_hugetlb.sh selftests/mm: generate a temporary mountpoint for cgroup filesystem 2025-04-11 17:32:37 -07:00
check_config.sh
compaction_test.c selftests/mm: compaction_test: support platform with huge mount of memory 2025-05-07 23:39:39 -07:00
config selftests/mm: add configs to fix testcase failure 2025-06-19 20:48:02 -07:00
cow.c selftest/mm: extract sz2ord function into vm_util.h 2025-09-13 16:55:06 -07:00
droppable.c mm: add MAP_DROPPABLE for designating always lazily freeable mappings 2024-07-19 20:22:12 +02:00
guard-regions.c selftests/mm: fix FORCE_READ to read input value correctly 2025-08-27 22:45:42 -07:00
gup_longterm.c selftest/mm: skip if fallocate() is unsupported in gup_longterm 2025-07-09 22:42:11 -07:00
gup_test.c selftests/mm: gup_tests: option to GUP all pages in a single call 2025-09-21 14:22:33 -07:00
hmm-tests.c selftests/mm: add -Wunreachable-code and fix warnings 2025-09-21 14:22:34 -07:00
hugepage-mmap.c selftests/mm: remove unnecessary ia64 code and comment 2024-09-03 21:15:38 -07:00
hugepage-mremap.c selftests/mm: skip hugepage-mremap test if userfaultfd unavailable 2025-09-13 16:55:04 -07:00
hugepage-shm.c selftests/mm: remove unnecessary ia64 code and comment 2024-09-03 21:15:38 -07:00
hugepage-vmemmap.c selftests/mm: remove unnecessary ia64 code and comment 2024-09-03 21:15:38 -07:00
hugetlb-madvise.c selftests/mm: fix FORCE_READ to read input value correctly 2025-08-27 22:45:42 -07:00
hugetlb-read-hwpoison.c
hugetlb-soft-offline.c selftest/mm: test enable_soft_offline behaviors 2024-07-04 18:06:00 -07:00
hugetlb_dio.c selftest: hugetlb_dio: fix test naming 2024-12-05 19:54:44 -08:00
hugetlb_fault_after_madv.c selftests/mm: hugetlb_fault_after_madv: improve test output 2024-11-05 16:56:25 -08:00
hugetlb_madv_vs_map.c selftests/mm: hugetlb_madv_vs_map: avoid test skipping by querying hugepage size at runtime 2024-05-11 15:41:37 -07:00
hugetlb_reparenting_test.sh selftests/mm: restore default nr_hugepages value during cleanup in hugetlb_reparenting_test.sh 2025-05-11 17:48:29 -07:00
khugepaged.c selftests/mm: remove PROT_EXEC req from file-collapse tests 2025-09-21 14:22:31 -07:00
ksm_functional_tests.c selftests/mm: add fork inheritance test for ksm_merging_pages counter 2025-09-28 11:51:32 -07:00
ksm_tests.c ksm_tests: skip hugepage test when Transparent Hugepages are disabled 2025-07-09 22:42:23 -07:00
madv_populate.c selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled 2025-09-23 14:14:16 -07:00
map_fixed_noreplace.c selftests/mm: deduplicate second mmap() of 5*PAGE_SIZE at base 2025-05-22 14:55:37 -07:00
map_hugetlb.c selftests/mm: remove unnecessary ia64 code and comment 2024-09-03 21:15:38 -07:00
map_populate.c selftests/mm: add commentary about 9pfs bugs 2025-03-21 22:03:14 -07:00
mdwe_test.c Revert "selftests/harness: remove use of LINE_MAX" 2024-05-19 14:36:20 -07:00
memfd_secret.c Revert "selftests/mm: remove local __NR_* definitions" 2025-03-05 21:36:12 -08:00
merge.c tools/testing/selftests: add mremap() unfaulted/faulted test cases 2025-07-13 16:38:25 -07:00
migration.c selftests/mm: fix FORCE_READ to read input value correctly 2025-08-27 22:45:42 -07:00
mkdirty.c Revert "selftests/mm: remove local __NR_* definitions" 2025-03-05 21:36:12 -08:00
mlock-random-test.c selftests/mm/mlock: print error on failure 2025-03-16 22:06:40 -07:00
mlock2-tests.c selftests/mm: deduplicate test logging in test_mlock_lock() 2025-05-31 22:46:08 -07:00
mlock2.h selftests/mm/mlock: print error on failure 2025-03-16 22:06:40 -07:00
mrelease_test.c
mremap_dontunmap.c
mremap_test.c selftests/mm: fix spelling mistake "mrmeap" -> "mremap" 2025-09-13 16:54:59 -07:00
mseal_helpers.h selftests/mm: mseal, self_elf: rename TEST_END_CHECK to REPORT_TEST_PASS 2024-07-03 19:30:07 -07:00
mseal_test.c selftests/mm: Use PKEY_UNRESTRICTED macro 2025-02-17 18:16:36 +00:00
on-fault-limit.c selftests/mm: run_vmtests: remove sudo and conform to tap 2024-02-22 15:38:55 -08:00
pagemap_ioctl.c selftests/mm: use calloc instead of malloc in pagemap_ioctl.c 2025-09-13 16:55:17 -07:00
pfnmap.c selftests/mm: pass filename as input param to VM_PFNMAP tests 2025-09-13 16:54:43 -07:00
pkey-arm64.h selftests/mm: rename pkey register macro 2025-01-13 22:40:56 -08:00
pkey-helpers.h selftests: centralise maybe-unused definition in kselftest.h 2025-09-13 16:55:16 -07:00
pkey-powerpc.h selftests/mm: fix a build failure on powerpc 2025-05-07 23:39:41 -07:00
pkey-x86.h selftests/mm: ensure pkey-*.h define inline functions only 2025-01-13 22:40:55 -08:00
pkey_sighandler_tests.c selftests/mm: add -Wunreachable-code and fix warnings 2025-09-21 14:22:34 -07:00
pkey_util.c selftests/mm: fix build break when compiling pkey_util.c 2025-05-07 23:39:41 -07:00
prctl_thp_disable.c selftests: prctl: introduce tests for disabling THPs except for madvise 2025-09-13 16:55:06 -07:00
process_madv.c selftests/mm: add process_madvise() tests 2025-08-02 12:06:08 -07:00
protection_keys.c selftests/mm: protection_keys: fix dead code 2025-09-21 14:22:34 -07:00
rmap.c selftests/mm: test that rmap behaves as expected 2025-09-13 16:55:13 -07:00
run_vmtests.sh selftests/mm: gup_tests: option to GUP all pages in a single call 2025-09-21 14:22:33 -07:00
settings selftests/mm: increase timeout from 180 to 900 seconds 2025-06-19 20:48:01 -07:00
soft-dirty.c selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled 2025-09-23 14:14:16 -07:00
split_huge_page_test.c selftests/mm: add -Wunreachable-code and fix warnings 2025-09-21 14:22:34 -07:00
test_hmm.sh
test_page_frag.sh mm: page_frag: add a test module for page_frag 2024-11-11 10:56:26 -08:00
test_vmalloc.sh kselftest: mm: fix typos in test_vmalloc.sh 2025-09-13 16:55:16 -07:00
thp_settings.c selftests: prctl: introduce tests for disabling THPs completely 2025-09-13 16:55:06 -07:00
thp_settings.h selftests: prctl: introduce tests for disabling THPs completely 2025-09-13 16:55:06 -07:00
thuge-gen.c selftests/mm: skip thuge-gen test if system is not setup properly 2025-09-13 16:55:04 -07:00
transhuge-stress.c selftests/mm: transhuge-stress: conform to TAP format output 2024-02-22 10:24:49 -08:00
uffd-common.c selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
uffd-common.h selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
uffd-stress.c selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
uffd-unit-tests.c selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
uffd-wp-mremap.c selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
va_high_addr_switch.c selftests/mm: fix va_high_addr_switch.sh failure on x86_64 2025-09-21 14:22:29 -07:00
va_high_addr_switch.sh selftests/mm: alloc hugepages in va_high_addr_switch test 2025-09-21 14:22:28 -07:00
virtual_address_range.c selftests/mm: add support to test 4PB VA on PPC64 2025-09-13 16:55:03 -07:00
vm_util.c selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled 2025-09-23 14:14:16 -07:00
vm_util.h selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled 2025-09-23 14:14:16 -07:00
write_hugetlb_memory.sh
write_to_hugetlbfs.c selftests/mm: fix strncpy() length 2025-01-13 22:40:54 -08:00