Skip to content

Commit 380c771

Browse files
committed
test: disable selinux for critests
Signed-off-by: Peter Hunt <[email protected]>
1 parent 85da00a commit 380c771

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

contrib/test/integration/critest.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,25 @@
2424
poll: 30
2525
when: ansible_distribution not in ['RedHat', 'CentOS']
2626

27-
# XXX: RHEL has an additional test which fails because of selinux but disabling
28-
# it doesn't solve the issue.
29-
# TODO(runcom): enable skipped tests once we fix them (selinux)
30-
# https://bugzilla.redhat.com/show_bug.cgi?id=1414236
31-
# https://access.redhat.com/solutions/2897781
32-
- name: run critest validation
33-
shell: "critest --runtime-endpoint /var/run/crio/crio.sock --image-endpoint /var/run/crio/crio.sock --ginkgo.skip='should not allow privilege escalation when true'"
34-
args:
35-
chdir: "{{ ansible_env.GOPATH }}/src/github.com/cri-o/cri-o"
36-
async: 5400
37-
poll: 30
38-
when: ansible_distribution in ['RedHat', 'CentOS']
27+
# SELinux now breaks the tests. Not sure why. The branch is too old to be worth figuring out why
28+
- block:
29+
30+
- name: Disable selinux during integration tests
31+
command: 'setenforce 0'
32+
when: not integration_selinux_enabled
33+
34+
- name: run critest validation
35+
shell: "critest --runtime-endpoint /var/run/crio/crio.sock --image-endpoint /var/run/crio/crio.sock --ginkgo.skip='should not allow privilege escalation when true'"
36+
args:
37+
chdir: "{{ ansible_env.GOPATH }}/src/github.com/cri-o/cri-o"
38+
async: 5400
39+
poll: 30
40+
when: ansible_distribution in ['RedHat', 'CentOS']
41+
42+
always:
43+
44+
- name: Re-enable SELinux after integration tests
45+
command: 'setenforce 1'
3946

4047
- name: run critest benchmarks
4148
shell: "critest --runtime-endpoint /var/run/crio/crio.sock --image-endpoint /var/run/crio/crio.sock --benchmark"

0 commit comments

Comments
 (0)