Skip to content

Commit a7f24b2

Browse files
committed
test: run tests with selinux enforcing
With container-selinux policy updated to 2.145+ (the default for Fedora 32+) we can enable SELinux=Enforcing mode in the CI workflow and pass all integration and CRI tests except one, see containerd#4460, which has been marked as skipped. Tested locally with: - SELINUX=Enforcing vagrant up --provision-with=shell,selinux,test-integration - SELINUX=Enforcing vagrant up --provision-with=shell,selinux,test-cri Signed-off-by: Jacob Blain Christen <[email protected]>
1 parent ac61e58 commit a7f24b2

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,11 @@ jobs:
347347
- name: Integration
348348
env:
349349
RUNC_FLAVOR: ${{ matrix.runc }}
350-
# SELinux: replace Permissive with Enforcing after https://github.com/containers/container-selinux/pull/98
351-
# is merged and the package becomes generally available.
352-
SELINUX: Permissive
350+
SELINUX: Enforcing
353351
run: vagrant up --provision-with=selinux,install-runc,test-integration
354352

355353
- name: CRI test
356354
env:
357355
RUNC_FLAVOR: ${{ matrix.runc }}
358-
# SELinux: replace Permissive with Enforcing after https://github.com/containers/container-selinux/pull/98
359-
# is merged and the package becomes generally available.
360-
SELINUX: Permissive
356+
SELINUX: Enforcing
361357
run: vagrant up --provision-with=selinux,install-runc,test-cri

Vagrantfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ EOF
214214
#
215215
config.vm.provision "test-cri", type: "shell", run: "never" do |sh|
216216
sh.upload_path = "/tmp/test-cri"
217-
sh.env = {
218-
'CRITEST_ARGS': ENV['CRITEST_ARGS'],
219-
}
220217
sh.inline = <<~SHELL
221218
#!/usr/bin/env bash
222219
source /etc/environment
@@ -239,7 +236,7 @@ EOF
239236
fi
240237
trap cleanup EXIT
241238
ctr version
242-
critest --parallel=$(nproc) ${CRITEST_ARGS}
239+
critest --parallel=$(nproc) --ginkgo.skip='HostIpc is true'
243240
SHELL
244241
end
245242

0 commit comments

Comments
 (0)