summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_create_test.go21
-rw-r--r--test/system/200-pod.bats10
2 files changed, 7 insertions, 24 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index a48193e90..e463862f5 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -899,27 +899,6 @@ ENTRYPOINT ["sleep","99999"]
})
- It("podman pod create --device-read-bps", func() {
- SkipIfRootless("Cannot create devices in /dev in rootless mode")
- SkipIfRootlessCgroupsV1("Setting device-read-bps not supported on cgroupv1 for rootless users")
-
- podName := "testPod"
- session := podmanTest.Podman([]string{"pod", "create", "--device-read-bps", "/dev/zero:1mb", "--name", podName})
- session.WaitWithDefaultTimeout()
- Expect(session).Should(Exit(0))
-
- if CGROUPSV2 {
- session = podmanTest.Podman([]string{"run", "--rm", "--pod", podName, ALPINE, "sh", "-c", "cat /sys/fs/cgroup/$(sed -e 's|0::||' < /proc/self/cgroup)/io.max"})
- } else {
- session = podmanTest.Podman([]string{"run", "--rm", "--pod", podName, ALPINE, "cat", "/sys/fs/cgroup/blkio/blkio.throttle.read_bps_device"})
- }
- session.WaitWithDefaultTimeout()
- Expect(session).Should(Exit(0))
- if !CGROUPSV2 {
- Expect(session.OutputToString()).To(ContainSubstring("1048576"))
- }
- })
-
It("podman pod create --volumes-from", func() {
volName := "testVol"
volCreate := podmanTest.Podman([]string{"volume", "create", volName})
diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats
index 92d3966be..0e522b34d 100644
--- a/test/system/200-pod.bats
+++ b/test/system/200-pod.bats
@@ -479,21 +479,25 @@ spec:
fi
local name1="resources1"
- run_podman --cgroup-manager=systemd pod create --name=$name1 --cpus=5
- run_podman --cgroup-manager=systemd pod start $name1
+ run_podman --cgroup-manager=systemd pod create --name=$name1 --cpus=5 --memory=10m
+ run_podman --cgroup-manager=systemd pod start $name1
run_podman pod inspect --format '{{.CgroupPath}}' $name1
local path1="$output"
local actual1=$(< /sys/fs/cgroup/$path1/cpu.max)
is "$actual1" "500000 100000" "resource limits set properly"
+ local actual2=$(< /sys/fs/cgroup/$path1/memory.max)
+ is "$actual2" "10485760" "resource limits set properly"
run_podman pod --cgroup-manager=systemd rm -f $name1
local name2="resources2"
- run_podman --cgroup-manager=cgroupfs pod create --cpus=5 --name=$name2
+ run_podman --cgroup-manager=cgroupfs pod create --cpus=5 --memory=10m --name=$name2
run_podman --cgroup-manager=cgroupfs pod start $name2
run_podman pod inspect --format '{{.CgroupPath}}' $name2
local path2="$output"
local actual2=$(< /sys/fs/cgroup/$path2/cpu.max)
is "$actual2" "500000 100000" "resource limits set properly"
+ local actual2=$(< /sys/fs/cgroup/$path2/memory.max)
+ is "$actual2" "10485760" "resource limits set properly"
run_podman --cgroup-manager=cgroupfs pod rm $name2
}