README.txt 945 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Linux Kernel Selftests
  2. The kernel contains a set of "self tests" under the tools/testing/selftests/
  3. directory. These are intended to be small unit tests to exercise individual
  4. code paths in the kernel.
  5. Running the selftests
  6. =====================
  7. To build the tests:
  8. $ make -C tools/testing/selftests
  9. To run the tests:
  10. $ make -C tools/testing/selftests run_tests
  11. - note that some tests will require root privileges.
  12. To run only tests targetted for a single subsystem:
  13. $ make -C tools/testing/selftests TARGETS=cpu-hotplug run_tests
  14. See the top-level tools/testing/selftests/Makefile for the list of all possible
  15. targets.
  16. Contributing new tests
  17. ======================
  18. In general, the rules for for selftests are
  19. * Do as much as you can if you're not root;
  20. * Don't take too long;
  21. * Don't break the build on any architecture, and
  22. * Don't cause the top-level "make run_tests" to fail if your feature is
  23. unconfigured.