From: Alessandro Carminati <[email protected]> Add KUnit visibility helpers for static inline functions so they can be referenced by test code when KUnit is enabled.
This change does not alter behavior or expose new functionality at runtime; it only provides a mechanism to override visibility for testing purposes. Signed-off-by: Alessandro Carminati <[email protected]> --- include/kunit/visibility.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/kunit/visibility.h b/include/kunit/visibility.h index 7c34c8ffcf3b..82ab7fffc943 100644 --- a/include/kunit/visibility.h +++ b/include/kunit/visibility.h @@ -17,6 +17,7 @@ * there is no change to the symbol definition. */ #define VISIBLE_IF_KUNIT + #define INLINE_VISIBLE_IF_KUNIT /** * EXPORT_SYMBOL_IF_KUNIT(symbol) - Exports symbol into * EXPORTED_FOR_KUNIT_TESTING namespace only if CONFIG_KUNIT is @@ -27,6 +28,7 @@ #define EXPORT_SYMBOL_IF_KUNIT(symbol) EXPORT_SYMBOL_NS(symbol, "EXPORTED_FOR_KUNIT_TESTING") #else #define VISIBLE_IF_KUNIT static + #define INLINE_VISIBLE_IF_KUNIT static inline #define EXPORT_SYMBOL_IF_KUNIT(symbol) #endif -- 2.48.1
