[PATCH] [act] UBUNTU: SAUCE: ubuntu_kernel_selftests: bump clang to clang-13 for Linux 5.13
Paolo Pisati
paolo.pisati at canonical.com
Tue May 25 10:30:36 UTC 2021
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
More information about the kernel-team
mailing list