* [linux-stable-rc:linux-5.12.y 1058/2494] tools/testing/selftests/bpf/prog_tests/core_reloc.c:918: undefined reference to `ASSERT_FALSE'
@ 2021-06-26 16:10 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-26 16:10 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5019 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.12.y
head: 6645d6f022e751498713e7c669a7f3c434d2c652
commit: e738b042761ae9c08b7f9a2138917eba86461b15 [1058/2494] selftests/bpf: Fix core_reloc test runner
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=e738b042761ae9c08b7f9a2138917eba86461b15
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.12.y
git checkout e738b042761ae9c08b7f9a2138917eba86461b15
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
/usr/bin/ld: /no_alu32/core_reloc.test.o: in function `test_core_reloc':
>> tools/testing/selftests/bpf/prog_tests/core_reloc.c:918: undefined reference to `ASSERT_FALSE'
collect2: error: ld returned 1 exit status
vim +918 tools/testing/selftests/bpf/prog_tests/core_reloc.c
815
816 void test_core_reloc(void)
817 {
818 const size_t mmap_sz = roundup_page(sizeof(struct data));
819 struct bpf_object_load_attr load_attr = {};
820 struct core_reloc_test_case *test_case;
821 const char *tp_name, *probe_name;
822 int err, i, equal;
823 struct bpf_link *link = NULL;
824 struct bpf_map *data_map;
825 struct bpf_program *prog;
826 struct bpf_object *obj;
827 uint64_t my_pid_tgid;
828 struct data *data;
829 void *mmap_data = NULL;
830
831 my_pid_tgid = getpid() | ((uint64_t)syscall(SYS_gettid) << 32);
832
833 for (i = 0; i < ARRAY_SIZE(test_cases); i++) {
834 test_case = &test_cases[i];
835 if (!test__start_subtest(test_case->case_name))
836 continue;
837
838 if (test_case->needs_testmod && !env.has_testmod) {
839 test__skip();
840 continue;
841 }
842
843 if (test_case->setup) {
844 err = test_case->setup(test_case);
845 if (CHECK(err, "test_setup", "test #%d setup failed: %d\n", i, err))
846 continue;
847 }
848
849 obj = bpf_object__open_file(test_case->bpf_obj_file, NULL);
850 if (CHECK(IS_ERR(obj), "obj_open", "failed to open '%s': %ld\n",
851 test_case->bpf_obj_file, PTR_ERR(obj)))
852 continue;
853
854 probe_name = "raw_tracepoint/sys_enter";
855 tp_name = "sys_enter";
856 if (test_case->prog_sec_name) {
857 probe_name = test_case->prog_sec_name;
858 tp_name = test_case->raw_tp_name; /* NULL for tp_btf */
859 }
860
861 prog = bpf_object__find_program_by_title(obj, probe_name);
862 if (CHECK(!prog, "find_probe",
863 "prog '%s' not found\n", probe_name))
864 goto cleanup;
865
866
867 if (test_case->btf_src_file) {
868 err = access(test_case->btf_src_file, R_OK);
869 if (!ASSERT_OK(err, "btf_src_file"))
870 goto cleanup;
871 }
872
873 load_attr.obj = obj;
874 load_attr.log_level = 0;
875 load_attr.target_btf_path = test_case->btf_src_file;
876 err = bpf_object__load_xattr(&load_attr);
877 if (err) {
878 if (!test_case->fails)
879 ASSERT_OK(err, "obj_load");
880 goto cleanup;
881 }
882
883 data_map = bpf_object__find_map_by_name(obj, "test_cor.bss");
884 if (CHECK(!data_map, "find_data_map", "data map not found\n"))
885 goto cleanup;
886
887 mmap_data = mmap(NULL, mmap_sz, PROT_READ | PROT_WRITE,
888 MAP_SHARED, bpf_map__fd(data_map), 0);
889 if (CHECK(mmap_data == MAP_FAILED, "mmap",
890 ".bss mmap failed: %d", errno)) {
891 mmap_data = NULL;
892 goto cleanup;
893 }
894 data = mmap_data;
895
896 memset(mmap_data, 0, sizeof(*data));
897 memcpy(data->in, test_case->input, test_case->input_len);
898 data->my_pid_tgid = my_pid_tgid;
899
900 link = bpf_program__attach_raw_tracepoint(prog, tp_name);
901 if (CHECK(IS_ERR(link), "attach_raw_tp", "err %ld\n",
902 PTR_ERR(link)))
903 goto cleanup;
904
905 /* trigger test run */
906 if (test_case->trigger) {
907 if (!ASSERT_OK(test_case->trigger(test_case), "test_trigger"))
908 goto cleanup;
909 } else {
910 usleep(1);
911 }
912
913 if (data->skip) {
914 test__skip();
915 goto cleanup;
916 }
917
> 918 if (!ASSERT_FALSE(test_case->fails, "obj_load_should_fail"))
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 41634 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-26 16:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-26 16:10 [linux-stable-rc:linux-5.12.y 1058/2494] tools/testing/selftests/bpf/prog_tests/core_reloc.c:918: undefined reference to `ASSERT_FALSE' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.