linux/tools/testing/selftests
Linus Torvalds d6dd50e07c Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RCU updates from Ingo Molnar:
 "The main changes in this cycle were:

   - changes related to No-CBs CPUs and NO_HZ_FULL

   - RCU-tasks implementation

   - torture-test updates

   - miscellaneous fixes

   - locktorture updates

   - RCU documentation updates"

* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (81 commits)
  workqueue: Use cond_resched_rcu_qs macro
  workqueue: Add quiescent state between work items
  locktorture: Cleanup header usage
  locktorture: Cannot hold read and write lock
  locktorture: Fix __acquire annotation for spinlock irq
  locktorture: Support rwlocks
  rcu: Eliminate deadlock between CPU hotplug and expedited grace periods
  locktorture: Document boot/module parameters
  rcutorture: Rename rcutorture_runnable parameter
  locktorture: Add test scenario for rwsem_lock
  locktorture: Add test scenario for mutex_lock
  locktorture: Make torture scripting account for new _runnable name
  locktorture: Introduce torture context
  locktorture: Support rwsems
  locktorture: Add infrastructure for torturing read locks
  torture: Address race in module cleanup
  locktorture: Make statistics generic
  locktorture: Teach about lock debugging
  locktorture: Support mutexes
  locktorture: Add documentation
  ...
2014-10-13 15:44:12 +02:00
..
breakpoints
cpu-hotplug tools: selftests - create a separate hotplug target for full range test 2014-07-11 18:13:06 -07:00
efivarfs
firmware test: add firmware_class loader test 2014-07-17 18:44:19 -07:00
ftrace tracing/kprobes: Add selftest scripts testing kprobe-tracer as startup test 2014-10-08 11:21:46 -04:00
ipc tools: selftests: fix build issue with make kselftests target 2014-08-29 16:28:17 -07:00
kcmp tools: selftests: fix build issue with make kselftests target 2014-08-29 16:28:17 -07:00
memfd selftests/memfd: Run test on all architectures 2014-09-17 08:00:16 -06:00
memory-hotplug tools: selftests - create a separate hotplug target for full range test 2014-07-11 18:13:06 -07:00
mount mnt: Add tests for unprivileged remount cases that have found to be faulty 2014-07-31 17:13:15 -07:00
mqueue tools: Fix mqueue Makefile compile linking order 2014-07-11 18:11:18 -07:00
net net: filter: BPF testsuite 2014-05-12 00:23:55 -04:00
powerpc selftests/powerpc: Add test of load_unaligned_zero_pad() 2014-09-30 14:59:12 +10:00
ptrace tools/testing/selftests/ptrace/peeksiginfo.c: add PAGE_SIZE definition 2014-08-08 15:57:25 -07:00
rcutorture locktorture: Support rwlocks 2014-09-30 00:10:00 -07:00
sysctl tools/testing/selftests/sysctl: validate sysctl_writes_strict 2014-06-06 16:08:13 -07:00
timers
user test: check copy_to/from_user boundary validation 2014-01-23 16:36:57 -08:00
vm selftests/vm/transhuge-stress: stress test for memory compaction 2014-10-09 22:26:01 -04:00
Makefile ftracetest: Initial commit for ftracetest 2014-09-23 09:31:05 -04:00
README.txt tools: selftests - create a separate hotplug target for full range test 2014-07-11 18:13:06 -07: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.