Lines Matching +full:no +full:- +full:high +full:- +full:z
2 # SPDX-License-Identifier: GPL-2.0
5 # Kselftest framework requirement - SKIP code is 4.
16 usage: ${BASH_SOURCE[0]:-$0} [ options ]
18 -a: run all tests, including extra ones (other than destructive ones)
19 -t: specify specific categories to tests to run
20 -h: display this message
21 -n: disable TAP output
22 -d: run destructive tests
24 The default behavior is to run required tests only. If -a is specified,
28 to the -t argument containing one or more of the following categories
30 - mmap
32 - gup_test
34 - userfaultfd
36 - compaction
38 - mlock
40 - mremap
42 - hugevm
44 - vmalloc
46 - hmm
48 - madv_guard
50 - madv_populate
52 - memfd_secret
54 - process_mrelease
56 - ksm
58 - ksm_numa
60 - pkey
62 - soft_dirty
64 - pagemap
66 - cow
67 test copy-on-write semantics
68 - thp
70 - hugetlb
72 - migration
75 - mkdirty
77 read-only VMAs
78 - mdwe
80 - page_frag
83 example: ./run_vmtests.sh -t "hmm mmap ksm"
101 shift $((OPTIND -1))
104 VM_SELFTEST_ITEMS=${VM_SELFTEST_ITEMS:-default}
108 # If no VM_SELFTEST_ITEMS are specified, run all tests
120 # -t: thp=on, -T: thp=off, -H: hugetlb=on
123 for huge in -t -T "-H -m $hugetlb_mb"; do
124 # -u: gup-fast, -U: gup-basic, -a: pin-fast, -b: pin-basic, -L: pin-longterm
125 for test_cmd in -u -U -a -b -L; do
126 # -w: write=1, -W: write=0
127 for write in -w -W; do
128 # -S: shared
129 for share in -S " "; do
130 # -n: How many pages to fetch together? 512 is special
133 for num in "-n 1" "-n 512" "-n 123"; do
144 while read -r name size unit; do
161 if [[ $uffd_min_KB -gt $hugetlb_min_KB ]]; then
168 if [ -n "$freepgs" ] && [ -n "$hpgsize_KB" ]; then
172 while [ "$tries" -gt 0 ] && [ "$freepgs" -lt "$needpgs" ]; do
173 lackpgs=$((needpgs - freepgs))
179 while read -r name size unit; do
184 tries=$((tries - 1))
186 if [ "$freepgs" -lt "$needpgs" ]; then
192 echo "no hugetlbfs support in kernel?"
198 if [ -z "$ARCH" ]; then
199 ARCH=$(uname -m 2>/dev/null | sed -e 's/aarch64.*/arm64/')
205 sed -e "s/^/${TAP_PREFIX}/"
209 if [[ ! -z "$TAP_PREFIX" ]]; then
216 echo "$*" | sed -e 's/^\(bash \)\?\.\///'
226 if [ ${CATEGORY} == "thp" -o ${CATEGORY} == "hugetlb" ]; then
240 local sep=$(echo -n "$title" | tr "[:graph:][:space:]" -)
250 if [ $ret -eq 0 ]; then
254 elif [ $ret -eq $ksft_skip ]; then
270 CATEGORY="hugetlb" run_test ./hugepage-mmap
276 CATEGORY="hugetlb" run_test ./hugepage-shm
281 CATEGORY="hugetlb" run_test ./hugepage-mremap
282 CATEGORY="hugetlb" run_test ./hugepage-vmemmap
283 CATEGORY="hugetlb" run_test ./hugetlb-madvise
308 CATEGORY="gup_test" run_test ./gup_test -u
310 CATEGORY="gup_test" run_test ./gup_test -a
313 CATEGORY="gup_test" run_test ./gup_test -ct -F 0x1 0 19 0x1000
316 CATEGORY="userfaultfd" run_test ./uffd-unit-tests
317 uffd_stress_bin=./uffd-stress
321 # uffd-stress expects a region expressed in MiB, so we adjust
325 CATEGORY="userfaultfd" run_test ${uffd_stress_bin} hugetlb-private "$half_ufd_size_MB" 32
327 CATEGORY="userfaultfd" run_test ${uffd_stress_bin} shmem-private 20 16
328 # uffd-wp-mremap requires at least one page of each size.
330 declare -A nr_size_hugepgs
343 CATEGORY="userfaultfd" run_test ./uffd-wp-mremap
345 echo "# SKIP ./uffd-wp-mremap"
356 if command -v sudo &> /dev/null && sudo -u nobody ls ./on-fault-limit >/dev/null;
358 CATEGORY="mlock" run_test sudo -u nobody ./on-fault-limit
360 echo "# SKIP ./on-fault-limit"
365 CATEGORY="mlock" run_test ./mlock-random-test
367 CATEGORY="mlock" run_test ./mlock2-tests
373 CATEGORY="hugetlb" run_test ./thuge-gen
374 CATEGORY="hugetlb" run_test ./charge_reserved_hugetlb.sh -cgroup-v2
375 CATEGORY="hugetlb" run_test ./hugetlb_reparenting_test.sh -cgroup-v2
380 CATEGORY="hugetlb" run_test ./hugetlb-soft-offline
383 CATEGORY="hugetlb" run_test ./hugetlb-read-hwpoison
386 if [ $VADDR64 -ne 0 ]; then
389 # allows high virtual address allocation requests independent
392 if [ -x ./virtual_address_range ]; then
399 # va high address boundary switch test
419 CATEGORY="madv_guard" run_test ./guard-regions
424 if [ -x ./memfd_secret ]
432 CATEGORY="ksm" run_test ./ksm_tests -H -s 100
435 CATEGORY="ksm" run_test ./ksm_tests -P -s 100
437 CATEGORY="ksm" run_test ./ksm_tests -M -p 10
439 CATEGORY="ksm" run_test ./ksm_tests -U
441 CATEGORY="ksm" run_test ./ksm_tests -Z -p 10 -z 0
443 CATEGORY="ksm" run_test ./ksm_tests -Z -p 10 -z 1
445 CATEGORY="ksm_numa" run_test ./ksm_tests -N -m 1
447 CATEGORY="ksm_numa" run_test ./ksm_tests -N -m 0
453 if [ -x ./protection_keys_32 ]
458 if [ -x ./protection_keys_64 ]
464 if [ -x ./soft-dirty ]
466 CATEGORY="soft_dirty" run_test ./soft-dirty
476 CATEGORY="thp" run_test ./khugepaged -s 2
478 CATEGORY="thp" run_test ./transhuge-stress -d 20
481 if [ -z "${SPLIT_HUGE_PAGE_TEST_XFS_PATH}" ]; then
486 SPLIT_HUGE_PAGE_TEST_XFS_PATH=$(mktemp -d /tmp/xfs_dir_XXXXXX)
487 truncate -s 314572800 ${XFS_IMG}
488 mkfs.xfs -q ${XFS_IMG}
489 mount -o loop ${XFS_IMG} ${SPLIT_HUGE_PAGE_TEST_XFS_PATH}
498 if [ -n "${MOUNTED_XFS}" ]; then
501 rm -f ${XFS_IMG}