From e9c0337f3f475a78ec23b8ef980ebd7d057b59a9 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Wed, 27 Feb 2013 17:05:57 -0800 Subject: [PATCH] --- yaml --- r: 359422 b: refs/heads/master c: 80d03428597056f4e2d1aed389929ece7879dad1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/testing/selftests/README.txt | 42 ++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 trunk/tools/testing/selftests/README.txt diff --git a/[refs] b/[refs] index 74e403b024de..3e541502058c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 66a01b9659016cbb74dfac64861f28c71c804c97 +refs/heads/master: 80d03428597056f4e2d1aed389929ece7879dad1 diff --git a/trunk/tools/testing/selftests/README.txt b/trunk/tools/testing/selftests/README.txt new file mode 100644 index 000000000000..5e2faf9c55d3 --- /dev/null +++ b/trunk/tools/testing/selftests/README.txt @@ -0,0 +1,42 @@ +Linux Kernel Selftests + +The kernel contains a set of "self tests" under the tools/testing/selftests/ +directory. These are intended to be small unit tests to exercise individual +code paths in the kernel. + +Running the selftests +===================== + +To build the tests: + + $ make -C tools/testing/selftests + + +To run the tests: + + $ make -C tools/testing/selftests run_tests + +- note that some tests will require root privileges. + + +To run only tests targetted for a single subsystem: + + $ make -C tools/testing/selftests TARGETS=cpu-hotplug run_tests + +See the top-level tools/testing/selftests/Makefile for the list of all possible +targets. + + +Contributing new tests +====================== + +In general, the rules for for selftests are + + * Do as much as you can if you're not root; + + * Don't take too long; + + * Don't break the build on any architecture, and + + * Don't cause the top-level "make run_tests" to fail if your feature is + unconfigured.