Tested with different clang / llvm available on Focal: clang-10 and llvm-10, test build will fail with: CLNG-BPF [test_maps] pyperf600.o CLNG-BPF [test_maps] profiler2.o CLNG-BPF [test_maps] test_pe_preserve_elems.o CLNG-BPF [test_maps] atomics.o make[1]: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf' make: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests' stderr: Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h' Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h' Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h' fatal error: error in backend: line 27: Invalid usage of the XADD return value Stack dump: 0. Program arguments: clang-10 -g -D__TARGET_ARCH_x86 -mlittle-endian -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/include/uapi -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/lib/llvm-10/lib/clang/10.0.0/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 -target bpf -c progs/atomics.c -o /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/atomics.o -mcpu=v3 1. parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'progs/atomics.c'. 4. Running pass 'BPF PreEmit Checking' on function '@add' /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7f66edf4d4ff] /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7f66edf4b7b0] clang-11 and llvm-11, test build will fail with: CLNG-BPF [test_maps] test_l4lb.o CLNG-BPF [test_maps] pyperf600.o CLNG-BPF [test_maps] profiler2.o CLNG-BPF [test_maps] test_pe_preserve_elems.o CLNG-BPF [test_maps] atomics.o make[1]: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf' make: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests' stderr: Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h' Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h' Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h' fatal error: error in backend: line 27: Invalid usage of the XADD return value PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: clang-11 -g -D__TARGET_ARCH_x86 -mlittle-endian -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/include/uapi -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/lib/llvm-11/lib/clang/11.0.0/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 -target bpf -c progs/atomics.c -o /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/atomics.o -mcpu=v3 1. parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'progs/atomics.c'. 4. Running pass 'BPF PreEmit Checking' on function '@add' /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7ff12deae clang-12 and llvm-12, test build will fail with: GEN-SKEL [test_progs] test_global_func3.skel.h GEN-SKEL [test_progs] kfunc_call_test_subprog.skel.h make[1]: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf' make: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests' stderr: Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h' Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h' Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h' libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1 libbpf: failed to find BTF for extern 'bpf_kfunc_call_test1' [27] section: -2 Error: failed to open BPF object file: No such file or directory make[1]: *** [Makefile:475: /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/kfunc_call_test_subprog.skel.h] Error 255 make[1]: *** Deleting file '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/kfunc_call_test_subprog.skel.h' make: *** [Makefile:171: all] Error 2 Since the default clang on Jammy is clang-14, I assume we need that in this case. As this is not a regression, but something that failed on this kernel already (in the form that tests like udpgro.sh didn't work in ubuntu_kernel_selftests) I think we can just hint it for now.