Skip to content

Commit

Permalink
Skip tests which fail with CGv1 & runc
Browse files Browse the repository at this point in the history
* Skip play-kube test when runc is in use containers#17436
* Skip uid/gidmapping idmapped-volume test containers#17433

Signed-off-by: Chris Evich <cevich@redhat.com>
  • Loading branch information
cevich committed Feb 22, 2023
1 parent 5b4f248 commit 197529f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions test/e2e/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,13 @@ func checkReason(reason string) {
}
}

func SkipIfRunc(p *PodmanTestIntegration, reason string) {
checkReason(reason)
if p.OCIRuntime == "runc" {
Skip("[runc]: " + reason)
}
}

func SkipIfRootlessCgroupsV1(reason string) {
checkReason(reason)
if isRootless() && !CGROUPSV2 {
Expand Down
1 change: 1 addition & 0 deletions test/e2e/play_kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4700,6 +4700,7 @@ ENV OPENJ9_JAVA_OPTIONS=%q
})

It("podman play kube with disabled cgroup", func() {
SkipIfRunc(podmanTest, "Test not supported with runc, see issue #17436")
conffile := filepath.Join(podmanTest.TempDir, "container.conf")
// Disabled ipcns and cgroupfs in the config file
// Since shmsize (Inherit from infra container) cannot be set if ipcns is "host", we should remove the default value.
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/run_userns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ var _ = Describe("Podman UserNS support", func() {

It("podman uidmapping and gidmapping with an idmapped volume", func() {
Skip("it depends on a breaking change in crun: https://github.com/containers/crun/pull/1147")

SkipIfRunc(podmanTest, "Test not supported yet with runc, see issue #17433")
session := podmanTest.Podman([]string{"run", "--uidmap=0:1:500", "--gidmap=0:200:5000", "-v", "my-foo-volume:/foo:Z,idmap", "alpine", "stat", "-c", "#%u:%g#", "/foo"})
session.WaitWithDefaultTimeout()
if strings.Contains(session.ErrorToString(), "Operation not permitted") {
Expand Down

0 comments on commit 197529f

Please sign in to comment.