Move runnable code (tests) from Documentation to selftests
Subsystems (6)
v2 cover Move runnable code (tests) from Documentation to selftests
Move runnable code (tests) from Documentation to selftests and update Makefiles to work under selftests.
Jon Corbet and I discussed this in an email thread and as per that discussion, this patch series moves all the tests that are under the Documentation directory to selftests. There is more runnable code in the form of examples and utils and that is going to be another patch series. I moved just the tests and left the documentation files as is.
Checkpatch isn't happy with a few of the patches as some of the renamed files have existing checkpatch errors and warnings. I am working another patch series that will address those.
Changes since v1:
- Changes to Documentation/Makefile to remove test targets as the tests get moved.
- Combined patches based on Michael Ellerman's comments.
- Fixed change log errors based on Sergei Shtylyov's comments.
- Expanded to list to wider audience and people that responded with comments and ideas.
- Included ia64 and watchdog which I missed in the v1 series.
Shuah Khan (6):
selftests: move dnotify_test from Documentation/filesystems
selftests: move prctl tests from Documentation/prctl
selftests: move ptp tests from Documentation/ptp
selftests: move vDSO tests from Documentation/vDSO
selftests: move ia64 tests from Documentation/ia64
selftests: move watchdog tests from Documentation/watchdog
Documentation/Makefile | 4 +- Documentation/filesystems/.gitignore | 1 - Documentation/filesystems/Makefile | 5 - Documentation/filesystems/dnotify_test.c | 34 -- Documentation/ia64/.gitignore | 1 - Documentation/ia64/Makefile | 5 - Documentation/ia64/aliasing-test.c | 263 ----------- Documentation/prctl/.gitignore | 3 - Documentation/prctl/Makefile | 10 - .../prctl/disable-tsc-ctxt-sw-stress-test.c | 97 ---- .../prctl/disable-tsc-on-off-stress-test.c | 96 ---- Documentation/prctl/disable-tsc-test.c | 95 ---- Documentation/ptp/.gitignore | 1 - Documentation/ptp/Makefile | 8 - Documentation/ptp/testptp.c | 523 --------------------- Documentation/ptp/testptp.mk | 33 -- Documentation/vDSO/.gitignore | 2 - Documentation/vDSO/Makefile | 17 - Documentation/vDSO/parse_vdso.c | 269 ----------- Documentation/vDSO/vdso_standalone_test_x86.c | 128 ----- Documentation/vDSO/vdso_test.c | 52 -- Documentation/watchdog/src/.gitignore | 1 - Documentation/watchdog/src/Makefile | 2 +- Documentation/watchdog/src/watchdog-test.c | 105 ----- tools/testing/selftests/filesystems/.gitignore | 1 + tools/testing/selftests/filesystems/Makefile | 7 + tools/testing/selftests/filesystems/dnotify_test.c | 34 ++ tools/testing/selftests/ia64/.gitignore | 1 + tools/testing/selftests/ia64/Makefile | 8 + tools/testing/selftests/ia64/aliasing-test.c | 263 +++++++++++ tools/testing/selftests/prctl/.gitignore | 3 + tools/testing/selftests/prctl/Makefile | 15 + .../prctl/disable-tsc-ctxt-sw-stress-test.c | 97 ++++ .../prctl/disable-tsc-on-off-stress-test.c | 96 ++++ tools/testing/selftests/prctl/disable-tsc-test.c | 95 ++++ tools/testing/selftests/ptp/.gitignore | 1 + tools/testing/selftests/ptp/Makefile | 8 + tools/testing/selftests/ptp/testptp.c | 523 +++++++++++++++++++++ tools/testing/selftests/ptp/testptp.mk | 33 ++ tools/testing/selftests/vDSO/.gitignore | 2 + tools/testing/selftests/vDSO/Makefile | 20 + tools/testing/selftests/vDSO/parse_vdso.c | 269 +++++++++++ .../selftests/vDSO/vdso_standalone_test_x86.c | 128 +++++ tools/testing/selftests/vDSO/vdso_test.c | 52 ++ tools/testing/selftests/watchdog/.gitignore | 1 + tools/testing/selftests/watchdog/Makefile | 8 + tools/testing/selftests/watchdog/watchdog-test.c | 105 +++++ 47 files changed, 1773 insertions(+), 1752 deletions(-) delete mode 100644 Documentation/filesystems/.gitignore delete mode 100644 Documentation/filesystems/Makefile delete mode 100644 Documentation/filesystems/dnotify_test.c delete mode 100644 Documentation/ia64/.gitignore delete mode 100644 Documentation/ia64/Makefile delete mode 100644 Documentation/ia64/aliasing-test.c delete mode 100644 Documentation/prctl/.gitignore delete mode 100644 Documentation/prctl/Makefile delete mode 100644 Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c delete mode 100644 Documentation/prctl/disable-tsc-on-off-stress-test.c delete mode 100644 Documentation/prctl/disable-tsc-test.c delete mode 100644 Documentation/ptp/.gitignore delete mode 100644 Documentation/ptp/Makefile delete mode 100644 Documentation/ptp/testptp.c delete mode 100644 Documentation/ptp/testptp.mk delete mode 100644 Documentation/vDSO/.gitignore delete mode 100644 Documentation/vDSO/Makefile delete mode 100644 Documentation/vDSO/parse_vdso.c delete mode 100644 Documentation/vDSO/vdso_standalone_test_x86.c delete mode 100644 Documentation/vDSO/vdso_test.c delete mode 100644 Documentation/watchdog/src/watchdog-test.c create mode 100644 tools/testing/selftests/filesystems/.gitignore create mode 100644 tools/testing/selftests/filesystems/Makefile create mode 100644 tools/testing/selftests/filesystems/dnotify_test.c create mode 100644 tools/testing/selftests/ia64/.gitignore create mode 100644 tools/testing/selftests/ia64/Makefile create mode 100644 tools/testing/selftests/ia64/aliasing-test.c create mode 100644 tools/testing/selftests/prctl/.gitignore create mode 100644 tools/testing/selftests/prctl/Makefile create mode 100644 tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c create mode 100644 tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c create mode 100644 tools/testing/selftests/prctl/disable-tsc-test.c create mode 100644 tools/testing/selftests/ptp/.gitignore create mode 100644 tools/testing/selftests/ptp/Makefile create mode 100644 tools/testing/selftests/ptp/testptp.c create mode 100644 tools/testing/selftests/ptp/testptp.mk create mode 100644 tools/testing/selftests/vDSO/.gitignore create mode 100644 tools/testing/selftests/vDSO/Makefile create mode 100644 tools/testing/selftests/vDSO/parse_vdso.c create mode 100644 tools/testing/selftests/vDSO/vdso_standalone_test_x86.c create mode 100644 tools/testing/selftests/vDSO/vdso_test.c create mode 100644 tools/testing/selftests/watchdog/.gitignore create mode 100644 tools/testing/selftests/watchdog/Makefile create mode 100644 tools/testing/selftests/watchdog/watchdog-test.c
Signature · 1 line
2.7.4
PATCH v2 1/6 selftests: move dnotify_test from Documentation/filesystems
Move dnotify_test.c, Makefile, and .gitignore from Documentation/filesystems to selftests/filesystems.
Remove filesystems build target from Documentation/Makefile and update selftests/filesystems/Makefile to work under selftests. dnotify_test will not be run as part of selftests suite and will not be included in install targets. It can be built separately for now.
--- Documentation/Makefile | 2 +- Documentation/filesystems/.gitignore | 1 - Documentation/filesystems/Makefile | 5 ---- Documentation/filesystems/dnotify_test.c | 34 ---------------------- tools/testing/selftests/filesystems/.gitignore | 1 + tools/testing/selftests/filesystems/Makefile | 7 +++++ tools/testing/selftests/filesystems/dnotify_test.c | 34 ++++++++++++++++++++++ 7 files changed, 43 insertions(+), 41 deletions(-) delete mode 100644 Documentation/filesystems/.gitignore delete mode 100644 Documentation/filesystems/Makefile delete mode 100644 Documentation/filesystems/dnotify_test.c create mode 100644 tools/testing/selftests/filesystems/.gitignore create mode 100644 tools/testing/selftests/filesystems/Makefile create mode 100644 tools/testing/selftests/filesystems/dnotify_test.c
Documentation/Makefile +1 -1
@@ -1,3 +1,3 @@ subdir-y := accounting auxdisplay blackfin \ - filesystems filesystems ia64 laptops mic misc-devices \ + ia64 laptops mic misc-devices \ networking pcmcia prctl ptp timers vDSO watchdog
Documentation/filesystems/.gitignore deleted +0 -1
@@ -1 +0,0 @@ -dnotify_test
Documentation/filesystems/Makefile deleted +0 -5
@@ -1,5 +0,0 @@ -# List of programs to build -hostprogs-y := dnotify_test - -# Tell kbuild to always build the programs -always := $(hostprogs-y)
Documentation/filesystems/dnotify_test.c deleted +0 -34
@@ -1,34 +0,0 @@ -#define _GNU_SOURCE/* needed to get the defines */ -#include <fcntl.h> /* in glibc 2.2 this has the needed -values defined */ -#include <signal.h> -#include <stdio.h> -#include <unistd.h> - -static volatile int event_fd; - -static void handler (int sig,siginfo_t *si,void *data) -{ - event_fd = si->si_fd; -} - -int main (void ) -{ -struct sigaction act; -int fd; - - act.sa_sigaction = handler; -sigemptyset (&act.sa_mask); - act.sa_flags =SA_SIGINFO ; -sigaction (SIGRTMIN +1 , &act,NULL ); - - fd =open ("." ,O_RDONLY ); -fcntl (fd,F_SETSIG ,SIGRTMIN +1 ); -fcntl (fd,F_NOTIFY ,DN_MODIFY |DN_CREATE |DN_MULTISHOT ); -/* we will now be notified if any of the files -in "." is modified or new files are created */ -while (1 ) { -pause (); -printf ("Got event on fd=%d\n" , event_fd); - } -}
tools/testing/selftests/filesystems/.gitignore new file +1 -0
@@ -0,0 +1 @@ +dnotify_test
tools/testing/selftests/filesystems/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +TEST_PROGS := dnotify_test +all: $(TEST_PROGS) + +include ../lib.mk + +clean: + rm -fr $(TEST_PROGS)
tools/testing/selftests/filesystems/dnotify_test.c new file +34 -0
@@ -0,0 +1,34 @@ +#define _GNU_SOURCE/* needed to get the defines */ +#include <fcntl.h> /* in glibc 2.2 this has the needed +values defined */ +#include <signal.h> +#include <stdio.h> +#include <unistd.h> + +static volatile int event_fd; + +static void handler (int sig,siginfo_t *si,void *data) +{ + event_fd = si->si_fd; +} + +int main (void ) +{ +struct sigaction act; +int fd; + + act.sa_sigaction = handler; +sigemptyset (&act.sa_mask); + act.sa_flags =SA_SIGINFO ; +sigaction (SIGRTMIN +1 , &act,NULL ); + + fd =open ("." ,O_RDONLY ); +fcntl (fd,F_SETSIG ,SIGRTMIN +1 ); +fcntl (fd,F_NOTIFY ,DN_MODIFY |DN_CREATE |DN_MULTISHOT ); +/* we will now be notified if any of the files +in "." is modified or new files are created */ +while (1 ) { +pause (); +printf ("Got event on fd=%d\n" , event_fd); + } +}
Signature · 1 line
2.7.4
PATCH v2 4/6 selftests: move vDSO tests from Documentation/vDSO
In reply to Shuah KhanRemove vDSO from Makefile to move the to selftests. Update vDSO Makefile to work under selftests. vDSO will not be run as part of selftests suite and will not be included in install targets. They can be built separately for now.
--- Documentation/Makefile | 2 +- Documentation/vDSO/.gitignore | 2 - Documentation/vDSO/Makefile | 17 -- Documentation/vDSO/parse_vdso.c | 269 --------------------- Documentation/vDSO/vdso_standalone_test_x86.c | 128 ---------- Documentation/vDSO/vdso_test.c | 52 ---- tools/testing/selftests/vDSO/.gitignore | 2 + tools/testing/selftests/vDSO/Makefile | 20 ++ tools/testing/selftests/vDSO/parse_vdso.c | 269 +++++++++++++++++++++ .../selftests/vDSO/vdso_standalone_test_x86.c | 128 ++++++++++ tools/testing/selftests/vDSO/vdso_test.c | 52 ++++ 11 files changed, 472 insertions(+), 469 deletions(-) delete mode 100644 Documentation/vDSO/.gitignore delete mode 100644 Documentation/vDSO/Makefile delete mode 100644 Documentation/vDSO/parse_vdso.c delete mode 100644 Documentation/vDSO/vdso_standalone_test_x86.c delete mode 100644 Documentation/vDSO/vdso_test.c create mode 100644 tools/testing/selftests/vDSO/.gitignore create mode 100644 tools/testing/selftests/vDSO/Makefile create mode 100644 tools/testing/selftests/vDSO/parse_vdso.c create mode 100644 tools/testing/selftests/vDSO/vdso_standalone_test_x86.c create mode 100644 tools/testing/selftests/vDSO/vdso_test.c
Documentation/Makefile +1 -1
@@ -1,3 +1,3 @@ subdir-y := accounting auxdisplay blackfin \ ia64 laptops mic misc-devices \ - networking pcmcia timers vDSO watchdog + networking pcmcia timers watchdog
Documentation/vDSO/.gitignore deleted +0 -2
@@ -1,2 +0,0 @@ -vdso_test -vdso_standalone_test_x86
Documentation/vDSO/Makefile deleted +0 -17
@@ -1,17 +0,0 @@ -ifndef CROSS_COMPILE -# vdso_test won't build for glibc < 2.16, so disable it -# hostprogs-y := vdso_test -hostprogs-$(CONFIG_X86) := vdso_standalone_test_x86 -vdso_standalone_test_x86-objs := vdso_standalone_test_x86.o parse_vdso.o -vdso_test-objs := parse_vdso.o vdso_test.o - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS := -I$(objtree)/usr/include -std=gnu99 -HOSTCFLAGS_vdso_standalone_test_x86.o := -fno-asynchronous-unwind-tables -fno-stack-protector -HOSTLOADLIBES_vdso_standalone_test_x86 := -nostdlib -ifeq ($(CONFIG_X86_32),y) -HOSTLOADLIBES_vdso_standalone_test_x86 += -lgcc_s -endif -endif
Documentation/vDSO/parse_vdso.c deleted +0 -269
269 lines not on this page · raw message
Documentation/vDSO/vdso_standalone_test_x86.c deleted +0 -128
128 lines not on this page · raw message
Documentation/vDSO/vdso_test.c deleted +0 -52
52 lines not on this page · raw message
tools/testing/selftests/vDSO/.gitignore new file +2 -0
@@ -0,0 +1,2 @@ +vdso_test +vdso_standalone_test_x86
tools/testing/selftests/vDSO/Makefile new file +20 -0
@@ -0,0 +1,20 @@ +ifndef CROSS_COMPILE +CFLAGS := -std=gnu99 +CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector +ifeq ($(CONFIG_X86_32),y) +LDLIBS += -lgcc_s +endif + +TEST_PROGS := vdso_test vdso_standalone_test_x86 + +all: $(TEST_PROGS) +vdso_test: parse_vdso.c vdso_test.c +vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c + $(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \ + vdso_standalone_test_x86.c parse_vdso.c \ + -o vdso_standalone_test_x86 + +include ../lib.mk +clean: + rm -fr $(TEST_PROGS) +endif
tools/testing/selftests/vDSO/parse_vdso.c new file +269 -0
269 lines not on this page · raw message
tools/testing/selftests/vDSO/vdso_standalone_test_x86.c new file +128 -0
128 lines not on this page · raw message
tools/testing/selftests/vDSO/vdso_test.c new file +52 -0
52 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 5/6 selftests: move ia64 tests from Documentation/ia64
In reply to Shuah KhanRemove ia64 from Makefile to move the test to selftests.
Update ia64 Makefile to work under selftests. ia64 will not be run as part of selftests suite and will not be included in install targets. They can be built separately for now.
The original Makefile built this test on all archirectures and this update doesn't change that.
--- Documentation/Makefile | 2 +- Documentation/ia64/.gitignore | 1 - Documentation/ia64/Makefile | 5 - Documentation/ia64/aliasing-test.c | 263 --------------------------- tools/testing/selftests/ia64/.gitignore | 1 + tools/testing/selftests/ia64/Makefile | 8 + tools/testing/selftests/ia64/aliasing-test.c | 263 +++++++++++++++++++++++++++ 7 files changed, 273 insertions(+), 270 deletions(-) delete mode 100644 Documentation/ia64/.gitignore delete mode 100644 Documentation/ia64/Makefile delete mode 100644 Documentation/ia64/aliasing-test.c create mode 100644 tools/testing/selftests/ia64/.gitignore create mode 100644 tools/testing/selftests/ia64/Makefile create mode 100644 tools/testing/selftests/ia64/aliasing-test.c
Documentation/Makefile +1 -1
@@ -1,3 +1,3 @@ subdir-y := accounting auxdisplay blackfin \ - ia64 laptops mic misc-devices \ + laptops mic misc-devices \ networking pcmcia timers watchdog
Documentation/ia64/.gitignore deleted +0 -1
@@ -1 +0,0 @@ -aliasing-test
Documentation/ia64/Makefile deleted +0 -5
@@ -1,5 +0,0 @@ -# List of programs to build -hostprogs-y := aliasing-test - -# Tell kbuild to always build the programs -always := $(hostprogs-y)
Documentation/ia64/aliasing-test.c deleted +0 -263
263 lines not on this page · raw message
tools/testing/selftests/ia64/.gitignore new file +1 -0
@@ -0,0 +1 @@ +aliasing-test
tools/testing/selftests/ia64/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +TEST_PROGS := aliasing-test + +all: $(TEST_PROGS) + +include ../lib.mk + +clean: + rm -fr $(TEST_PROGS)
tools/testing/selftests/ia64/aliasing-test.c new file +263 -0
263 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 6/6 selftests: move watchdog tests from Documentation/watchdog
In reply to Shuah KhanRemove watchdog-test from Makefile to move the test to selftests.
Add Makefile and .gitignore to for watchdog-test. watchdog-test will not be run as part of selftests suite and will not be included in install targets. It can be built separately for now.
--- Documentation/watchdog/src/.gitignore | 1 - Documentation/watchdog/src/Makefile | 2 +- Documentation/watchdog/src/watchdog-test.c | 105 ----------------------- tools/testing/selftests/watchdog/.gitignore | 1 + tools/testing/selftests/watchdog/Makefile | 8 ++ tools/testing/selftests/watchdog/watchdog-test.c | 105 +++++++++++++++++++++++ 6 files changed, 115 insertions(+), 107 deletions(-) delete mode 100644 Documentation/watchdog/src/watchdog-test.c create mode 100644 tools/testing/selftests/watchdog/.gitignore create mode 100644 tools/testing/selftests/watchdog/Makefile create mode 100644 tools/testing/selftests/watchdog/watchdog-test.c
Documentation/watchdog/src/.gitignore +0 -1
@@ -1,2 +1 @@ watchdog-simple -watchdog-test
Documentation/watchdog/src/Makefile +1 -1
@@ -1,5 +1,5 @@ # List of programs to build -hostprogs-y := watchdog-simple watchdog-test +hostprogs-y := watchdog-simple # Tell kbuild to always build the programs always := $(hostprogs-y)
Documentation/watchdog/src/watchdog-test.c deleted +0 -105
105 lines not on this page · raw message
tools/testing/selftests/watchdog/.gitignore new file +1 -0
@@ -0,0 +1 @@ +watchdog-test
tools/testing/selftests/watchdog/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +TEST_PROGS := watchdog-test + +all: $(TEST_PROGS) + +include ../lib.mk + +clean: + rm -fr $(TEST_PROGS)
tools/testing/selftests/watchdog/watchdog-test.c new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 2/6 selftests: move prctl tests from Documentation/prctl
In reply to Shuah KhanMove 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.
--- Documentation/Makefile | 2 +- Documentation/prctl/.gitignore | 3 - Documentation/prctl/Makefile | 10 --- .../prctl/disable-tsc-ctxt-sw-stress-test.c | 97 ---------------------- .../prctl/disable-tsc-on-off-stress-test.c | 96 --------------------- Documentation/prctl/disable-tsc-test.c | 95 --------------------- tools/testing/selftests/prctl/.gitignore | 3 + tools/testing/selftests/prctl/Makefile | 15 ++++ .../prctl/disable-tsc-ctxt-sw-stress-test.c | 97 ++++++++++++++++++++++ .../prctl/disable-tsc-on-off-stress-test.c | 96 +++++++++++++++++++++ tools/testing/selftests/prctl/disable-tsc-test.c | 95 +++++++++++++++++++++ 11 files changed, 307 insertions(+), 302 deletions(-) delete mode 100644 Documentation/prctl/.gitignore delete mode 100644 Documentation/prctl/Makefile delete mode 100644 Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c delete mode 100644 Documentation/prctl/disable-tsc-on-off-stress-test.c delete mode 100644 Documentation/prctl/disable-tsc-test.c create mode 100644 tools/testing/selftests/prctl/.gitignore create mode 100644 tools/testing/selftests/prctl/Makefile create mode 100644 tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c create mode 100644 tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c create mode 100644 tools/testing/selftests/prctl/disable-tsc-test.c
Documentation/Makefile +1 -1
@@ -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
Documentation/prctl/.gitignore deleted +0 -3
@@ -1,3 +0,0 @@ -disable-tsc-ctxt-sw-stress-test -disable-tsc-on-off-stress-test -disable-tsc-test
Documentation/prctl/Makefile deleted +0 -10
@@ -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
Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c deleted +0 -97
97 lines not on this page · raw message
Documentation/prctl/disable-tsc-on-off-stress-test.c deleted +0 -96
96 lines not on this page · raw message
Documentation/prctl/disable-tsc-test.c deleted +0 -95
95 lines not on this page · raw message
tools/testing/selftests/prctl/.gitignore new file +3 -0
@@ -0,0 +1,3 @@ +disable-tsc-ctxt-sw-stress-test +disable-tsc-on-off-stress-test +disable-tsc-test
tools/testing/selftests/prctl/Makefile new file +15 -0
@@ -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
tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c new file +97 -0
97 lines not on this page · raw message
tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c new file +96 -0
96 lines not on this page · raw message
tools/testing/selftests/prctl/disable-tsc-test.c new file +95 -0
95 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 3/6 selftests: move ptp tests from Documentation/ptp
In reply to Shuah KhanRemove ptp from Makefile to move the test to selftests. Update ptp Makefile to work under selftests. ptp will not be run as part of selftests suite and will not be included in install targets. They can be built separately for now.
--- Documentation/Makefile | 2 +- Documentation/ptp/.gitignore | 1 - Documentation/ptp/Makefile | 8 - Documentation/ptp/testptp.c | 523 --------------------------------- Documentation/ptp/testptp.mk | 33 --- tools/testing/selftests/ptp/.gitignore | 1 + tools/testing/selftests/ptp/Makefile | 8 + tools/testing/selftests/ptp/testptp.c | 523 +++++++++++++++++++++++++++++++++ tools/testing/selftests/ptp/testptp.mk | 33 +++ 9 files changed, 566 insertions(+), 566 deletions(-) delete mode 100644 Documentation/ptp/.gitignore delete mode 100644 Documentation/ptp/Makefile delete mode 100644 Documentation/ptp/testptp.c delete mode 100644 Documentation/ptp/testptp.mk create mode 100644 tools/testing/selftests/ptp/.gitignore create mode 100644 tools/testing/selftests/ptp/Makefile create mode 100644 tools/testing/selftests/ptp/testptp.c create mode 100644 tools/testing/selftests/ptp/testptp.mk
Documentation/Makefile +1 -1
@@ -1,3 +1,3 @@ subdir-y := accounting auxdisplay blackfin \ ia64 laptops mic misc-devices \ - networking pcmcia ptp timers vDSO watchdog + networking pcmcia timers vDSO watchdog
Documentation/ptp/.gitignore deleted +0 -1
@@ -1 +0,0 @@ -testptp
Documentation/ptp/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -# List of programs to build -hostprogs-y := testptp - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_testptp.o += -I$(objtree)/usr/include -HOSTLOADLIBES_testptp := -lrt
Documentation/ptp/testptp.c deleted +0 -523
523 lines not on this page · raw message
Documentation/ptp/testptp.mk deleted +0 -33
@@ -1,33 +0,0 @@ -# PTP 1588 clock support - User space test program -# -# Copyright (C) 2010 OMICRON electronics GmbH -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -CC = $(CROSS_COMPILE)gcc -INC = -I$(KBUILD_OUTPUT)/usr/include -CFLAGS = -Wall $(INC) -LDLIBS = -lrt -PROGS = testptp - -all: $(PROGS) - -testptp: testptp.o - -clean: - rm -f testptp.o - -distclean: clean - rm -f $(PROGS)
tools/testing/selftests/ptp/.gitignore new file +1 -0
@@ -0,0 +1 @@ +testptp
tools/testing/selftests/ptp/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +TEST_PROGS := testptp +LDLIBS += -lrt +all: $(TEST_PROGS) + +include ../lib.mk + +clean: + rm -fr $(TEST_PROGS)
tools/testing/selftests/ptp/testptp.c new file +523 -0
523 lines not on this page · raw message
tools/testing/selftests/ptp/testptp.mk new file +33 -0
@@ -0,0 +1,33 @@ +# PTP 1588 clock support - User space test program +# +# Copyright (C) 2010 OMICRON electronics GmbH +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +CC = $(CROSS_COMPILE)gcc +INC = -I$(KBUILD_OUTPUT)/usr/include +CFLAGS = -Wall $(INC) +LDLIBS = -lrt +PROGS = testptp + +all: $(PROGS) + +testptp: testptp.o + +clean: + rm -f testptp.o + +distclean: clean + rm -f $(PROGS)
Signature · 1 line
2.7.4
Re: [PATCH v2 6/6] selftests: move watchdog tests from Documentation/watchdog
In reply to Shuah KhanQuoted 3 lines · Shuah Khan
Remove watchdog-test from
Makefileto move the test to selftests.Add
Makefileand .gitignore to for watchdog-test. watchdog-test will
to for?
Quoted 11 lines
not be run as part of selftests suite and will not be included in install targets. It can be built separately for now.
Signed-off-by Shuah Khan <[email protected]>--- Documentation/watchdog/src/.gitignore | 1 - Documentation/watchdog/src/Makefile | 2 +- Documentation/watchdog/src/watchdog-test.c | 105 ----------------------- tools/testing/selftests/watchdog/.gitignore | 1 + tools/testing/selftests/watchdog/Makefile | 8 ++ tools/testing/selftests/watchdog/watchdog-test.c | 105 +++++++++++++++++++++++
Please use -M when calling git-format-patch
Documentation/watchdog/src/.gitignore line 2
Quoted 13 lines
6 files changed, 115 insertions(+), 107 deletions(-)delete mode 100644
Documentation/watchdog/src/watchdog-test.ccreate mode 100644tools/testing/selftests/watchdog/.gitignorecreate mode 100644tools/testing/selftests/watchdog/Makefilecreate mode 100644tools/testing/selftests/watchdog/watchdog-test.cDocumentation/watchdog/src/.gitignore +0
-1@@ -1,2 +1 @@ watchdog-simple -watchdog-test
Why not also watchdog-simple?
Signature · 3 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2 6/6] selftests: move watchdog tests from Documentation/watchdog
Quoted 6 lines · Timur Tabi
Quoted 3 lines · Shuah Khan
Remove watchdog-test from
Makefileto move the test to selftests.Add
Makefileand .gitignore to for watchdog-test. watchdog-test willto for?
Thanks - will fix that.
Quoted 13 lines
Quoted 4 lines
not be run as part of selftests suite and will not be included in install targets. It can be built separately for now.
Quoted 8 lines
Signed-off-by Shuah Khan <[email protected]>--- Documentation/watchdog/src/.gitignore | 1 - Documentation/watchdog/src/Makefile | 2 +- Documentation/watchdog/src/watchdog-test.c | 105 ----------------------- tools/testing/selftests/watchdog/.gitignore | 1 + tools/testing/selftests/watchdog/Makefile | 8 ++ tools/testing/selftests/watchdog/watchdog-test.c | 105 +++++++++++++++++++++++
Quoted 1 line
Please use -M when calling git-format-patch
okay.
Quoted 7 lines
Quoted 7 lines
6 files changed, 115 insertions(+), 107 deletions(-)delete mode 100644
Documentation/watchdog/src/watchdog-test.ccreate mode 100644tools/testing/selftests/watchdog/.gitignorecreate mode 100644tools/testing/selftests/watchdog/Makefilecreate mode 100644tools/testing/selftests/watchdog/watchdog-test.c
Quoted 10 lines
Documentation/watchdog/src/.gitignore line 2
Quoted 7 lines
Documentation/watchdog/src/.gitignore +0
-1@@ -1,2 +1 @@ watchdog-simple -watchdog-testWhy not also watchdog-simple?
Is watchdog-simple a test or a sample/example? I thought this is an example, and planning to move that under examples?
If this is a test, I will re-do the patch to include it.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 6/6] selftests: move watchdog tests from Documentation/watchdog
Quoted 4 lines · Shuah Khan
Is watchdog-simple a test or a sample/example? I thought this is an example, and planning to move that under examples?
If this is a test, I will re-do the patch to include it.
I guess it's really just a sample.
Signature · 7 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · On Tue, 13 Sep 2016 14:18:39 -0600 Shuah Khan <[email protected]> wrote:
Move runnable code (tests) from Documentation to selftests and update Makefiles to work under selftests.
This all seems good to me.
jon