mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/riscv/kernel/tests/kprobes/test-kprobes.c:42:undefined reference to `kunit_binary_assert_format'
@ 2025-10-27  7:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-10-27  7:58 UTC (permalink / raw)
  To: Nam Cao; +Cc: oe-kbuild-all, linux-kernel, Paul Walmsley

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@intel.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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-27  7:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-27  7:58 arch/riscv/kernel/tests/kprobes/test-kprobes.c:42:undefined reference to `kunit_binary_assert_format' kernel test robot

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®