From: Masami Hiramatsu <mhiramat@kernel.org> To: Shuah Khan <shuah@kernel.org> Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, jaswinder.singh@linaro.org, Anshuman Khandual <khandual@linux.vnet.ibm.com>, "Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com> Subject: [BUGFIX PATCH v2 2/5] selftests: vm: Build/Run 64bit tests only on 64bit arch Date: Mon, 21 Oct 2019 17:28:18 +0900 [thread overview] Message-ID: <157164649814.17692.12605711936383924363.stgit@devnote2> (raw) In-Reply-To: <157164647813.17692.3834082082658965225.stgit@devnote2> 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> --- tools/testing/selftests/vm/Makefile | 5 +++++ tools/testing/selftests/vm/run_vmtests | 10 ++++++++++ 2 files changed, 15 insertions(+) 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"
next prev parent reply other threads:[~2019-10-21 8:28 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-21 8:27 [BUGFIX PATCH v2 0/5] selftests: Fixes for 32bit arch Masami Hiramatsu 2019-10-21 8:28 ` [BUGFIX PATCH v2 1/5] selftests: proc: Make va_max 1GB on " Masami Hiramatsu 2019-10-21 17:30 ` Alexey Dobriyan 2019-10-23 1:56 ` Masami Hiramatsu 2019-10-23 4:51 ` Masami Hiramatsu 2019-10-21 8:28 ` Masami Hiramatsu [this message] 2019-10-21 8:28 ` [BUGFIX PATCH v2 3/5] selftests: net: Use size_t and ssize_t for counting file size Masami Hiramatsu 2019-10-21 8:28 ` [BUGFIX PATCH v2 4/5] selftests: net: Fix printf format warnings on arm Masami Hiramatsu 2019-10-21 8:28 ` [BUGFIX PATCH v2 5/5] selftests: sync: Fix cast " Masami Hiramatsu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=157164649814.17692.12605711936383924363.stgit@devnote2 \ --to=mhiramat@kernel.org \ --cc=aneesh.kumar@linux.vnet.ibm.com \ --cc=jaswinder.singh@linaro.org \ --cc=khandual@linux.vnet.ibm.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-kselftest@vger.kernel.org \ --cc=shuah@kernel.org \ --subject='Re: [BUGFIX PATCH v2 2/5] selftests: vm: Build/Run 64bit tests only on 64bit arch' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).