From 92dd8dd4d07f170db0638a20a8db691262da4e5e Mon Sep 17 00:00:00 2001 From: Shuah Khan Date: Tue, 13 Sep 2016 11:13:46 -0600 Subject: [PATCH] selftests: move prctl tests from Documentation/prctl Move prctl tests from Documentation/prctl to selftests/prctl. Remove prctl from Makefile to move the test. Update prctl Makefile to work under selftests. prctl will not be run as part of selftests suite and will not be included in install targets. They can be built separately for now. Acked-by: Jonathan Corbet Signed-off-by: Shuah Khan --- Documentation/Makefile | 2 +- Documentation/prctl/Makefile | 10 ---------- .../testing/selftests}/prctl/.gitignore | 0 tools/testing/selftests/prctl/Makefile | 15 +++++++++++++++ .../prctl/disable-tsc-ctxt-sw-stress-test.c | 0 .../prctl/disable-tsc-on-off-stress-test.c | 0 .../testing/selftests}/prctl/disable-tsc-test.c | 0 7 files changed, 16 insertions(+), 11 deletions(-) delete mode 100644 Documentation/prctl/Makefile rename {Documentation => tools/testing/selftests}/prctl/.gitignore (100%) create mode 100644 tools/testing/selftests/prctl/Makefile rename {Documentation => tools/testing/selftests}/prctl/disable-tsc-ctxt-sw-stress-test.c (100%) rename {Documentation => tools/testing/selftests}/prctl/disable-tsc-on-off-stress-test.c (100%) rename {Documentation => tools/testing/selftests}/prctl/disable-tsc-test.c (100%) diff --git a/Documentation/Makefile b/Documentation/Makefile index 0473710c09d0..7a28f6c26755 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,3 +1,3 @@ subdir-y := accounting auxdisplay blackfin \ ia64 laptops mic misc-devices \ - networking pcmcia prctl ptp timers vDSO watchdog + networking pcmcia ptp timers vDSO watchdog diff --git a/Documentation/prctl/Makefile b/Documentation/prctl/Makefile deleted file mode 100644 index 44de3080c7f2..000000000000 --- a/Documentation/prctl/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -ifndef CROSS_COMPILE -# List of programs to build -hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include -HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include -HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include -endif diff --git a/Documentation/prctl/.gitignore b/tools/testing/selftests/prctl/.gitignore similarity index 100% rename from Documentation/prctl/.gitignore rename to tools/testing/selftests/prctl/.gitignore diff --git a/tools/testing/selftests/prctl/Makefile b/tools/testing/selftests/prctl/Makefile new file mode 100644 index 000000000000..35aa1c8f2df2 --- /dev/null +++ b/tools/testing/selftests/prctl/Makefile @@ -0,0 +1,15 @@ +ifndef CROSS_COMPILE +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/) + +ifeq ($(ARCH),x86) +TEST_PROGS := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test \ + disable-tsc-test +all: $(TEST_PROGS) + +include ../lib.mk + +clean: + rm -fr $(TEST_PROGS) +endif +endif diff --git a/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c b/tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c similarity index 100% rename from Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c rename to tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c diff --git a/Documentation/prctl/disable-tsc-on-off-stress-test.c b/tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c similarity index 100% rename from Documentation/prctl/disable-tsc-on-off-stress-test.c rename to tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c diff --git a/Documentation/prctl/disable-tsc-test.c b/tools/testing/selftests/prctl/disable-tsc-test.c similarity index 100% rename from Documentation/prctl/disable-tsc-test.c rename to tools/testing/selftests/prctl/disable-tsc-test.c