Comment 2 for bug 1867596

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

With the patch above reverted, the test build is still failing:

$ sudo make run_tests TARGETS=bpf
make --no-builtin-rules ARCH=x86 -C ../../.. headers_install
make[1]: Entering directory '/home/ubuntu/ubuntu-eoan'
  INSTALL ./usr/include
make[1]: Leaving directory '/home/ubuntu/ubuntu-eoan'
make[1]: Entering directory '/home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf'
/bin/sh: 1: llvm-readelf: not found
make -C ../../../lib/bpf OUTPUT=/home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/
make[2]: Entering directory '/home/ubuntu/ubuntu-eoan/tools/lib/bpf'
Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
make[2]: Leaving directory '/home/ubuntu/ubuntu-eoan/tools/lib/bpf'
gcc -g -Wall -O2 -I../../../include/uapi -I../../../lib -I../../../lib/bpf -I../../../../include/generated -I../../../include -Dbpf_prog_load=bpf_prog_test_load -Dbpf_load_program=bpf_test_load_program -I. -I/home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf test_progs.c /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_stub.o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf.a trace_helpers.c prog_tests/attach_probe.c prog_tests/stacktrace_map.c prog_tests/raw_tp_writable_test_run.c prog_tests/xdp_adjust_tail.c prog_tests/bpf_verif_scale.c prog_tests/signal_pending.c prog_tests/send_signal.c prog_tests/stacktrace_build_id.c prog_tests/reference_tracking.c prog_tests/get_stack_raw_tp.c prog_tests/prog_run_xattr.c prog_tests/task_fd_query_tp.c prog_tests/tp_attach_query.c prog_tests/spinlock.c prog_tests/pkt_md_access.c prog_tests/stacktrace_build_id_nmi.c prog_tests/bpf_obj_id.c prog_tests/queue_stack_map.c prog_tests/stacktrace_map_raw_tp.c prog_tests/task_fd_query_rawtp.c prog_tests/xdp.c prog_tests/skb_ctx.c prog_tests/tcp_estats.c prog_tests/perf_buffer.c prog_tests/raw_tp_writable_reject_nbd_invalid.c prog_tests/flow_dissector.c prog_tests/l4lb_all.c prog_tests/flow_dissector_load_bytes.c prog_tests/obj_name.c prog_tests/map_lock.c prog_tests/xdp_noinline.c prog_tests/pkt_access.c -lcap -lelf -lrt -lpthread -o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_progs
prog_tests/send_signal.c: In function ‘test_send_signal_common’:
prog_tests/send_signal.c:52:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   write(pipe_c2p[1], buf, 1);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:55:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
   read(pipe_p2c[0], buf, 1);
   ^~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:61:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
    write(pipe_c2p[1], "2", 1);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:63:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
    write(pipe_c2p[1], "0", 1);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:66:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
   read(pipe_p2c[0], buf, 1);
   ^~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:109:2: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  read(pipe_c2p[0], buf, 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:117:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  write(pipe_p2c[1], buf, 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/send_signal.c:131:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  write(pipe_p2c[1], buf, 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/stacktrace_build_id_nmi.c: In function ‘read_perf_max_sample_freq’:
prog_tests/stacktrace_build_id_nmi.c:12:2: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
  fscanf(f, "%llu", &sample_freq);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog_tests/perf_buffer.c: In function ‘test_perf_buffer’:
prog_tests/perf_buffer.c:39:8: warning: implicit declaration of function ‘parse_cpu_mask_file’ [-Wimplicit-function-declaration]
  err = parse_cpu_mask_file("/sys/devices/system/cpu/online",
        ^~~~~~~~~~~~~~~~~~~
/tmp/ccwEVJNq.o: In function `test_perf_buffer':
/home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/prog_tests/perf_buffer.c:39: undefined reference to `parse_cpu_mask_file'
collect2: error: ld returned 1 exit status
../lib.mk:138: recipe for target '/home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_progs' failed
make[1]: *** [/home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_progs] Error 1
make[1]: Leaving directory '/home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf'
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2

Which is 376912826c5 (selftests/bpf: Skip perf hw events test if the setup disabled it)