Skip to content

Commit 8eb3d5c

Browse files
committed
lava: Install the kselftest tarball using an overlay
Currently the kselftest LAVA jobs that KernelCI generates have the test job download the kselftest tarball onto the device. This has a couple of disadvantages: - Any caching that is configured for the LAVA worker will be bypassed, increasing network traffic both for the lab and for the KernelCI storage server. - The entire kselftest tarball has to be downloaded onto the test system, and if (as is usual) it is a NFS filesystem then an uncompressed copy written over the network to the LAVA worker. The test-definitions integration for kselftest also supports running a copy that is already installed in the filesystem, and LAVA supports adding files onto the root filesystem via it's overlay mechanism, so we can avoid the overheads of downloading directly to the device by having LAVA apply the kselftest tarball to the root filesystem as an overlay instead. A commit was previously merged doing this for the legacy LAVA templates, this updates the Maestro ones. Signed-off-by: Mark Brown <[email protected]>
1 parent d37c01d commit 8eb3d5c

File tree

6 files changed

+37
-2
lines changed

6 files changed

+37
-2
lines changed

config/runtime/boot/depthcharge.jinja2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@
2727
{%- if boot_commands == 'nfs' and nfsroot %}
2828
nfsrootfs:
2929
compression: xz
30+
format: tar
3031
url: '{{ nfsroot }}/full.rootfs.tar.xz'
32+
{%- if node.artifacts.kselftest_tar_gz %}
33+
overlays:
34+
kselftest:
35+
url: {{ node.artifacts.kselftest_tar_gz }}
36+
compression: gz
37+
format: tar
38+
path: /opt/kselftest
39+
{%- endif %}
3140
ramdisk:
3241
compression: gz
3342
url: '{{ nfsroot }}/initrd.cpio.gz'

config/runtime/boot/fastboot.jinja2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
format: tar
1717
path: /
1818
{% set dtb = device_dtb.split('/')[-1] %}
19+
{%- if node.artifacts.kselftest_tar_gz %}
20+
kselftest:
21+
url: {{ node.artifacts.kselftest_tar_gz }}
22+
compression: gz
23+
format: tar
24+
path: /opt/kselftest
25+
{%- endif %}
26+
1927
postprocess:
2028
docker:
2129
image: ghcr.io/mwasilew/docker-mkbootimage:master

config/runtime/boot/grub.jinja2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66
{%- if boot_commands == 'nfs' %}
77
nfsrootfs:
88
url: '{{ nfsroot }}/full.rootfs.tar.xz'
9+
format: tar
910
compression: xz
11+
{%- if node.artifacts.kselftest_tar_gz %}
12+
overlays:
13+
kselftest:
14+
url: {{ node.artifacts.kselftest_tar_gz }}
15+
compression: gz
16+
format: tar
17+
path: /opt/kselftest
18+
{%- endif %}
1019
ramdisk:
1120
url: '{{ nfsroot }}/initrd.cpio.gz'
1221
compression: gz

config/runtime/boot/u-boot.jinja2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,16 @@
1616
{%- if boot_commands == 'nfs' %}
1717
nfsrootfs:
1818
url: '{{ nfsroot }}/full.rootfs.tar.xz'
19+
format: tar
1920
compression: xz
21+
{%- if node.artifacts.kselftest_tar_gz %}
22+
overlays:
23+
kselftest:
24+
url: {{ node.artifacts.kselftest_tar_gz }}
25+
compression: gz
26+
format: tar
27+
path: /opt/kselftest
28+
{%- endif %}
2029
ramdisk:
2130
url: '{{ nfsroot }}/initrd.cpio.gz'
2231
compression: gz

config/runtime/tests/kselftest-platform-parameters.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
path: automated/linux/kselftest/kselftest.yaml
3636
name: '{{ node.name }}'
3737
parameters:
38-
TESTPROG_URL: '{{ node.artifacts.kselftest_tar_gz }}'
38+
KSELFTEST_PATH: /opt/kselftest
3939
SKIPFILE: /dev/null
4040
TST_CMDFILES: '{{ collections }}'
4141
TST_CASENAME: '{{ tests }}'

config/runtime/tests/kselftest.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
path: automated/linux/kselftest/kselftest.yaml
2323
name: '{{ node.name }}'
2424
parameters:
25-
TESTPROG_URL: '{{ node.artifacts.kselftest_tar_gz }}'
25+
KSELFTEST_PATH: /opt/kselftest
2626
SKIPFILE: {{ skipfile if skipfile else '/dev/null' }}
2727
TST_CMDFILES: '{{ collections }}'
2828
TST_CASENAME: '{{ tests }}'

0 commit comments

Comments
 (0)