Merge ~canonical-kernel-team/+git/autotest-client-tests:phlin/header-first 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: e26725276f8c4eae7f07e6a2a9e5df39c70a3bfa
Proposed branch: ~canonical-kernel-team/+git/autotest-client-tests:phlin/header-first
Merge into: ~canonical-kernel-team/+git/autotest-client-tests:master
Diff against target: 49 lines (+16/-0)
3 files modified
ubuntu_bpf/ubuntu_bpf.py (+5/-0)
ubuntu_kernel_selftests/ubuntu_kernel_selftests.py (+6/-0)
ubuntu_kselftests_ftrace/ubuntu_kselftests_ftrace.py (+5/-0)
Reviewer Review Type Date Requested Status
Sean Feole Approve
Francis Ginther Approve
Review via email: mp+449259@code.launchpad.net

Commit message

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

Tests from kernel selftest now require header files to be built first.

This affects:
* ubuntu_kernel_selftests
* ubuntu_bpf
* ubuntu_kselftest_ftrace

Run the make header command during setup phase, so that we just need
to run it once.

To post a comment you must log in.
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This is hindering test build on Xenial, maybe we should limit this make header thing to newer kernels (jammy+)

Revision history for this message
Francis Ginther (fginther) wrote :

+1

review: Approve
Revision history for this message
Sean Feole (sfeole) wrote :

+1

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

Applied and pushed. Thanks!

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 0c52a7e..516bc58 100644
3--- a/ubuntu_bpf/ubuntu_bpf.py
4+++ b/ubuntu_bpf/ubuntu_bpf.py
5@@ -43,6 +43,11 @@ class ubuntu_bpf(test.test):
6 else:
7 pkgs.extend(['clang', 'llvm', 'lld'])
8
9+ # Build header first (LP: #2031400)
10+ if not self.series in ['trusty', 'xenial', 'bionic', 'focal']:
11+ cmd = "make -C linux/ headers"
12+ utils.system_output(cmd, retain_output=True)
13+
14 cmd = 'yes "" | DEBIAN_FRONTEND=noninteractive apt-get install --yes --force-yes ' + ' '.join(pkgs)
15 self.results = utils.system_output(cmd, retain_output=True)
16
17diff --git a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
18index 23269c4..496099b 100644
19--- a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
20+++ b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
21@@ -220,6 +220,12 @@ class ubuntu_kernel_selftests(test.test):
22 cmd = 'sed -i "/^TEST_PROGS += txtimestamp.sh$/d" ' + fn
23 utils.system(cmd)
24
25+ # Build header first (LP: #2031400)
26+ if not self.series in ['trusty', 'xenial', 'bionic', 'focal']:
27+ cmd = "make -C linux/ headers"
28+ utils.system_output(cmd, retain_output=True)
29+
30+
31 def run_once(self, test_name):
32 if test_name == 'setup':
33 return
34diff --git a/ubuntu_kselftests_ftrace/ubuntu_kselftests_ftrace.py b/ubuntu_kselftests_ftrace/ubuntu_kselftests_ftrace.py
35index 0f14def..74d5c0c 100644
36--- a/ubuntu_kselftests_ftrace/ubuntu_kselftests_ftrace.py
37+++ b/ubuntu_kselftests_ftrace/ubuntu_kselftests_ftrace.py
38@@ -84,6 +84,11 @@ class ubuntu_kselftests_ftrace(test.test):
39 if os.path.exists(fn):
40 os.remove(fn)
41
42+ # Build header first (LP: #2031400)
43+ if not self.series in ['trusty', 'xenial', 'bionic', 'focal']:
44+ cmd = "make -C linux/ headers"
45+ utils.system_output(cmd, retain_output=True)
46+
47
48 def run_once(self, test_name):
49 if test_name == 'setup':

Subscribers

People subscribed via source and target branches

to all changes: