[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202510271638.Gc22TPof-lkp@intel.com>
Date: Mon, 27 Oct 2025 15:58:36 +0800
From: kernel test robot <lkp@...el.com>
To: Nam Cao <namcao@...utronix.de>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Paul Walmsley <pjw@...nel.org>
Subject: arch/riscv/kernel/tests/kprobes/test-kprobes.c:42:undefined
reference to `kunit_binary_assert_format'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa
commit: f2fab612824ffc8314d3a752724dd37a3ce27a31 riscv: Add kprobes KUnit test
date: 6 weeks ago
config: riscv-randconfig-r051-20251027 (https://download.01.org/0day-ci/archive/20251027/202510271638.Gc22TPof-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251027/202510271638.Gc22TPof-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510271638.Gc22TPof-lkp@intel.com/
All errors (new ones prefixed by >>):
riscv64-linux-ld: arch/riscv/kernel/tests/kprobes/test-kprobes.o: in function `test_kprobe_riscv':
>> arch/riscv/kernel/tests/kprobes/test-kprobes.c:42:(.text+0x198): undefined reference to `kunit_binary_assert_format'
>> riscv64-linux-ld: arch/riscv/kernel/tests/kprobes/test-kprobes.c:44:(.text+0x1bc): undefined reference to `__kunit_do_failed_assertion'
>> riscv64-linux-ld: arch/riscv/kernel/tests/kprobes/test-kprobes.c:38:(.text+0x1d0): undefined reference to `kunit_binary_assert_format'
riscv64-linux-ld: arch/riscv/kernel/tests/kprobes/test-kprobes.c:38:(.text+0x1f4): undefined reference to `__kunit_do_failed_assertion'
>> riscv64-linux-ld: arch/riscv/kernel/tests/kprobes/test-kprobes.c:31:(.text+0x246): undefined reference to `kunit_unary_assert_format'
riscv64-linux-ld: arch/riscv/kernel/tests/kprobes/test-kprobes.c:24:(.text+0x262): undefined reference to `__kunit_do_failed_assertion'
vim +42 arch/riscv/kernel/tests/kprobes/test-kprobes.c
12
13 static void test_kprobe_riscv(struct kunit *test)
14 {
15 unsigned int num_kprobe = 0;
16 long (*func)(void);
17 struct kprobe *kp;
18 int i;
19
20 while (test_kprobes_addresses[num_kprobe])
21 num_kprobe++;
22
23 kp = kcalloc(num_kprobe, sizeof(*kp), GFP_KERNEL);
24 KUNIT_EXPECT_TRUE(test, kp);
25 if (!kp)
26 return;
27
28 for (i = 0; i < num_kprobe; ++i) {
29 kp[i].addr = test_kprobes_addresses[i];
30 kp[i].pre_handler = kprobe_dummy_handler;
> 31 KUNIT_EXPECT_EQ(test, 0, register_kprobe(&kp[i]));
32 }
33
34 for (i = 0;; ++i) {
35 func = test_kprobes_functions[i];
36 if (!func)
37 break;
> 38 KUNIT_EXPECT_EQ_MSG(test, KPROBE_TEST_MAGIC, func(), "function %d broken", i);
39 }
40
41 for (i = 0; i < num_kprobe; ++i)
> 42 unregister_kprobe(&kp[i]);
43 kfree(kp);
> 44 }
45
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists