aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/vm/run_vmtests
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2019-10-23 13:57:49 +0900
committerShuah Khan <skhan@linuxfoundation.org>2019-11-07 14:53:29 -0700
commit7549b33642019f19241e910de556368ab55f0f32 (patch)
tree6c4576aa7c2c57dd0a13adbcc6384b0ef3893234 /tools/testing/selftests/vm/run_vmtests
parentselftests: proc: Make va_max 1MB (diff)
downloadlinux-dev-7549b33642019f19241e910de556368ab55f0f32.tar.xz
linux-dev-7549b33642019f19241e910de556368ab55f0f32.zip
selftests: vm: Build/Run 64bit tests only on 64bit arch
Some virtual address range tests requires 64bit address space, and we can not build and run those tests on the 32bit machine. Filter the 64bit architectures in Makefile and run_vmtests, so that those tests are built/run only on 64bit archs. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/vm/run_vmtests')
-rwxr-xr-xtools/testing/selftests/vm/run_vmtests10
1 files changed, 10 insertions, 0 deletions
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"