Merge ~canonical-kernel-team/+git/autotest-client-tests:phlin/bpf-s390x-lld into ~canonical-kernel-team/+git/autotest-client-tests:master

Proposed by Po-Hsu Lin
Status: Merged
Merge reported by: Po-Hsu Lin
Merged at revision: e23c9a93da948a86026917af3c73d9ded81b2d24
Proposed branch: ~canonical-kernel-team/+git/autotest-client-tests:phlin/bpf-s390x-lld
Merge into: ~canonical-kernel-team/+git/autotest-client-tests:master
Diff against target: 40 lines (+15/-12)
1 file modified
ubuntu_bpf/ubuntu_bpf.py (+15/-12)
Reviewer Review Type Date Requested Status
Andrei Gherzan Approve
Francis Ginther Approve
Review via email: mp+457952@code.launchpad.net

This proposal supersedes a proposal from 2023-10-30.

Commit message

BugLink: https://bugs.launchpad.net/bugs/2040987

lld package is available for Mantic s390x but not J/L s390x, skip
it to prevent test build failure.

Also reconstruct the logic for adding clang / llvm / lld packages
to make it easier to read. Cleanup rules for unsupported kernels.

To post a comment you must log in.
Revision history for this message
Sean Feole (sfeole) : Posted in a previous version of this proposal
Revision history for this message
Francis Ginther (fginther) wrote : Posted in a previous version of this proposal

Looks good, just the comment suggestion from Sean.

review: Approve
Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Posted in a previous version of this proposal

Comment added as suggested, stating why we need lld and why there is an exception for s390x.

Revision history for this message
Francis Ginther (fginther) :
review: Approve
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Applied and pushed, thanks.

Revision history for this message
Andrei Gherzan (agherzan) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ubuntu_bpf/ubuntu_bpf.py b/ubuntu_bpf/ubuntu_bpf.py
2index 313e95e..e93bce4 100644
3--- a/ubuntu_bpf/ubuntu_bpf.py
4+++ b/ubuntu_bpf/ubuntu_bpf.py
5@@ -28,20 +28,23 @@ class ubuntu_bpf(test.test):
6 if not re.match('5\.15\.0-.*', platform.release()):
7 pkgs.append('gcc-12')
8
9- if self.series == 'focal':
10- if self.kv.startswith('5.6.0'):
11- # Specical case of F-oem-5.6 (lp:1879360)
12- pkgs.extend(['clang-10', 'llvm-10'])
13- else:
14- pkgs.extend(['clang-9', 'llvm-9'])
15- elif self.series == 'bionic':
16- if self.kv.startswith('5.4.0') or self.kv.startswith('5.3.0'):
17+ clang = 'clang'
18+ llvm = 'llvm'
19+ lld = '' # lld is required for Jammy+ (added in commit 254624a8), add it later in series check
20+ if self.series == 'bionic':
21+ if self.kv.startswith('5.4.0'):
22 # Special case for B-5.4 (lp:1882559) B-5.3 (lp:1845860)
23- pkgs.extend(['clang-9', 'llvm-9'])
24- else:
25- pkgs.extend(['clang', 'llvm'])
26+ clang = 'clang-9'
27+ llvm = 'llvm-9'
28+ elif self.series == 'focal':
29+ clang = 'clang-9'
30+ llvm = 'llvm-9'
31 else:
32- pkgs.extend(['clang', 'llvm', 'lld'])
33+ lld = 'lld'
34+ # Special case for J/L s390x (lp:2040987), M-s390x is not affected
35+ if arch == 's390x' and self.series in ['jammy', 'lunar']:
36+ lld = ''
37+ pkgs.extend([clang, llvm, lld])
38
39 cmd = 'yes "" | DEBIAN_FRONTEND=noninteractive apt-get install --yes --force-yes ' + ' '.join(pkgs)
40 self.results = utils.system_output(cmd, retain_output=True)

Subscribers

People subscribed via source and target branches

to all changes: