kernel_optimize_test/tools/testing/selftests
Michael Ellerman 4c12df63f7 selftests/kcmp: Always try to build the test
Don't prevent the test building on non-x86. Just try and build it and
let the chips fall where they may.

Add support for CROSS_COMPILE while we're at it. Also we don't need a
custom rule for building kcmp_test.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2014-12-02 13:53:24 -07:00
..
breakpoints selftests/breakpoints: change test to use ksft framework 2014-11-17 10:39:08 -07:00
cpu-hotplug
efivarfs
firmware
ftrace tracing/kprobes: Add selftest scripts testing kprobe-tracer as startup test 2014-10-08 11:21:46 -04:00
ipc selftests/ipc: change test to use ksft framework 2014-11-17 10:39:15 -07:00
kcmp selftests/kcmp: Always try to build the test 2014-12-02 13:53:24 -07:00
memfd selftests/memfd: Run test on all architectures 2014-09-17 08:00:16 -06:00
memory-hotplug
mount
mqueue
net selftests/net: move test out of Makefile into a shell script 2014-11-05 08:12:40 -07:00
powerpc selftests/powerpc: Add test of load_unaligned_zero_pad() 2014-09-30 14:59:12 +10:00
ptrace
rcutorture locktorture: Support rwlocks 2014-09-30 00:10:00 -07:00
sysctl
timers selftests/timers: change test to use ksft framework 2014-11-17 10:39:30 -07:00
user selftests/user: move test out of Makefile into a shell script 2014-11-17 10:05:35 -07:00
vm selftests/vm/transhuge-stress: stress test for memory compaction 2014-10-09 22:26:01 -04:00
kselftest.h selftests: add kselftest framework for uniform test reporting 2014-11-17 10:38:56 -07:00
Makefile ftracetest: Initial commit for ftracetest 2014-09-23 09:31:05 -04:00
README.txt

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.

On some systems, hot-plug tests could hang forever waiting for cpu and
memory to be ready to be offlined. A special hot-plug target is created
to run full range of hot-plug tests. In default mode, hot-plug tests run
in safe mode with a limited scope. In limited mode, cpu-hotplug test is
run on a single cpu as opposed to all hotplug capable cpus, and memory
hotplug test is run on 2% of hotplug capable memory instead of 10%.

Running the selftests (hotplug tests are run in limited mode)
=============================================================

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 targeted for a single subsystem: (including
hotplug targets in limited mode)

  $  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.

Running the full range hotplug selftests
========================================

To build the tests:

  $ make -C tools/testing/selftests hotplug

To run the tests:

  $ make -C tools/testing/selftests run_hotplug

- note that some tests will require root privileges.

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.