summaryrefslogtreecommitdiff
path: root/test/e2e/pod_create_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-01 10:53:14 -0400
committerGitHub <noreply@github.com>2021-10-01 10:53:14 -0400
commit81aabc80545873a1ea6f7707a904997f1b400855 (patch)
treef918ca6a05abcf0be9e7155ca6554a42549244c8 /test/e2e/pod_create_test.go
parent285c9ec69b7c48467d183d2507cbd4163b9c21c9 (diff)
parent2d86051893fc2e813f26c16d13786bb377c26d48 (diff)
downloadpodman-81aabc80545873a1ea6f7707a904997f1b400855.tar.gz
podman-81aabc80545873a1ea6f7707a904997f1b400855.tar.bz2
podman-81aabc80545873a1ea6f7707a904997f1b400855.zip
Merge pull request #11686 from cdoern/podDeviceOptions
Pod Device-Read-BPS support
Diffstat (limited to 'test/e2e/pod_create_test.go')
-rw-r--r--test/e2e/pod_create_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index c9924be72..e8bc871da 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -903,4 +903,25 @@ 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"))
+ }
+ })
+
})