Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/vm: fix building protection keys test

Commit d8cbe8bfa7d ("tools/testing/selftests/vm: fix build error") tried
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.

Link: https://lkml.kernel.org/r/20201215100402.257376-1-harish@linux.ibm.com
Fixes: d8cbe8bfa7d ("tools/testing/selftests/vm: fix build error")
Signed-off-by: Harish <harish@linux.ibm.com>
Reviewed-by: Sandipan Das <sandipan@linux.ibm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Sandipan Das <sandipan@linux.ibm.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Harish and committed by
Linus Torvalds
7cf22a1c dea8dcf2

+5 -5
+5 -5
tools/testing/selftests/vm/Makefile
··· 4 4 include local_config.mk 5 5 6 6 uname_M := $(shell uname -m 2>/dev/null || echo not) 7 - MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/') 7 + MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/ppc64/') 8 8 9 9 # Without this, failed build products remain, with up-to-date timestamps, 10 10 # thus tricking Make (and you!) into believing that All Is Well, in subsequent ··· 43 43 TEST_GEN_FILES += transhuge-stress 44 44 TEST_GEN_FILES += userfaultfd 45 45 46 - ifeq ($(ARCH),x86_64) 46 + ifeq ($(MACHINE),x86_64) 47 47 CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_32bit_program.c -m32) 48 48 CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_64bit_program.c) 49 49 CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_program.c -no-pie) ··· 65 65 endif 66 66 else 67 67 68 - ifneq (,$(findstring $(ARCH),powerpc)) 68 + ifneq (,$(findstring $(MACHINE),ppc64)) 69 69 TEST_GEN_FILES += protection_keys 70 70 endif 71 71 72 72 endif 73 73 74 - ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64)) 74 + ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64)) 75 75 TEST_GEN_FILES += va_128TBswitch 76 76 TEST_GEN_FILES += virtual_address_range 77 77 TEST_GEN_FILES += write_to_hugetlbfs ··· 84 84 KSFT_KHDR_INSTALL := 1 85 85 include ../lib.mk 86 86 87 - ifeq ($(ARCH),x86_64) 87 + ifeq ($(MACHINE),x86_64) 88 88 BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32)) 89 89 BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64)) 90 90