]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
selftests: move prctl tests from Documentation/prctl
authorShuah Khan <shuahkh@osg.samsung.com>
Tue, 13 Sep 2016 17:13:46 +0000 (11:13 -0600)
committerShuah Khan <shuahkh@osg.samsung.com>
Tue, 20 Sep 2016 15:09:09 +0000 (09:09 -0600)
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 <corbet@lwn.net>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Documentation/Makefile
Documentation/prctl/Makefile [deleted file]
tools/testing/selftests/prctl/.gitignore [moved from Documentation/prctl/.gitignore with 100% similarity]
tools/testing/selftests/prctl/Makefile [new file with mode: 0644]
tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c [moved from Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c with 100% similarity]
tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c [moved from Documentation/prctl/disable-tsc-on-off-stress-test.c with 100% similarity]
tools/testing/selftests/prctl/disable-tsc-test.c [moved from Documentation/prctl/disable-tsc-test.c with 100% similarity]

index 0473710c09d045fc8f1e423b1a793b30ba04be46..7a28f6c267554cd10433c73a47d8afa5edead4ee 100644 (file)
@@ -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 (file)
index 44de308..0000000
+++ /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/tools/testing/selftests/prctl/Makefile b/tools/testing/selftests/prctl/Makefile
new file mode 100644 (file)
index 0000000..35aa1c8
--- /dev/null
@@ -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