kunit: Export kunit_running()
authorArnd Bergmann <arnd@arndb.de>
Tue, 17 Jan 2023 16:50:26 +0000 (17:50 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 20 Jan 2023 17:03:04 +0000 (10:03 -0700)
Using kunit_fail_current_test() in a loadable module causes a link
error like:

ERROR: modpost: "kunit_running" [drivers/gpu/drm/vc4/vc4.ko] undefined!

Export the symbol to allow using it from modules.

Fixes: da43ff045c3f ("drm/vc4: tests: Fail the current test if we access a register")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/test.c

index c9ebf975e56b65d0fdf3a7c8ed4e75ceafc1619a..890ba5b3a9819ddcf4ac9f4e7c85a95e978e89e9 100644 (file)
@@ -21,6 +21,7 @@
 #include "try-catch-impl.h"
 
 DEFINE_STATIC_KEY_FALSE(kunit_running);
+EXPORT_SYMBOL_GPL(kunit_running);
 
 #if IS_BUILTIN(CONFIG_KUNIT)
 /*