diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-11-26 01:58:09 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-11-26 01:58:09 +0300 |
commit | db7d275415d774de3d2151d6885bf61c33243419 (patch) | |
tree | 2332f6df2e821d90b94f369a892de9bf96a54300 /tools/testing/selftests/vm | |
parent | 1c1ff4836fdab94c7c15b23be57bf64c1e56a36f (diff) | |
parent | ed2d8fa734e7759ac3788a19f308d3243d0eb164 (diff) | |
download | linux-db7d275415d774de3d2151d6885bf61c33243419.tar.xz |
Merge tag 'linux-kselftest-5.5-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest fixes from Shuah Khan:
"This consists of several fixes to tests and framework.
Masami Hiramatsu fixed several tests to build and run correctly on arm
and other 32bit architectures"
* tag 'linux-kselftest-5.5-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
selftests: sync: Fix cast warnings on arm
selftests: net: Fix printf format warnings on arm
selftests: net: Use size_t and ssize_t for counting file size
selftests: vm: Build/Run 64bit tests only on 64bit arch
selftests: proc: Make va_max 1MB
kselftest: Fix NULL INSTALL_PATH for TARGETS runlist
selftests: Move kselftest_module.sh into kselftest/
selftests: gen_kselftest_tar.sh: Do not clobber kselftest/
selftests: breakpoints: Fix a typo of function name
selftests: Fix O= and KBUILD_OUTPUT handling for relative paths
Diffstat (limited to 'tools/testing/selftests/vm')
-rw-r--r-- | tools/testing/selftests/vm/Makefile | 5 | ||||
-rwxr-xr-x | tools/testing/selftests/vm/run_vmtests | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile index 9534dc2bc929..7f9a8a8c31da 100644 --- a/tools/testing/selftests/vm/Makefile +++ b/tools/testing/selftests/vm/Makefile @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for vm selftests +uname_M := $(shell uname -m 2>/dev/null || echo not) +ARCH ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/') CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) LDLIBS = -lrt @@ -16,8 +18,11 @@ TEST_GEN_FILES += on-fault-limit TEST_GEN_FILES += thuge-gen TEST_GEN_FILES += transhuge-stress TEST_GEN_FILES += userfaultfd + +ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64)) TEST_GEN_FILES += va_128TBswitch TEST_GEN_FILES += virtual_address_range +endif TEST_PROGS := run_vmtests diff --git a/tools/testing/selftests/vm/run_vmtests b/tools/testing/selftests/vm/run_vmtests index 951c507a27f7..a692ea828317 100755 --- a/tools/testing/selftests/vm/run_vmtests +++ b/tools/testing/selftests/vm/run_vmtests @@ -58,6 +58,14 @@ else exit 1 fi +#filter 64bit architectures +ARCH64STR="arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64" +if [ -z $ARCH ]; then + ARCH=`uname -m 2>/dev/null | sed -e 's/aarch64.*/arm64/'` +fi +VADDR64=0 +echo "$ARCH64STR" | grep $ARCH && VADDR64=1 + mkdir $mnt mount -t hugetlbfs none $mnt @@ -189,6 +197,7 @@ else echo "[PASS]" fi +if [ $VADDR64 -ne 0 ]; then echo "-----------------------------" echo "running virtual_address_range" echo "-----------------------------" @@ -210,6 +219,7 @@ if [ $? -ne 0 ]; then else echo "[PASS]" fi +fi # VADDR64 echo "------------------------------------" echo "running vmalloc stability smoke test" |