summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-23 10:56:08 +0100
committerGitHub <noreply@github.com>2021-12-23 10:56:08 +0100
commit1b9a5964dbb25f8c3cf2b530ffba52325cc81678 (patch)
tree5924ab4eea975a03b78c3df8b8a3746b4c6a0e66 /test/e2e
parentc8d42d93933188b256f57f44660e6041b0d872cd (diff)
parenta5e49d9668f430d8b7a8b1619fb2bf6c9087fed7 (diff)
downloadpodman-1b9a5964dbb25f8c3cf2b530ffba52325cc81678.tar.gz
podman-1b9a5964dbb25f8c3cf2b530ffba52325cc81678.tar.bz2
podman-1b9a5964dbb25f8c3cf2b530ffba52325cc81678.zip
Merge pull request #12599 from rhatdan/kernelmemory
Warn on use of --kernel-memory
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_memory_test.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/test/e2e/run_memory_test.go b/test/e2e/run_memory_test.go
index 04952bb03..04fac6bfb 100644
--- a/test/e2e/run_memory_test.go
+++ b/test/e2e/run_memory_test.go
@@ -3,7 +3,6 @@ package integration
import (
"fmt"
"os"
- "strconv"
. "github.com/containers/podman/v3/test/utils"
. "github.com/onsi/ginkgo"
@@ -79,45 +78,4 @@ var _ = Describe("Podman run memory", func() {
Expect(session.OutputToString()).To(Equal(limit))
})
}
-
- It("podman run kernel-memory test", func() {
- if podmanTest.Host.Distribution == "ubuntu" {
- Skip("Unable to perform test on Ubuntu distributions due to memory management")
- }
-
- var session *PodmanSessionIntegration
-
- if CGROUPSV2 {
- session = podmanTest.Podman([]string{"run", "--net=none", "--memory-reservation=40m", ALPINE, "sh", "-c", "cat /sys/fs/cgroup/$(sed -e 's|0::||' < /proc/self/cgroup)/memory.low"})
- } else {
- session = podmanTest.Podman([]string{"run", "--memory-reservation=40m", ALPINE, "cat", "/sys/fs/cgroup/memory/memory.soft_limit_in_bytes"})
- }
-
- session.WaitWithDefaultTimeout()
- Expect(session).Should(Exit(0))
- Expect(session.OutputToString()).To(Equal("41943040"))
- })
-
- It("podman run kernel-memory test", func() {
- if podmanTest.Host.Distribution == "ubuntu" {
- Skip("Unable to perform test on Ubuntu distributions due to memory management")
- }
- var session *PodmanSessionIntegration
- if CGROUPSV2 {
- session = podmanTest.Podman([]string{"run", "--memory", "256m", "--memory-swap", "-1", ALPINE, "cat", "/sys/fs/cgroup/memory.swap.max"})
- } else {
- session = podmanTest.Podman([]string{"run", "--cgroupns=private", ALPINE, "cat", "/sys/fs/cgroup/memory/memory.memsw.limit_in_bytes"})
- }
- session.WaitWithDefaultTimeout()
- Expect(session).Should(Exit(0))
- output := session.OutputToString()
- Expect(err).To(BeNil())
- if CGROUPSV2 {
- Expect(output).To(Equal("max"))
- } else {
- crazyHighNumber, err := strconv.ParseInt(output, 10, 64)
- Expect(err).To(BeZero())
- Expect(crazyHighNumber).To(BeNumerically(">", 936854771712))
- }
- })
})