From: Arnd Bergmann Date: Tue, 17 Jan 2023 16:50:26 +0000 (+0100) Subject: kunit: Export kunit_running() X-Git-Tag: v6.2-rc7~21^2~2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=db105c37a4d69d684c1edf2915557463d0ba172c;p=linux-2.6-block.git kunit: Export kunit_running() 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 Reviewed-by: David Gow Signed-off-by: Shuah Khan --- diff --git a/lib/kunit/test.c b/lib/kunit/test.c index c9ebf975e56b..890ba5b3a981 100644 --- a/lib/kunit/test.c +++ b/lib/kunit/test.c @@ -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) /*