mirror-linux/tools/testing/selftests/mm
Muhammad Usama Anjum ed74abcd1d selftests: mm: protection_keys: save/restore nr_hugepages value from launch script
The save/restore of nr_hugepages was added to the test itself by using the
atexit() functionality.  But it is broken as parent exits after creating
child.  Hence calling the atexit() function early.  That's not it.  The
child exits after creating its child and so on.

The parent cannot wait to get the termination status for its children as
it'll keep on holding the resources until the new pkey allocation fails. 
It is impossible to wait for exits of all the grand and great grand
children.  Hence the restoring of nr_hugepages value from parent is wrong.

Let's save/restore the nr_hugepages settings in the launch script
instead of doing it in the test.

Link: https://lkml.kernel.org/r/20240419115027.3848958-1-usama.anjum@collabora.com
Fixes: c52eb6db7b ("selftests: mm: restore settings from only parent process")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reported-by: Joey Gouly <joey.gouly@arm.com>
Closes: https://lore.kernel.org/all/20240418125250.GA2941398@e124191.cambridge.arm.com
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-25 10:07:27 -07:00
..
.gitignore selftests/mm: new test that steals pages 2024-02-22 10:24:41 -08:00
Makefile - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
charge_reserved_hugetlb.sh selftests/mm: save and restore nr_hugepages value 2024-02-22 15:38:55 -08:00
check_config.sh
compaction_test.c selftests/mm: log a consistent test name for check_compaction 2024-02-22 10:24:57 -08:00
config selftests: mm: add pagemap ioctl tests 2023-10-18 14:34:13 -07:00
cow.c selftests/mm/cow: add tests for anonymous multi-size THP 2023-12-20 14:48:12 -08:00
gup_longterm.c selftests/mm: gup_longterm: fix a resource leak 2023-10-04 10:32:19 -07:00
gup_test.c selftests/mm: Fix build with _FORTIFY_SOURCE 2024-03-26 11:07:19 -07:00
hmm-tests.c selftests: avoid using SKIP(exit()) in harness fixure setup 2024-03-05 19:25:36 -08:00
hugepage-mmap.c selftests: mm: hugepage-mmap: conform to TAP format output 2024-01-05 10:17:48 -08:00
hugepage-mremap.c mm/selftests: hugepage-mremap: conform test to TAP format output 2024-01-05 10:17:47 -08:00
hugepage-shm.c
hugepage-vmemmap.c selftests: mm: hugepage-vmemmap fails on 64K page size systems 2024-01-12 15:20:48 -08:00
hugetlb-madvise.c selftests/mm: skip the hugetlb-madvise tests on unmet hugepage requirements 2024-03-12 13:07:18 -07:00
hugetlb-read-hwpoison.c selftests/mm: add tests for HWPOISON hugetlbfs read 2023-08-18 10:12:27 -07:00
hugetlb_fault_after_madv.c selftests/mm: add a new test for madv and hugetlb 2023-10-18 14:34:16 -07:00
hugetlb_madv_vs_map.c selftests/mm: new test that steals pages 2024-02-22 10:24:41 -08:00
hugetlb_reparenting_test.sh selftests/mm: save and restore nr_hugepages value 2024-02-22 15:38:55 -08:00
khugepaged.c selftests/mm/khugepaged: enlighten for multi-size THP 2023-12-20 14:48:12 -08:00
ksm_functional_tests.c selftests/mm/ksm_functional: prevent unmapping undefined address 2024-02-21 16:00:02 -08:00
ksm_tests.c selftests/mm: ksm_tests should only MADV_HUGEPAGE valid memory 2024-01-25 23:52:21 -08:00
madv_populate.c selftests/mm: skip soft-dirty tests on arm64 2023-08-18 10:12:42 -07:00
map_fixed_noreplace.c selftests/mm: map_fixed_noreplace: conform test to TAP format output 2024-02-22 10:24:48 -08:00
map_hugetlb.c selftests/mm: map_hugetlb: conform test to TAP format output 2024-02-22 10:24:48 -08:00
map_populate.c selftests/mm: map_populate: conform test to TAP format output 2024-02-22 10:24:48 -08:00
mdwe_test.c selftests/harness: remove use of LINE_MAX 2024-04-24 19:34:25 -07:00
memfd_secret.c selftests: secretmem: floor the memory size to the multiple of page_size 2023-12-20 13:46:19 -08:00
migration.c selftests/mm: make migration test robust to failure 2023-08-18 10:12:43 -07:00
mkdirty.c
mlock-random-test.c selftests/mm: mlock-random-test: conform test to TAP format output 2024-02-22 10:24:48 -08:00
mlock2-tests.c selftests/mm: mlock2-tests: conform test to TAP format output 2024-02-22 10:24:49 -08:00
mlock2.h selftests/mm: mlock2-tests: conform test to TAP format output 2024-02-22 10:24:49 -08:00
mrelease_test.c selftests/mm: mrelease_test: conform test to TAP format output 2024-02-22 10:24:49 -08:00
mremap_dontunmap.c selftests/mm: mremap_dontunmap: conform test to TAP format output 2024-02-22 10:24:49 -08:00
mremap_test.c selftests/mm: mremap_test: fix build warning 2024-01-25 23:52:20 -08: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 mm/selftests: fix pagemap_ioctl memory map test 2023-12-06 16:12:45 -08:00
pkey-helpers.h selftests/mm: Substitute attribute with a macro 2023-10-13 14:08:36 -06:00
pkey-powerpc.h
pkey-x86.h
protection_keys.c selftests: mm: protection_keys: save/restore nr_hugepages value from launch script 2024-04-25 10:07:27 -07:00
run_vmtests.sh selftests: mm: protection_keys: save/restore nr_hugepages value from launch script 2024-04-25 10:07:27 -07:00
settings selftests/mm: run all tests from run_vmtests.sh 2023-08-18 10:12:43 -07:00
soft-dirty.c selftests/mm: Fix build with _FORTIFY_SOURCE 2024-03-26 11:07:19 -07:00
split_huge_page_test.c selftests: mm: fix unused and uninitialized variable warning 2024-04-24 19:34:25 -07:00
test_hmm.sh
test_vmalloc.sh
thp_settings.c selftests/mm: support multi-size THP interface in thp_settings 2023-12-20 14:48:12 -08:00
thp_settings.h selftests/mm: support multi-size THP interface in thp_settings 2023-12-20 14:48:12 -08:00
thuge-gen.c selftests/mm: thuge-gen: conform to TAP format output 2024-02-22 10:24:49 -08: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: fix ARM related issue with fork after pthread_create 2024-03-26 11:14:12 -07:00
uffd-common.h selftests/mm: fix ARM related issue with fork after pthread_create 2024-03-26 11:14:12 -07:00
uffd-stress.c selftests/mm: skip uffd hugetlb tests with insufficient hugepages 2024-03-12 13:07:18 -07:00
uffd-unit-tests.c selftests/mm: fix ARM related issue with fork after pthread_create 2024-03-26 11:14:12 -07:00
va_high_addr_switch.c selftests/mm: va_high_addr_switch should skip unsupported arm64 configs 2023-08-18 10:12:43 -07:00
va_high_addr_switch.sh selftests/mm: Update va_high_addr_switch.sh to check CPU for la57 flag 2024-01-25 23:52:21 -08:00
virtual_address_range.c selftests/mm: virtual_address_range: conform to TAP format output 2024-02-22 10:24:49 -08:00
vm_util.c selftests/mm: transhuge-stress: conform to TAP format output 2024-02-22 10:24:49 -08:00
vm_util.h selftests/mm: include strings.h for ffsl 2024-04-05 11:21:30 -07:00
write_hugetlb_memory.sh selftests/mm: switch to bash from sh 2024-01-25 23:52:20 -08:00
write_to_hugetlbfs.c