From: Arnd Bergmann <arnd@kernel.org>
To: Emma Anholt <emma@anholt.net>, Maxime Ripard <mripard@kernel.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Javier Martinez Canillas" <javierm@redhat.com>,
"Zheng Bin" <zhengbin13@huawei.com>,
"Danilo Krummrich" <dakr@redhat.com>,
"Maíra Canal" <mcanal@igalia.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm/vc4: allow DRM_VC4_KUNIT_TEST to be a loadable module
Date: Thu, 2 Feb 2023 11:23:32 +0100 [thread overview]
Message-ID: <20230202102346.868771-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
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.
Fixes: f759f5b53f1c ("drm/vc4: tests: Introduce a mocking infrastructure")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/vc4/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig
index f423941c028d..91dcf8d174d6 100644
--- a/drivers/gpu/drm/vc4/Kconfig
+++ b/drivers/gpu/drm/vc4/Kconfig
@@ -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
--
2.39.0
next reply other threads:[~2023-02-02 10:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 10:23 Arnd Bergmann [this message]
2023-02-02 12:38 ` [PATCH] drm/vc4: allow DRM_VC4_KUNIT_TEST to be a loadable module Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230202102346.868771-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=airlied@gmail.com \
--cc=arnd@arndb.de \
--cc=dakr@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emma@anholt.net \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcanal@igalia.com \
--cc=mripard@kernel.org \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
--cc=zhengbin13@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox