aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-06 16:11:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-06 16:11:51 -0400
commitca95bf62fcf528a0d8069731d39303ba43fb9af4 (patch)
treee5d746396a7aa08efecd69bf8917c23810797efe /tools/testing/selftests/x86
parent0ad39cb3d70fb4324d127aeceee7f63e3f71605c (diff)
parentfa32156921daa5c175228e2cac7679d50efd6c52 (diff)
Merge tag 'linux-kselftest-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull Kselftest update from Shuah Khan: - Work to restructure timers test suite to move PIE out of rtctest from Alexandre Belloni. - Several minor spelling and bug fixes. - New cgroup tests from Roman Gushchin and Mike Rapoport. - Kselftest framework changes to handle and report skipped tests correctly. Prior to these changes, framework treated all non-zero return codes from tests as failures. When tests are skipped with non-zero return code, due to unmet dependencies and/or unsupported configuration, reporting them as failed lead to false negatives on the tests that couldn't be run. - Fixes to test Makefiles to remove unnecessary RUN_TESTS and EMIT_TESTS overrides and use common defines from lib.mk. - Fixes to several tests to return correct Kselftest skip code. - Changes to improve test output. * tag 'linux-kselftest-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (55 commits) selftests: lib: fix prime_numbers module search and skip logic selftests: intel_pstate: notification about privilege required to run intel_pstate testing script selftests: cgroup/memcontrol: add basic test for socket accounting selftest: intel_pstate: debug support message from aperf.c and return value kselftest/cgroup: fix variable dereferenced before check warning selftests/intel_pstate: Enhance table printing selftests/intel_pstate: Improve test, minor fixes selftests: cgroup/memcontrol: add basic test for swap controls selftests: cgroup: add memory controller self-tests selftests: memfd: split regular and hugetlbfs tests selftests: net: return Kselftest Skip code for skipped tests selftests: mqueue: return Kselftest Skip code for skipped tests selftests: memory-hotplug: return Kselftest Skip code for skipped tests selftests: memfd: return Kselftest Skip code for skipped tests selftests: membarrier: return Kselftest Skip code for skipped tests selftests: media_tests: return Kselftest Skip code for skipped tests selftests: locking: return Kselftest Skip code for skipped tests selftests: locking: add Makefile for locking test selftests: lib: return Kselftest Skip code for skipped tests selftests: lib: add prime_numbers.sh test to Makefile ...
Diffstat (limited to 'tools/testing/selftests/x86')
-rw-r--r--tools/testing/selftests/x86/Makefile8
-rw-r--r--tools/testing/selftests/x86/trivial_program.c10
2 files changed, 17 insertions, 1 deletions
diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
index 39f66bc29b82..186520198de7 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -8,6 +8,7 @@ include ../lib.mk
8UNAME_M := $(shell uname -m) 8UNAME_M := $(shell uname -m)
9CAN_BUILD_I386 := $(shell ./check_cc.sh $(CC) trivial_32bit_program.c -m32) 9CAN_BUILD_I386 := $(shell ./check_cc.sh $(CC) trivial_32bit_program.c -m32)
10CAN_BUILD_X86_64 := $(shell ./check_cc.sh $(CC) trivial_64bit_program.c) 10CAN_BUILD_X86_64 := $(shell ./check_cc.sh $(CC) trivial_64bit_program.c)
11CAN_BUILD_WITH_NOPIE := $(shell ./check_cc.sh $(CC) trivial_program.c -no-pie)
11 12
12TARGETS_C_BOTHBITS := single_step_syscall sysret_ss_attrs syscall_nt test_mremap_vdso \ 13TARGETS_C_BOTHBITS := single_step_syscall sysret_ss_attrs syscall_nt test_mremap_vdso \
13 check_initial_reg_state sigreturn iopl mpx-mini-test ioperm \ 14 check_initial_reg_state sigreturn iopl mpx-mini-test ioperm \
@@ -31,7 +32,12 @@ BINARIES_64 := $(TARGETS_C_64BIT_ALL:%=%_64)
31BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32)) 32BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32))
32BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64)) 33BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64))
33 34
34CFLAGS := -O2 -g -std=gnu99 -pthread -Wall -no-pie 35CFLAGS := -O2 -g -std=gnu99 -pthread -Wall
36
37# call32_from_64 in thunks.S uses absolute addresses.
38ifeq ($(CAN_BUILD_WITH_NOPIE),1)
39CFLAGS += -no-pie
40endif
35 41
36define gen-target-rule-32 42define gen-target-rule-32
37$(1) $(1)_32: $(OUTPUT)/$(1)_32 43$(1) $(1)_32: $(OUTPUT)/$(1)_32
diff --git a/tools/testing/selftests/x86/trivial_program.c b/tools/testing/selftests/x86/trivial_program.c
new file mode 100644
index 000000000000..46a447163b93
--- /dev/null
+++ b/tools/testing/selftests/x86/trivial_program.c
@@ -0,0 +1,10 @@
1/* Trivial program to check that compilation with certain flags is working. */
2
3#include <stdio.h>
4
5int
6main(void)
7{
8 puts("");
9 return 0;
10}