summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-13 13:12:48 +0100
committerGitHub <noreply@github.com>2021-11-13 13:12:48 +0100
commitcca6df428cb9ce187ae1341740ac1137c7a67a75 (patch)
tree7372a67e90ea951c0ad2f64bc9c3a676f4b54fe1 /test/e2e
parent8f3fb743ee57964594b36fdffb7b8fc5e3ca3371 (diff)
parent9226ccb59f5967f5c784280b993711530615dcd7 (diff)
downloadpodman-cca6df428cb9ce187ae1341740ac1137c7a67a75.tar.gz
podman-cca6df428cb9ce187ae1341740ac1137c7a67a75.tar.bz2
podman-cca6df428cb9ce187ae1341740ac1137c7a67a75.zip
Merge pull request #12272 from hshiina/memory-swappiness
Enable 'podman run --memory-swappiness=0'
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_memory_test.go19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/e2e/run_memory_test.go b/test/e2e/run_memory_test.go
index e2f2937ba..04952bb03 100644
--- a/test/e2e/run_memory_test.go
+++ b/test/e2e/run_memory_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "fmt"
"os"
"strconv"
@@ -67,13 +68,17 @@ var _ = Describe("Podman run memory", func() {
Expect(session.OutputToString()).To(Equal("41943040"))
})
- It("podman run memory-swappiness test", func() {
- SkipIfCgroupV2("memory-swappiness not supported on cgroupV2")
- session := podmanTest.Podman([]string{"run", "--memory-swappiness=15", ALPINE, "cat", "/sys/fs/cgroup/memory/memory.swappiness"})
- session.WaitWithDefaultTimeout()
- Expect(session).Should(Exit(0))
- Expect(session.OutputToString()).To(Equal("15"))
- })
+ for _, limit := range []string{"0", "15", "100"} {
+ limit := limit // Keep this value in a proper scope
+ testName := fmt.Sprintf("podman run memory-swappiness test(%s)", limit)
+ It(testName, func() {
+ SkipIfCgroupV2("memory-swappiness not supported on cgroupV2")
+ session := podmanTest.Podman([]string{"run", fmt.Sprintf("--memory-swappiness=%s", limit), ALPINE, "cat", "/sys/fs/cgroup/memory/memory.swappiness"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(session.OutputToString()).To(Equal(limit))
+ })
+ }
It("podman run kernel-memory test", func() {
if podmanTest.Host.Distribution == "ubuntu" {