2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/Documentation/dev-tools/kunit
Rae Moar d208025db6 Documentation: kunit: improve example on testing static functions
The documentation on testing static functions using the KUnit macros
VISIBLE_IF_KUNIT and EXPORT_SYMBOL_IF_KUNIT is lacking clarity and
missing key steps in the example. This has caused bugs and confusion
among developers.

Improve wording of description and add missing steps to the example.
This entails adding the "#include <kunit/visibility.h>" line and the
"MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING);" line. Both of which were
missing from the original example and key to exposing static functions.

Link: https://lore.kernel.org/r/20250516190631.1214081-1-rmoar@google.com
Signed-off-by: Rae Moar <rmoar@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-05-19 13:22:21 -06:00
..
api clk: Add test managed clk provider/consumer APIs 2024-07-29 15:33:12 -07:00
architecture.rst Documentation: kunit: Rename references to kunit_abort() 2023-06-06 08:57:37 -06:00
faq.rst Documentation: Kunit: Add ref for other kinds of tests 2022-09-30 13:19:11 -06:00
index.rst Documentation: kunit: Fix "How Do I Use This" / "Next Steps" sections 2022-12-12 14:13:48 -07:00
kunit_suitememorydiagram.svg Documentation: KUnit: Added KUnit Architecture 2021-12-23 12:49:06 -07:00
run_manual.rst Documentation: Add debugfs docs with run after boot 2023-12-18 13:28:08 -07:00
run_wrapper.rst kunit: tool: Implement listing of available architectures 2025-04-15 10:54:50 -06:00
running_tips.rst This pull request contains the following changes for UML: 2024-01-17 10:44:34 -08:00
start.rst Documentation: Kunit: add MODULE_LICENSE to sample code 2023-05-31 12:42:40 -06:00
style.rst Documentation: KUnit: Update filename best practices 2024-08-26 06:57:28 -06:00
usage.rst Documentation: kunit: improve example on testing static functions 2025-05-19 13:22:21 -06:00