From: Corey Minyard <corey@minyard.net>
To: Jian Zhang <zhangjian.3032@bytedance.com>
Cc: openipmi-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] ipmi: ssif_bmc: Fix KUnit test link failure when KUNIT=m
Date: Tue, 7 Apr 2026 07:34:19 -0500 [thread overview]
Message-ID: <adT5y6VoZfavg4Jg@mail.minyard.net> (raw)
In-Reply-To: <20260407094647.356661-1-zhangjian.3032@bytedance.com>
On Tue, Apr 07, 2026 at 05:46:47PM +0800, Jian Zhang wrote:
> Building with CONFIG_KUNIT=m and CONFIG_SSIF_IPMI_BMC_KUNIT_TEST=y
> results in link errors such as:
>
> undefined reference to `kunit_binary_assert_format'
> undefined reference to `__kunit_do_failed_assertion'
>
> This happens because the test code is built-in while the KUnit core
> is built as a module, so the required KUnit symbols are not available
> at link time.
>
> Fix this by requiring KUNIT to be built-in when enabling
> SSIF_IPMI_BMC_KUNIT_TEST.
Got it, thanks.
-corey
>
> Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202604071448.zUBjPYPu-lkp@intel.com/
> ---
> drivers/char/ipmi/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig
> index 72559f6050eb..669f76000197 100644
> --- a/drivers/char/ipmi/Kconfig
> +++ b/drivers/char/ipmi/Kconfig
> @@ -189,7 +189,7 @@ config SSIF_IPMI_BMC
>
> config SSIF_IPMI_BMC_KUNIT_TEST
> bool "KUnit tests for SSIF IPMI BMC driver" if !KUNIT_ALL_TESTS
> - depends on KUNIT
> + depends on KUNIT=y
> depends on SSIF_IPMI_BMC
> default KUNIT_ALL_TESTS
> help
> --
> 2.20.1
prev parent reply other threads:[~2026-04-07 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 9:46 Jian Zhang
2026-04-07 12:34 ` Corey Minyard [this message]
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=adT5y6VoZfavg4Jg@mail.minyard.net \
--to=corey@minyard.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=zhangjian.3032@bytedance.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
all inboxes | Powered by JetHome®