mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kunit: Export kunit_running()
@ 2023-01-17 16:50 Arnd Bergmann
  2023-01-18  0:37 ` David Gow
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2023-01-17 16:50 UTC (permalink / raw)
  To: Brendan Higgins, David Gow
  Cc: Arnd Bergmann, Shuah Khan, Daniel Latypov, Jeremy Kerr,
	Joe Fradley, Maxime Ripard, Javier Martinez Canillas,
	Maíra Canal, linux-kselftest, kunit-dev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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>
---
 lib/kunit/test.c | 1 +
 1 file changed, 1 insertion(+)

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)
 /*
-- 
2.39.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-20  6:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-17 16:50 [PATCH] kunit: Export kunit_running() Arnd Bergmann
2023-01-18  0:37 ` David Gow
2023-01-18 11:02   ` Maxime Ripard
2023-01-20  6:13     ` David Gow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®