Commit 225d3b67 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'linux-kselftest-4.14-rc3-fixes' of...

Merge tag 'linux-kselftest-4.14-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kselftest fixes from Shuah Khan:
 "This update consists of:

   - fixes to several existing tests

   - a test for regression introduced by b9470c27 ("inet: kill
     smallest_size and smallest_port")

   - seccomp support for glibc 2.26 siginfo_t.h

   - fixes to kselftest framework and tests to run make O=dir use-case

   - fixes to silence unnecessary test output to de-clutter test results"

* tag 'linux-kselftest-4.14-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (28 commits)
  selftests: timers: set-timer-lat: Fix hang when testing unsupported alarms
  selftests: timers: set-timer-lat: fix hang when std out/err are redirected
  selftests/memfd: correct run_tests.sh permission
  selftests/seccomp: Support glibc 2.26 siginfo_t.h
  selftests: futex: Makefile: fix for loops in targets to run silently
  selftests: Makefile: fix for loops in targets to run silently
  selftests: mqueue: Use full path to run tests from Makefile
  selftests: futex: copy sub-dir test scripts for make O=dir run
  selftests: lib.mk: copy test scripts and test files for make O=dir run
  selftests: sync: kselftest and kselftest-clean fail for make O=dir case
  selftests: sync: use TEST_CUSTOM_PROGS instead of TEST_PROGS
  selftests: lib.mk: add TEST_CUSTOM_PROGS to allow custom test run/install
  selftests: watchdog: fix to use TEST_GEN_PROGS and remove clean
  selftests: lib.mk: fix test executable status check to use full path
  selftests: Makefile: clear LDFLAGS for make O=dir use-case
  selftests: lib.mk: kselftest and kselftest-clean fail for make O=dir case
  Makefile: kselftest and kselftest-clean fail for make O=dir case
  selftests/net: msg_zerocopy enable build with older kernel headers
  selftests: actually run the various net selftests
  selftest: add a reuseaddr test
  ...
parents 7031b641 eefd95e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1172,11 +1172,11 @@ headers_check: headers_install

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

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

PHONY += kselftest-merge
kselftest-merge:
+11 −7
Original line number Diff line number Diff line
@@ -52,6 +52,10 @@ override LDFLAGS =
override MAKEFLAGS =
endif

ifneq ($(KBUILD_SRC),)
override LDFLAGS =
endif

BUILD := $(O)
ifndef BUILD
  BUILD := $(KBUILD_OUTPUT)
@@ -62,32 +66,32 @@ endif

export BUILD
all:
	for TARGET in $(TARGETS); do		\
	@for TARGET in $(TARGETS); do		\
		BUILD_TARGET=$$BUILD/$$TARGET;	\
		mkdir $$BUILD_TARGET  -p;	\
		make OUTPUT=$$BUILD_TARGET -C $$TARGET;\
	done;

run_tests: all
	for TARGET in $(TARGETS); do \
	@for TARGET in $(TARGETS); do \
		BUILD_TARGET=$$BUILD/$$TARGET;	\
		make OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests;\
	done;

hotplug:
	for TARGET in $(TARGETS_HOTPLUG); do \
	@for TARGET in $(TARGETS_HOTPLUG); do \
		BUILD_TARGET=$$BUILD/$$TARGET;	\
		make OUTPUT=$$BUILD_TARGET -C $$TARGET;\
	done;

run_hotplug: hotplug
	for TARGET in $(TARGETS_HOTPLUG); do \
	@for TARGET in $(TARGETS_HOTPLUG); do \
		BUILD_TARGET=$$BUILD/$$TARGET;	\
		make OUTPUT=$$BUILD_TARGET -C $$TARGET run_full_test;\
	done;

clean_hotplug:
	for TARGET in $(TARGETS_HOTPLUG); do \
	@for TARGET in $(TARGETS_HOTPLUG); do \
		BUILD_TARGET=$$BUILD/$$TARGET;	\
		make OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
	done;
@@ -103,7 +107,7 @@ install:
ifdef INSTALL_PATH
	@# Ask all targets to install their files
	mkdir -p $(INSTALL_PATH)
	for TARGET in $(TARGETS); do \
	@for TARGET in $(TARGETS); do \
		BUILD_TARGET=$$BUILD/$$TARGET;	\
		make OUTPUT=$$BUILD_TARGET -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \
	done;
@@ -128,7 +132,7 @@ else
endif

clean:
	for TARGET in $(TARGETS); do \
	@for TARGET in $(TARGETS); do \
		BUILD_TARGET=$$BUILD/$$TARGET;	\
		make OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
	done;
+9 −8
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ static inline unsigned int bpf_num_possible_cpus(void)
	unsigned int start, end, possible_cpus = 0;
	char buff[128];
	FILE *fp;
	int n;

	fp = fopen(fcpu, "r");
	if (!fp) {
@@ -20,17 +21,17 @@ static inline unsigned int bpf_num_possible_cpus(void)
	}

	while (fgets(buff, sizeof(buff), fp)) {
		if (sscanf(buff, "%u-%u", &start, &end) == 2) {
		n = sscanf(buff, "%u-%u", &start, &end);
		if (n == 0) {
			printf("Failed to retrieve # possible CPUs!\n");
			exit(1);
		} else if (n == 1) {
			end = start;
		}
		possible_cpus = start == 0 ? end + 1 : 0;
		break;
	}
	}

	fclose(fp);
	if (!possible_cpus) {
		printf("Failed to retrieve # possible CPUs!\n");
		exit(1);
	}

	return possible_cpus;
}
+4 −4
Original line number Diff line number Diff line
@@ -2,14 +2,14 @@
uname_M := $(shell uname -m 2>/dev/null || echo not)
ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)

TEST_GEN_PROGS := step_after_suspend_test

ifeq ($(ARCH),x86)
TEST_GEN_PROGS := breakpoint_test
TEST_GEN_PROGS += breakpoint_test
endif
ifneq (,$(filter $(ARCH),aarch64 arm64))
TEST_GEN_PROGS := breakpoint_test_arm64
TEST_GEN_PROGS += breakpoint_test_arm64
endif

TEST_GEN_PROGS += step_after_suspend_test

include ../lib.mk
+2 −0
Original line number Diff line number Diff line
#!/bin/sh
# description: Register/unregister many kprobe events

[ -f kprobe_events ] || exit_unsupported # this is configurable

# ftrace fentry skip size depends on the machine architecture.
# Currently HAVE_KPROBES_ON_FTRACE defined on x86 and powerpc64le
case `uname -m` in
Loading