Kconfig 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #
  2. # KUnit base configuration
  3. #
  4. menuconfig KUNIT
  5. tristate "KUnit - Enable support for unit tests"
  6. select GLOB
  7. help
  8. Enables support for kernel unit tests (KUnit), a lightweight unit
  9. testing and mocking framework for the Linux kernel. These tests are
  10. able to be run locally on a developer's workstation without a VM or
  11. special hardware when using UML. Can also be used on most other
  12. architectures. For more information, please see
  13. Documentation/dev-tools/kunit/.
  14. if KUNIT
  15. config KUNIT_DEBUGFS
  16. bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation" if !KUNIT_ALL_TESTS
  17. default KUNIT_ALL_TESTS
  18. help
  19. Enable debugfs representation for kunit. Currently this consists
  20. of /sys/kernel/debug/kunit/<test_suite>/results files for each
  21. test suite, which allow users to see results of the last test suite
  22. run that occurred.
  23. config KUNIT_FAULT_TEST
  24. bool "Enable KUnit tests which print BUG stacktraces"
  25. depends on KUNIT_TEST
  26. depends on !UML
  27. default y
  28. help
  29. Enables fault handling tests for the KUnit framework. These tests may
  30. trigger a kernel BUG(), and the associated stack trace, even when they
  31. pass. If this conflicts with your test infrastrcture (or is confusing
  32. or annoying), they can be disabled by setting this to N.
  33. config KUNIT_TEST
  34. tristate "KUnit test for KUnit" if !KUNIT_ALL_TESTS
  35. default KUNIT_ALL_TESTS
  36. help
  37. Enables the unit tests for the KUnit test framework. These tests test
  38. the KUnit test framework itself; the tests are both written using
  39. KUnit and test KUnit. This option should only be enabled for testing
  40. purposes by developers interested in testing that KUnit works as
  41. expected.
  42. config KUNIT_EXAMPLE_TEST
  43. tristate "Example test for KUnit" if !KUNIT_ALL_TESTS
  44. default KUNIT_ALL_TESTS
  45. help
  46. Enables an example unit test that illustrates some of the basic
  47. features of KUnit. This test only exists to help new users understand
  48. what KUnit is and how it is used. Please refer to the example test
  49. itself, lib/kunit/example-test.c, for more information. This option
  50. is intended for curious hackers who would like to understand how to
  51. use KUnit for kernel development.
  52. config KUNIT_ALL_TESTS
  53. tristate "All KUnit tests with satisfied dependencies"
  54. help
  55. Enables all KUnit tests, if they can be enabled.
  56. KUnit tests run during boot and output the results to the debug log
  57. in TAP format (http://testanything.org/). Only useful for kernel devs
  58. running the KUnit test harness, and not intended for inclusion into a
  59. production build.
  60. For more information on KUnit and unit tests in general please refer
  61. to the KUnit documentation in Documentation/dev-tools/kunit/.
  62. If unsure, say N.
  63. config KUNIT_DEFAULT_ENABLED
  64. bool "Default value of kunit.enable"
  65. default y
  66. help
  67. Sets the default value of kunit.enable. If set to N then KUnit
  68. tests will not execute unless kunit.enable=1 is passed to the
  69. kernel command line.
  70. In most cases this should be left as Y. Only if additional opt-in
  71. behavior is needed should this be set to N.
  72. endif # KUNIT