Commit e05d5b9c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'linux-kselftest-next-5.20-rc1' of...

Merge tag 'linux-kselftest-next-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull Kselftest updates from Shuah Khan:

 - timers test build fixes and cleanups for new tool chains

 - removing khdr from kselftest framework and main Makefile

 - changes to test output messages to improve reports

* tag 'linux-kselftest-next-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (24 commits)
  Makefile: replace headers_install with headers for kselftest
  selftests/landlock: drop deprecated headers dependency
  selftests: timers: clocksource-switch: adapt to kselftest framework
  selftests: timers: clocksource-switch: add 'runtime' command line parameter
  selftests: timers: clocksource-switch: add command line switch to skip sanity check
  selftests: timers: clocksource-switch: sort includes
  selftests: timers: clocksource-switch: fix passing errors from child
  selftests: timers: inconsistency-check: adapt to kselftest framework
  selftests: timers: nanosleep: adapt to kselftest framework
  selftests: timers: fix declarations of main()
  selftests: timers: valid-adjtimex: build fix for newer toolchains
  Makefile: add headers_install to kselftest targets
  selftests: drop KSFT_KHDR_INSTALL make target
  selftests: stop using KSFT_KHDR_INSTALL
  selftests: drop khdr make target
  selftests: drivers/dma-buf: Improve message in selftest summary
  selftests/kcmp: Make the test output consistent and clear
  selftests:timers: globals don't need initialization to 0
  selftests/drivers/gpu: Add error messages to drm_mm.sh
  selftests/tpm2: increase timeout for kselftests
  ...
parents 665fe72a 4062eba9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1348,10 +1348,10 @@ tools/%: FORCE
# Kernel selftest

PHONY += kselftest
kselftest:
kselftest: headers
	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests

kselftest-%: FORCE
kselftest-%: headers FORCE
	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*

PHONY += kselftest-merge
+3 −27
Original line number Diff line number Diff line
@@ -143,7 +143,6 @@ endif
# Prepare for headers install
include $(top_srcdir)/scripts/subarch.include
ARCH           ?= $(SUBARCH)
export KSFT_KHDR_INSTALL_DONE := 1
export BUILD
export KHDR_INCLUDES

@@ -151,30 +150,7 @@ export KHDR_INCLUDES
# all isn't the first target in the file.
.DEFAULT_GOAL := all

# Install headers here once for all tests. KSFT_KHDR_INSTALL_DONE
# is used to avoid running headers_install from lib.mk.
# Invoke headers install with --no-builtin-rules to avoid circular
# dependency in "make kselftest" case. In this case, second level
# make inherits builtin-rules which will use the rule generate
# Makefile.o and runs into
# "Circular Makefile.o <- prepare dependency dropped."
# and headers_install fails and test compile fails.
#
# O= KBUILD_OUTPUT cases don't run into this error, since main Makefile
# invokes them as sub-makes and --no-builtin-rules is not necessary,
# but doesn't cause any failures. Keep it simple and use the same
# flags in both cases.
# Local build cases: "make kselftest", "make -C" - headers are installed
# in the default INSTALL_HDR_PATH usr/include.
khdr:
ifeq (1,$(DEFAULT_INSTALL_HDR_PATH))
	$(MAKE) --no-builtin-rules ARCH=$(ARCH) -C $(top_srcdir) headers_install
else
	$(MAKE) --no-builtin-rules INSTALL_HDR_PATH=$(abs_objtree)/usr \
		ARCH=$(ARCH) -C $(top_srcdir) headers_install
endif

all: khdr
all:
	@ret=1;							\
	for TARGET in $(TARGETS); do				\
		BUILD_TARGET=$$BUILD/$$TARGET;			\
@@ -253,7 +229,7 @@ ifdef INSTALL_PATH
	for TARGET in $(TARGETS); do \
		BUILD_TARGET=$$BUILD/$$TARGET;	\
		[ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \
		echo -n "Emit Tests for $$TARGET\n"; \
		echo -ne "Emit Tests for $$TARGET\n"; \
		$(MAKE) -s --no-print-directory OUTPUT=$$BUILD_TARGET COLLECTION=$$TARGET \
			-C $$TARGET emit_tests >> $(TEST_LIST); \
	done;
@@ -274,4 +250,4 @@ clean:
		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
	done;

.PHONY: khdr all run_tests hotplug run_hotplug clean_hotplug run_pstore_crash install clean gen_tar
.PHONY: all run_tests hotplug run_hotplug clean_hotplug run_pstore_crash install clean gen_tar
+0 −1
Original line number Diff line number Diff line
@@ -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.)
+0 −1
Original line number Diff line number Diff line
@@ -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
+1 −3
Original line number Diff line number Diff line
@@ -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>
Loading