Re: [PATCH v3] genirq: Add kunit tests for depth counts
From: Brian Norris
Date: Mon May 19 2025 - 18:59:43 EST
On Sun, May 18, 2025 at 12:13:47AM +0800, kernel test robot wrote:
> config: arm64-randconfig-001-20250517 (https://download.01.org/0day-ci/archive/20250517/202505172307.yTjulMhx-lkp@xxxxxxxxx/config)
Ugh, that config manages to have this combination:
CONFIG_IRQ_KUNIT_TEST=y
CONFIG_KUNIT=m
I assumed that "IRQ_KUNIT_TEST depends on KUNIT" would rule out that
combination, but I see that's not true. I feel like I relearn Kconfig's
language every time I step outside the simplest of dependencies.
> >> ld.lld: error: undefined symbol: kunit_binary_ptr_assert_format
> >>> referenced by irq_test.c:54 (kernel/irq/irq_test.c:54)
> >>> kernel/irq/irq_test.o:(irq_disable_depth_test) in archive vmlinux.a
> >>> referenced by irq_test.c:54 (kernel/irq/irq_test.c:54)
> >>> kernel/irq/irq_test.o:(irq_disable_depth_test) in archive vmlinux.a
> >>> referenced by irq_test.c:81 (kernel/irq/irq_test.c:81)
> >>> kernel/irq/irq_test.o:(irq_free_disabled_test) in archive vmlinux.a
> >>> referenced 5 more times
> --
> >> ld.lld: error: undefined symbol: kunit_try_catch_throw
> >>> referenced by irq_test.c:0 (kernel/irq/irq_test.c:0)
> >>> kernel/irq/irq_test.o:(irq_cpuhotplug_test) in archive vmlinux.a
I guess I'll need to squash this in:
--- a/kernel/irq/Kconfig
+++ b/kernel/irq/Kconfig
@@ -146,7 +146,7 @@ config GENERIC_IRQ_KEXEC_CLEAR_VM_FORWARD
config IRQ_KUNIT_TEST
bool "KUnit tests for IRQ management APIs" if !KUNIT_ALL_TESTS
- depends on KUNIT
+ depends on KUNIT=y
default KUNIT_ALL_TESTS
imply SMP
help
I'll sit on it and send v4 eventually.
Brian