Skip to content

Commit

Permalink
Disable incompatible rootless + CGroupsV1 tests
Browse files Browse the repository at this point in the history
These tests simply will not work under these conditions.

Note: Recently updated F32 (prior-fedora) and Ubuntu 20.04
(prior-ubuntu) VMs always use CGroupsV1 with runc.  F33 and
Ubuntu 20.10 were updated to always use CGroupsV2 with crun.

Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Dec 15, 2020
1 parent 0bb865e commit 427731a
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/e2e/containers_conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ var _ = Describe("Podman run", func() {
})

It("podman Capabilities in containers.conf", func() {
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
cap := podmanTest.Podman([]string{"run", ALPINE, "grep", "CapEff", "/proc/self/status"})
cap.WaitWithDefaultTimeout()
Expect(cap.ExitCode()).To(Equal(0))
Expand Down Expand Up @@ -121,6 +122,7 @@ var _ = Describe("Podman run", func() {
})

verifyNSHandling := func(nspath, option string) {
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
os.Setenv("CONTAINERS_CONF", "config/containers-ns.conf")
if IsRemote() {
podmanTest.RestartRemoteService()
Expand Down
1 change: 1 addition & 0 deletions test/e2e/generate_kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ var _ = Describe("Podman generate kube", func() {
})

It("podman generate kube multiple pods should fail", func() {
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
pod1 := podmanTest.Podman([]string{"run", "-dt", "--pod", "new:pod1", ALPINE, "top"})
pod1.WaitWithDefaultTimeout()
Expect(pod1.ExitCode()).To(Equal(0))
Expand Down
1 change: 1 addition & 0 deletions test/e2e/pod_infra_container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ var _ = Describe("Podman pod create", func() {
})

It("podman pod container can override pod pid NS", func() {
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
session := podmanTest.Podman([]string{"pod", "create", "--share", "pid"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expand Down
1 change: 1 addition & 0 deletions test/e2e/pod_kill_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ var _ = Describe("Podman pod kill", func() {
})

It("podman pod kill all", func() {
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
_, ec, podid := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))

Expand Down
1 change: 1 addition & 0 deletions test/e2e/pod_ps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ var _ = Describe("Podman ps", func() {
})

It("podman pod ps --ctr-names", func() {
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
_, ec, podid := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))

Expand Down
2 changes: 2 additions & 0 deletions test/e2e/run_ns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var _ = Describe("Podman run ns", func() {
})

It("podman run pidns test", func() {
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
session := podmanTest.Podman([]string{"run", fedoraMinimal, "bash", "-c", "echo $$"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expand Down Expand Up @@ -105,6 +106,7 @@ var _ = Describe("Podman run ns", func() {
})

It("podman run --ipc=host --pid=host", func() {
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
cmd := exec.Command("ls", "-l", "/proc/self/ns/pid")
res, err := cmd.Output()
Expect(err).To(BeNil())
Expand Down
1 change: 1 addition & 0 deletions test/e2e/run_selinux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ var _ = Describe("Podman run", func() {
})

It("podman test --pid=host", func() {
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
session := podmanTest.Podman([]string{"run", "--pid=host", ALPINE, "cat", "/proc/self/attr/current"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expand Down
1 change: 1 addition & 0 deletions test/e2e/toolbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ var _ = Describe("Toolbox-specific testing", func() {
if podmanTest.RemoteTest {
Skip("Shm size check does not work with a remote client")
}
SkipIfRootlessCgroupsV1("Not supported for rootless + CGroupsV1")
var session *PodmanSessionIntegration
var cmd *exec.Cmd
var hostShmSize, containerShmSize int
Expand Down

0 comments on commit 427731a

Please sign in to comment.