Commit 5fada160 authored by Vivian Wang's avatar Vivian Wang Committed by Paul Walmsley
Browse files

riscv: tests: Make RISCV_KPROBES_KUNIT tristate



This disallows KUNIT=m and RISCV_KPROBES_KUNIT=y, which produces these
relocs_check.sh warnings when RELOCATABLE=y:

    WARNING: 3 bad relocations
    ffffffff81e24118 R_RISCV_64        kunit_unary_assert_format
    ffffffff81e24a60 R_RISCV_64        kunit_binary_assert_format
    ffffffff81e269d0 R_RISCV_JUMP_SLOT  __kunit_do_failed_assertion

This fixes allmodconfig build.

Reported-by: default avatarInochi Amaoto <inochiama@gmail.com>
Fixes: f2fab612 ("riscv: Add kprobes KUnit test")
Signed-off-by: default avatarVivian Wang <wangruikang@iscas.ac.cn>
Tested-by: default avatarInochi Amaoto <inochiama@gmail.com>
Reviewed-by: default avatarNam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/r/20251020-riscv-kunit-kconfig-fix-6-18-v1-2-d773b5d5ce48@iscas.ac.cn


Signed-off-by: default avatarPaul Walmsley <pjw@kernel.org>
parent 21766032
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ config RISCV_MODULE_LINKING_KUNIT
         If unsure, say N.

config RISCV_KPROBES_KUNIT
       bool "KUnit test for riscv kprobes" if !KUNIT_ALL_TESTS
       tristate "KUnit test for riscv kprobes" if !KUNIT_ALL_TESTS
       depends on KUNIT
       depends on KPROBES
       default KUNIT_ALL_TESTS
+3 −1
Original line number Diff line number Diff line
obj-y += test-kprobes.o test-kprobes-asm.o
obj-$(CONFIG_RISCV_KPROBES_KUNIT) += kprobes_riscv_kunit.o

kprobes_riscv_kunit-objs := test-kprobes.o test-kprobes-asm.o
+3 −0
Original line number Diff line number Diff line
@@ -54,3 +54,6 @@ static struct kunit_suite kprobes_test_suite = {
};

kunit_test_suites(&kprobes_test_suite);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("KUnit test for riscv kprobes");