ACK: [PATCH] [act] UBUNTU: SAUCE: ubuntu_kernel_selftests: bump clang to clang-13 for Linux 5.13
Thadeu Lima de Souza Cascardo
cascardo at canonical.com
Tue May 25 11:48:12 UTC 2021
On Tue, May 25, 2021 at 12:30:36PM +0200, Paolo Pisati wrote:
> Linux 5.13 selftests/bpf require clang-13 (see also
> selftests/bpf/README.rst::Kernel function call test and Clang version)
> to fix a FTBFS:
> ...
> libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
> libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
> libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> Error: failed to open BPF object file: No such file or directory
> ...
>
> Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
> ---
> ubuntu_kernel_selftests/ubuntu_kernel_selftests.py | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
> index 93a97161..473e7777 100644
> --- a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
> +++ b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
> @@ -43,6 +43,8 @@ class ubuntu_kernel_selftests(test.test):
> elif self.kv == 506:
> # special case for F-oem-5.6 (lp:1879360)
> pkgs.extend(['clang-10', 'llvm-10'])
> + elif self.kv >= 513:
> + pkgs.extend(['clang-13', 'llvm-13'])
> else:
> pkgs.extend(['clang', 'llvm'])
>
> @@ -225,7 +227,12 @@ class ubuntu_kernel_selftests(test.test):
> os.chdir(self.srcdir)
> if test_name == "net" and self.kv >= 415:
> # net selftests use a module built by bpf selftests, bpf is available since bionic kernel
> - if self.kv == 506:
> + if self.kv >= 513:
> + os.environ["CLANG"] = "clang-13"
> + os.environ["LLC"] = "llc-13"
> + os.environ["LLVM_OBJCOPY"] = "llvm-objcopy-13"
> + os.environ["LLVM_READELF"] = "llvm-readelf-13"
> + elif self.kv == 506:
> os.environ["CLANG"] = "clang-10"
> os.environ["LLC"] = "llc-10"
> os.environ["LLVM_OBJCOPY"] = "llvm-objcopy-10"
> --
> 2.27.0
I see llvm-13 and clang-13 are in impish-proposed, so that should be fine and
won't break the stable releases anyway.
I also see many newer versions of llvm on older releases, so it seems that we
tend to backport those and put them in -updates. My concern is that when we
eventually backport 5.13 or 5.14 to Focal, that we won't be able to run those
tests there. We should watch for this.
Acked-by: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>
More information about the kernel-team
mailing list