linux/tools/testing/selftests/mm
Terry Tritton 7efa6f2c80 selftests/mm: uffd-unit-test check if huge page size is 0
If HUGETLBFS is not enabled then the default_huge_page_size function will
return 0 and cause a divide by 0 error. Add a check to see if the huge page
size is 0 and skip the hugetlb tests if it is.

Link: https://lkml.kernel.org/r/20240205145055.3545806-2-terry.tritton@linaro.org
Fixes: 16a45b57cb ("selftests/mm: add framework for uffd-unit-test")
Signed-off-by: Terry Tritton <terry.tritton@linaro.org>
Cc: Peter Griffin <peter.griffin@linaro.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-02-20 14:20:48 -08:00
..
.gitignore selftests/mm: add hugetlb_fault_after_madv to .gitignore 2023-11-15 15:30:09 -08:00
charge_reserved_hugetlb.sh selftests/mm: switch to bash from sh 2024-01-25 23:52:20 -08:00
check_config.sh selftests/mm: give scripts execute permission 2023-07-14 09:24:31 -07:00
compaction_test.c selftests/mm: skip test if application doesn't has root privileges 2024-01-05 10:17:48 -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: gup_test: conform test to TAP format output 2024-01-05 10:17:48 -08:00
hmm-tests.c selftests/mm: FOLL_LONGTERM need to be updated to 0x100 2023-08-21 13:07:21 -07: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 selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
hugepage-vmemmap.c selftests: mm: hugepage-vmemmap fails on 64K page size systems 2024-01-12 15:20:48 -08: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_reparenting_test.sh selftests/mm: fix awk usage in charge_reserved_hugetlb.sh and hugetlb_reparenting_test.sh that may cause error 2023-09-29 17:20:48 -07:00
hugetlb-madvise.c selftests/mm: export get_free_hugepages() 2023-10-18 14:34:16 -07:00
hugetlb-read-hwpoison.c selftests/mm: add tests for HWPOISON hugetlbfs read 2023-08-18 10:12:27 -07:00
khugepaged.c selftests/mm/khugepaged: enlighten for multi-size THP 2023-12-20 14:48:12 -08:00
ksm_functional_tests.c mm/ksm: test case for prctl fork/exec workflow 2023-10-16 15:44:38 -07: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
Makefile selftests/mm: factor out thp settings management 2023-12-20 14:48:12 -08:00
map_fixed_noreplace.c selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
map_hugetlb.c selftests: mm: fix map_hugetlb failure on 64K page size systems 2024-01-25 23:52:21 -08:00
map_populate.c selftests/mm: fix WARNING comparing pointer to 0 2023-08-24 16:20:27 -07:00
mdwe_test.c kselftest: vm: add tests for no-inherit memory-deny-write-execute 2023-10-06 14:44:11 -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 selftests/mm: mkdirty: fix incorrect position of #endif 2023-07-17 12:53:22 -07:00
mlock2-tests.c selftests/mm: fix "warning: expression which evaluates to zero..." in mlock2-tests.c 2023-06-19 16:19:01 -07:00
mlock2.h selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
mlock-random-test.c selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
mrelease_test.c selftests/mm: enable mrelease_test for arm64 2023-08-18 10:12:42 -07:00
mremap_dontunmap.c selftests/mm: include mman header to access MREMAP_DONTUNMAP identifier 2023-10-18 12:12:41 -07: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: remove duplicate unneeded defines 2023-06-19 16:19:25 -07: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 selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
pkey-x86.h selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
protection_keys.c selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
run_vmtests.sh selftests/mm: log run_vmtests.sh results in TAP format 2023-12-29 11:58:43 -08:00
settings selftests/mm: run all tests from run_vmtests.sh 2023-08-18 10:12:43 -07:00
soft-dirty.c selftests/mm: reuse read_pmd_pagesize() in COW selftest 2023-04-18 16:30:00 -07:00
split_huge_page_test.c selftests/mm: reuse read_pmd_pagesize() in COW selftest 2023-04-18 16:30:00 -07:00
test_hmm.sh selftests/mm: give scripts execute permission 2023-07-14 09:24:31 -07:00
test_vmalloc.sh selftests/mm: give scripts execute permission 2023-07-14 09:24:31 -07:00
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 mm, treewide: rename MAX_ORDER to MAX_PAGE_ORDER 2024-01-08 15:27:15 -08:00
transhuge-stress.c selftests/mm: optionally pass duration to transhuge-stress 2023-08-18 10:12:43 -07:00
uffd-common.c selftests/mm: add UFFDIO_MOVE ioctl test 2023-12-29 11:58:24 -08:00
uffd-common.h selftests/mm: add UFFDIO_MOVE ioctl test 2023-12-29 11:58:24 -08:00
uffd-stress.c selftests/mm: call uffd_test_ctx_clear at the end of the test 2023-12-29 11:58:24 -08:00
uffd-unit-tests.c selftests/mm: uffd-unit-test check if huge page size is 0 2024-02-20 14:20:48 -08: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: change NR_CHUNKS_HIGH for aarch64 2023-04-05 19:42:59 -07:00
vm_util.c selftests/mm: check that PAGEMAP_SCAN returns correct categories 2023-12-10 16:51:35 -08:00
vm_util.h selftests/mm: export get_free_hugepages() 2023-10-18 14:34:16 -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