aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-15 12:55:46 -0400
committerGitHub <noreply@github.com>2020-07-15 12:55:46 -0400
commit2a36096b5006513d148153b823a13519691eb8d7 (patch)
tree646c62ad13a88fc45ca7c717e7ee3d85967f7c4e /test
parent5262c53598ea579db0487587f60f088c68dc1190 (diff)
parent9810e586fe4ec8d9325ae50a23acc0905a2454c3 (diff)
downloadpodman-2a36096b5006513d148153b823a13519691eb8d7.tar.gz
podman-2a36096b5006513d148153b823a13519691eb8d7.tar.bz2
podman-2a36096b5006513d148153b823a13519691eb8d7.zip
Merge pull request #6910 from mheon/fix_out_of_range
Fix a bug where --pids-limit was parsed incorrectly
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index fa52d2d05..d2950ed43 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -1015,4 +1015,21 @@ USER mail`
Expect(session.ExitCode()).To(Equal(0))
}
})
+
+ It("podman run verify pids-limit", func() {
+ cgroupsv2, err := cgroups.IsCgroup2UnifiedMode()
+ Expect(err).To(BeNil())
+
+ if !cgroupsv2 {
+ // Need v2 to ensure that cgroupfs looks the way we
+ // expect.
+ Skip("Test requires cgroups v2 to be enabled")
+ }
+
+ limit := "4321"
+ session := podmanTest.Podman([]string{"run", "--pids-limit", limit, "--rm", ALPINE, "cat", "/sys/fs/cgroup/pids.max"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(limit))
+ })
})