Issue found on Eoan with tip b864ec039 (UBUNTU: Ubuntu-5.3.0-43.35)
Caused by 3769128 (selftests/bpf: Skip perf hw events test if the setup disabled it)
$ sudo make run_tests TARGETS=bpf
make --no-builtin-rules ARCH=x86 -C ../../.. headers_install
make[1]: Entering directory '/home/ubuntu/ubuntu-eoan'
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
HDRINST usr/include/linux/btf.h
HDRINST usr/include/linux/input.h
HDRINST usr/include/linux/netfilter/xt_sctp.h
REMOVE usr/include/rdma/nes-abi.h
HDRINST usr/include/asm/unistd_32.h
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'
CC /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf.o
CC /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/bpf.o
CC /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/btf.o
CC /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/bpf_prog_linfo.o
LD /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf-in.o
LINK /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf.a
LINK /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf.so.0.0.4
LINK /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_libbpf
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 -Iverifier test_verifier.c /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_stub.o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf.a -lcap -lelf -lrt -lpthread -o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_verifier
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 test_tag.c /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_stub.o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf.a -lcap -lelf -lrt -lpthread -o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_tag
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_maps.c /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_stub.o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf.a map_tests/sk_storage_map.c -lcap -lelf -lrt -lpthread -o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_maps
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 test_lru_map.c /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_stub.o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf.a -lcap -lelf -lrt -lpthread -o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_lru_map
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 test_lpm_map.c /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_stub.o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/libbpf.a -lcap -lelf -lrt -lpthread -o /home/ubuntu/ubuntu-eoan/tools/testing/selftests/bpf/test_lpm_map
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 ‘test_stacktrace_build_id_nmi’:
prog_tests/stacktrace_build_id_nmi.c:54:3: warning: implicit declaration of function ‘test__skip’ [-Wimplicit-function-declaration]
test__skip();
^~~~~~~~~~
prog_tests/stacktrace_build_id_nmi.c:55:3: error: label ‘cleanup’ used but not defined
goto cleanup;
^~~~
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",
^~~~~~~~~~~~~~~~~~~
../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
We added a goto cleanup, but the cleanup is missing. Probably we need dde53c1b7 (selftests/bpf: Convert few more selftest to skeletons)
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1867596
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.