Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <corbet@lwn.net>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

+16 -11
+1 -1
Documentation/Makefile
··· 1 1 subdir-y := accounting auxdisplay blackfin \ 2 2 ia64 laptops mic misc-devices \ 3 - networking pcmcia prctl ptp timers vDSO watchdog 3 + networking pcmcia ptp timers vDSO watchdog
Documentation/prctl/.gitignore tools/testing/selftests/prctl/.gitignore
-10
Documentation/prctl/Makefile
··· 1 - ifndef CROSS_COMPILE 2 - # List of programs to build 3 - hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test 4 - # Tell kbuild to always build the programs 5 - always := $(hostprogs-y) 6 - 7 - HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include 8 - HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include 9 - HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include 10 - endif
Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c
Documentation/prctl/disable-tsc-on-off-stress-test.c tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c
Documentation/prctl/disable-tsc-test.c tools/testing/selftests/prctl/disable-tsc-test.c
+15
tools/testing/selftests/prctl/Makefile
··· 1 + ifndef CROSS_COMPILE 2 + uname_M := $(shell uname -m 2>/dev/null || echo not) 3 + ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) 4 + 5 + ifeq ($(ARCH),x86) 6 + TEST_PROGS := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test \ 7 + disable-tsc-test 8 + all: $(TEST_PROGS) 9 + 10 + include ../lib.mk 11 + 12 + clean: 13 + rm -fr $(TEST_PROGS) 14 + endif 15 + endif