aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-11 21:23:29 +0200
committerGitHub <noreply@github.com>2019-07-11 21:23:29 +0200
commite06561270105a4e801eddce6ffe3d52f8bf23ed6 (patch)
tree700a8e0b1738acae47a9b1ef2c5862f7ee267278 /test
parent6db27454061f6a96409aa2e3fbe5e2754adc663e (diff)
parent7b75796a6056e5ef65518c37008a1176417d2797 (diff)
downloadpodman-e06561270105a4e801eddce6ffe3d52f8bf23ed6.tar.gz
podman-e06561270105a4e801eddce6ffe3d52f8bf23ed6.tar.bz2
podman-e06561270105a4e801eddce6ffe3d52f8bf23ed6.zip
Merge pull request #3554 from giuseppe/fix-cgroupfs-cleanup
cgroups: fix a leak when using cgroupfs
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_rm_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/pod_rm_test.go b/test/e2e/pod_rm_test.go
index 0d3f47f30..f0689f152 100644
--- a/test/e2e/pod_rm_test.go
+++ b/test/e2e/pod_rm_test.go
@@ -3,6 +3,8 @@ package integration
import (
"fmt"
"os"
+ "path/filepath"
+ "strings"
. "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo"
@@ -40,6 +42,21 @@ var _ = Describe("Podman pod rm", func() {
result := podmanTest.Podman([]string{"pod", "rm", podid})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
+
+ // Also check that we don't leak cgroups
+ err := filepath.Walk("/sys/fs/cgroup", func(path string, info os.FileInfo, err error) error {
+ if err != nil {
+ return err
+ }
+ if !info.IsDir() {
+ Expect(err).To(BeNil())
+ }
+ if strings.Contains(info.Name(), podid) {
+ return fmt.Errorf("leaking cgroup path %s", path)
+ }
+ return nil
+ })
+ Expect(err).To(BeNil())
})
It("podman pod rm latest pod", func() {