drm/vc4: allow DRM_VC4_KUNIT_TEST to be a loadable module
Subsystems (3)
PATCH 1/1 drm/vc4: allow DRM_VC4_KUNIT_TEST to be a loadable module
From: Arnd Bergmann <[email protected]>
In configurations with CONFIG_KUNIT=m, builting the unit test into the kernel causes a link failure:
arm-linux-gnueabi-ld: drivers/gpu/drm/vc4/tests/vc4_mock.o: in function `__build_mock':
vc4_mock.c:(.text+0x6e): undefined reference to `kunit_do_failed_assertion'
arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x9c): undefined reference to `kunit_do_failed_assertion'
arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x100): undefined reference to `kunit_ptr_not_err_assert_format'
...
Allow this to be a loadable module as well to have Kconfig sort out the dependencies correctly.
--- drivers/gpu/drm/vc4/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/Kconfig +1 -1
@@ -36,7 +36,7 @@ config DRM_VC4_HDMI_CEC and want to use CEC. config DRM_VC4_KUNIT_TEST - bool "KUnit tests for VC4" if !KUNIT_ALL_TESTS + tristate "KUnit tests for VC4" if !KUNIT_ALL_TESTS depends on DRM_VC4 && KUNIT select DRM_KUNIT_TEST_HELPERS default KUNIT_ALL_TESTS
Signature · 1 line
2.39.0
Maxime Ripard
AppliedQuoted 10 lines · Arnd Bergmann
In configurations with
CONFIG_KUNIT=m, builting the unit test into the kernel causes a link failure:arm-linux-gnueabi-ld:
drivers/gpu/drm/vc4/tests/vc4_mock.o: in function `__build_mock':
vc4_mock.c:(.text+0x6e): undefined reference to `kunit_do_failed_assertion'
arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x9c): undefined reference to `kunit_do_failed_assertion'
arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x100): undefined reference to `kunit_ptr_not_err_assert_format'
...[...]
Applied to drm/drm-misc (drm-misc-next-fixes).
Thanks!
Maxime