Commit 7549b336 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Shuah Khan

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: default avatarMasami 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: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 2f3571ea
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
# Makefile for vm selftests # 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) CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
LDLIBS = -lrt LDLIBS = -lrt
...@@ -16,8 +18,11 @@ TEST_GEN_FILES += on-fault-limit ...@@ -16,8 +18,11 @@ TEST_GEN_FILES += on-fault-limit
TEST_GEN_FILES += thuge-gen TEST_GEN_FILES += thuge-gen
TEST_GEN_FILES += transhuge-stress TEST_GEN_FILES += transhuge-stress
TEST_GEN_FILES += userfaultfd 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 += va_128TBswitch
TEST_GEN_FILES += virtual_address_range TEST_GEN_FILES += virtual_address_range
endif
TEST_PROGS := run_vmtests TEST_PROGS := run_vmtests
......
...@@ -58,6 +58,14 @@ else ...@@ -58,6 +58,14 @@ else
exit 1 exit 1
fi 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 mkdir $mnt
mount -t hugetlbfs none $mnt mount -t hugetlbfs none $mnt
...@@ -189,6 +197,7 @@ else ...@@ -189,6 +197,7 @@ else
echo "[PASS]" echo "[PASS]"
fi fi
if [ $VADDR64 -ne 0 ]; then
echo "-----------------------------" echo "-----------------------------"
echo "running virtual_address_range" echo "running virtual_address_range"
echo "-----------------------------" echo "-----------------------------"
...@@ -210,6 +219,7 @@ if [ $? -ne 0 ]; then ...@@ -210,6 +219,7 @@ if [ $? -ne 0 ]; then
else else
echo "[PASS]" echo "[PASS]"
fi fi
fi # VADDR64
echo "------------------------------------" echo "------------------------------------"
echo "running vmalloc stability smoke test" echo "running vmalloc stability smoke test"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment