Skip to content

Commit

Permalink
selftests: stop using KSFT_KHDR_INSTALL
Browse files Browse the repository at this point in the history
Stop using the KSFT_KHDR_INSTALL flag as installing the kernel headers
from the kselftest Makefile is causing some issues.  Instead, rely on
the headers to be installed directly by the top-level Makefile
"headers_install" make target prior to building kselftest.

Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Guillaume Tucker authored and Shuah Khan committed Jul 11, 2022
1 parent 3bb267a commit f2745dc
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion tools/testing/selftests/arm64/mte/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ ifeq ($(mte_cc_support),1)
TEST_GEN_PROGS := $(PROGS)

# Get Kernel headers installed and use them.
KSFT_KHDR_INSTALL := 1
else
$(warning compiler "$(CC)" does not support the ARMv8.5 MTE extension.)
$(warning test program "mte" will not be created.)
Expand Down
1 change: 0 additions & 1 deletion tools/testing/selftests/arm64/signal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ PROGS := $(patsubst %.c,%,$(SRCS))
TEST_GEN_PROGS := $(notdir $(PROGS))

# Get Kernel headers installed and use them.
KSFT_KHDR_INSTALL := 1

# Including KSFT lib.mk here will also mangle the TEST_GEN_PROGS list
# to account for any OUTPUT target-dirs optionally provided by
Expand Down
4 changes: 1 addition & 3 deletions tools/testing/selftests/arm64/signal/test_signals.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
#include <ucontext.h>

/*
* Using ARCH specific and sanitized Kernel headers installed by KSFT
* framework since we asked for it by setting flag KSFT_KHDR_INSTALL
* in our Makefile.
* Using ARCH specific and sanitized Kernel headers from the tree.
*/
#include <asm/ptrace.h>
#include <asm/hwcap.h>
Expand Down
1 change: 0 additions & 1 deletion tools/testing/selftests/drivers/s390x/uvdevice/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ else
TEST_GEN_PROGS := test_uvdevice

top_srcdir ?= ../../../../../..
KSFT_KHDR_INSTALL := 1
khdr_dir = $(top_srcdir)/usr/include
LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include

Expand Down
1 change: 0 additions & 1 deletion tools/testing/selftests/futex/functional/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ TEST_GEN_FILES := \
TEST_PROGS := run.sh

top_srcdir = ../../../../..
KSFT_KHDR_INSTALL := 1
DEFAULT_INSTALL_HDR_PATH := 1
include ../../lib.mk

Expand Down
1 change: 0 additions & 1 deletion tools/testing/selftests/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ include ../../../build/Build.include
all:

top_srcdir = ../../../..
KSFT_KHDR_INSTALL := 1

# For cross-builds to work, UNAME_M has to map to ARCH and arch specific
# directories and targets in this Makefile. "uname -m" doesn't map to
Expand Down
1 change: 0 additions & 1 deletion tools/testing/selftests/landlock/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ TEST_GEN_PROGS := $(src_test:.c=)

TEST_GEN_PROGS_EXTENDED := true

KSFT_KHDR_INSTALL := 1
OVERRIDE_TARGETS := 1
include ../lib.mk

Expand Down
1 change: 0 additions & 1 deletion tools/testing/selftests/net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ TEST_PROGS += test_vxlan_vnifiltering.sh

TEST_FILES := settings

KSFT_KHDR_INSTALL := 1
include ../lib.mk

include bpf/Makefile
Expand Down
1 change: 0 additions & 1 deletion tools/testing/selftests/net/mptcp/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-2.0

top_srcdir = ../../../../..
KSFT_KHDR_INSTALL := 1

CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES)

Expand Down
1 change: 0 additions & 1 deletion tools/testing/selftests/tc-testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ top_srcdir = $(abspath ../../../..)
APIDIR := $(top_scrdir)/include/uapi
TEST_GEN_FILES = action.o

KSFT_KHDR_INSTALL := 1
include ../lib.mk

PROBE := $(shell $(LLC) -march=bpf -mcpu=probe -filetype=null /dev/null 2>&1)
Expand Down
1 change: 0 additions & 1 deletion tools/testing/selftests/vm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ TEST_PROGS := run_vmtests.sh
TEST_FILES := test_vmalloc.sh
TEST_FILES += test_hmm.sh

KSFT_KHDR_INSTALL := 1
include ../lib.mk

$(OUTPUT)/madv_populate: vm_util.c
Expand Down

0 comments on commit f2745dc

Please sign in to comment.