Skip to content

Commit e7218cf

Browse files
ekoopspoiana
authored andcommitted
chore(ansible-playbooks): disable legacy BPF tests on some oraclelinux
Disable BPF tests for both `oraclelinux-5.4-x86_64` and `oraclelinux-5.15-aarch64`. The VMs rootfs are based on `oraclelinux:8` and `oraclelinux:9`, which unfortunately provide a too much recent clang version (clang 20). This version doesn't work well wil the kernel expectation, and results in failing legacy BPF tests. BPF tests are disabled through a new `skip_legacy_bpf_tests` property in machine specification (see `ansible-playbooks/group_vars/all/vars.yml`). The new mechanism works by disabling legacy BPF support if the property is defined and set to true. Signed-off-by: Leonardo Di Giovanna <[email protected]>
1 parent a73851f commit e7218cf

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

ansible-playbooks/group_vars/all/vars.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ machines:
3737
- {name: "fedora-6.2", kernel: "{{ repo }}/fedora-kernel:6.2-x86_64-{{ tag }}", rootfs: "{{ repo }}/fedora-image:6.2-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
3838
- {name: "oraclelinux-4.14", kernel: "{{ repo }}/oraclelinux-kernel:4.14-x86_64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:4.14-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
3939
- {name: "oraclelinux-5.15", kernel: "{{ repo }}/oraclelinux-kernel:5.15-x86_64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.15-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
40-
- {name: "oraclelinux-5.4", kernel: "{{ repo }}/oraclelinux-kernel:5.4-x86_64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.4-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
40+
- {name: "oraclelinux-5.4", kernel: "{{ repo }}/oraclelinux-kernel:5.4-x86_64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.4-x86_64-{{ tag }}", arch: "x86_64", skip_legacy_bpf_tests: true} # noqa: yaml[line-length]
4141
- {name: "ubuntu-5.8", kernel: "{{ repo }}/ubuntu-kernel:5.8-x86_64-{{ tag }}", rootfs: "{{ repo }}/ubuntu-image:5.8-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
4242
- {name: "ubuntu-6.5", kernel: "{{ repo }}/ubuntu-kernel:6.5-x86_64-{{ tag }}", rootfs: "{{ repo }}/ubuntu-image:6.5-x86_64-{{ tag }}", arch: "x86_64"} # noqa: yaml[line-length]
4343
- {name: "amazonlinux2022-5.15", kernel: "{{ repo }}/amazonlinux2022-kernel:5.15-aarch64-{{ tag }}", rootfs: "{{ repo }}/amazonlinux2022-image:5.15-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
4444
- {name: "amazonlinux2-5.4", kernel: "{{ repo }}/amazonlinux2-kernel:5.4-aarch64-{{ tag }}", rootfs: "{{ repo }}/amazonlinux2-image:5.4-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
4545
- {name: "fedora-6.2", kernel: "{{ repo }}/fedora-kernel:6.2-aarch64-{{ tag }}", rootfs: "{{ repo }}/fedora-image:6.2-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
4646
- {name: "oraclelinux-4.14", kernel: "{{ repo }}/oraclelinux-kernel:4.14-aarch64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:4.14-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
47-
- {name: "oraclelinux-5.15", kernel: "{{ repo }}/oraclelinux-kernel:5.15-aarch64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.15-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
47+
- {name: "oraclelinux-5.15", kernel: "{{ repo }}/oraclelinux-kernel:5.15-aarch64-{{ tag }}", rootfs: "{{ repo }}/oraclelinux-image:5.15-aarch64-{{ tag }}", arch: "aarch64", skip_legacy_bpf_tests: true} # noqa: yaml[line-length]
4848
- {name: "ubuntu-6.5", kernel: "{{ repo }}/ubuntu-kernel:6.5-aarch64-{{ tag }}", rootfs: "{{ repo }}/ubuntu-image:6.5-aarch64-{{ tag }}", arch: "aarch64"} # noqa: yaml[line-length]
4949

5050
builders:

ansible-playbooks/roles/scap_open/tasks/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,17 @@
3232
- name: Enable old Bpf support
3333
ansible.builtin.set_fact:
3434
scap_open_bpf_supported: true
35-
when: ansible_kernel is version(scap_open_bpf_minimum_kver[ansible_architecture],'>=')
35+
# Enable legacy BPF support if the minimum kernel version requirement is met and the user didn't explicitly decide
36+
# to skip legacy BPF tests.
37+
when:
38+
- ansible_kernel is version(scap_open_bpf_minimum_kver[ansible_architecture],'>=')
39+
- machines
40+
| selectattr('name', 'equalto', inventory_hostname)
41+
| map(attribute='skip_legacy_bpf_tests')
42+
| map('default', false)
43+
| select('equalto', true)
44+
| list
45+
| length == 0
3646

3747
- name: Prepare the build directory
3848
block:

0 commit comments

Comments
 (0)