Documentation: kunit: Add naming guidelines
Subsystems (4)
PATCH v3 1/1 Documentation: kunit: Add naming guidelines
As discussed in [1], KUnit tests have hitherto not had a particularly consistent naming scheme. This adds documentation outlining how tests and test suites should be named, including how those names should be used in Kconfig entries and filenames.
[1]:
https://lore.kernel.org/linux-kselftest/202006141005.BA19A9D3@keescook/t/#u
---
This is v3 of the KUnit test naming guidelines. It's basically just v2 with some spelling fixes (thanks Marco).
Changelog:
v3:
- Fix a few typos.
- Add Marco and Tim's Reviewed-bys.
v2:
https://lore.kernel.org/linux-kselftest/[email protected]/
- Rewrote the filename section to use "_test" as a suffix, and focus on module names, not filenames.
- Add a motivating introduction, which also calls out existing tests and tests which cause problems when run automatically (long running, flaky tests) as reasons to avoid the guidelines.
- Talk about including the type of test in the suite name, but only if theres an actual confict. (And update the example for this).
v1:
https://lore.kernel.org/linux-kselftest/[email protected]/
- Fixed a bit of space/tab confusion in the index (Thanks, Randy)
- Added some more examples (and some test case examples).
- Added some examples of what not to call subsystems and suites.
- No longer explicitly require "If unsure, put N" in Kconfig entries.
- Minor formatting changes
RFC:
https://lore.kernel.org/linux-kselftest/[email protected]/T/#u
- Initial version
Documentation/dev-tools/kunit/index.rst | 1 + Documentation/dev-tools/kunit/style.rst | 207 ++++++++++++++++++++++++ 2 files changed, 208 insertions(+) create mode 100644 Documentation/dev-tools/kunit/style.rst
Documentation/dev-tools/kunit/index.rst +1 -0
@@ -11,6 +11,7 @@ KUnit - Unit Testing for the Linux Kernel usage kunit-tool api/index + style faq What is KUnit?
Documentation/dev-tools/kunit/style.rst new file +207 -0
207 lines not on this page · raw message
Signature · 1 line
2.28.0.526.ge36021eeef-goog