From: Harish <harish@linux.ibm.com>
To: shuah@kernel.org, akpm@linux-foundation.org,
sandipan@linux.ibm.com, jhubbard@nvidia.com,
dave.hansen@intel.com, kirill.shutemov@linux.intel.com,
bgeffon@google.com, almasrymina@google.com,
suxingxing@loongson.cn
Cc: Harish <harish@linux.ibm.com>,
linux-kselftest@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH v2] selftests/vm: Fix building protection keys test
Date: Tue, 15 Dec 2020 15:34:02 +0530
Message-ID: <20201215100402.257376-1-harish@linux.ibm.com> (raw)
The patch d8cbe8bfa7d tries to include a ARCH check for powerpc,
however ARCH is not defined in the Makefile before including
lib.mk. This makes test building to skip on both x86 and powerpc.
Fix the arch check by replacing it using machine type as it is
already defined and used in the test.
Fixes: d8cbe8bfa7d ("tools/testing/selftests/vm: fix build error")
Signed-off-by: Harish <harish@linux.ibm.com>
---
Changes from v1:
- Add cause for test skip
- Handle x86_64 architecture
- Minor fixes to handle ppc64/ppc64le
- Add Fixes tag
---
tools/testing/selftests/vm/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 691893afc15d..e63f31632708 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for vm selftests
uname_M := $(shell uname -m 2>/dev/null || echo not)
-MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
+MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/ppc64/')
# Without this, failed build products remain, with up-to-date timestamps,
# thus tricking Make (and you!) into believing that All Is Well, in subsequent
@@ -39,7 +39,7 @@ TEST_GEN_FILES += transhuge-stress
TEST_GEN_FILES += userfaultfd
TEST_GEN_FILES += khugepaged
-ifeq ($(ARCH),x86_64)
+ifeq ($(MACHINE),x86_64)
CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_32bit_program.c -m32)
CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_64bit_program.c)
CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_program.c -no-pie)
@@ -61,13 +61,13 @@ TEST_GEN_FILES += $(BINARIES_64)
endif
else
-ifneq (,$(findstring $(ARCH),powerpc))
+ifneq (,$(findstring $(MACHINE),ppc64))
TEST_GEN_FILES += protection_keys
endif
endif
-ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64))
+ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
TEST_GEN_FILES += va_128TBswitch
TEST_GEN_FILES += virtual_address_range
TEST_GEN_FILES += write_to_hugetlbfs
@@ -82,7 +82,7 @@ include ../lib.mk
$(OUTPUT)/hmm-tests: LDLIBS += -lhugetlbfs -lpthread
-ifeq ($(ARCH),x86_64)
+ifeq ($(MACHINE),x86_64)
BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32))
BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64))
--
2.26.2
next reply index
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 10:04 Harish [this message]
2020-12-15 10:12 ` Sandipan Das
2020-12-16 7:48 ` suxingxing
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=20201215100402.257376-1-harish@linux.ibm.com \
--to=harish@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=almasrymina@google.com \
--cc=bgeffon@google.com \
--cc=dave.hansen@intel.com \
--cc=jhubbard@nvidia.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=sandipan@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.org \
--cc=suxingxing@loongson.cn \
/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
Linux-kselftest Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/linux-kselftest/0 linux-kselftest/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 linux-kselftest linux-kselftest/ https://lore.kernel.org/linux-kselftest \
linux-kselftest@vger.kernel.org
public-inbox-index linux-kselftest
Example config snippet for mirrors
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kselftest
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git