Support passing of Ulimits as -1 to mean max

Docker allows the passing of -1 to indicate the maximum limit
allowed for the current process.

Fixes: https://github.com/containers/podman/issues/19319

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2023-09-08 07:03:49 -04:00
parent 55b9ea3ec7
commit 18d6bb40d5
8 changed files with 65 additions and 3 deletions

View File

@ -465,7 +465,7 @@ var _ = Describe("Podman inspect", func() {
Expect(inspect[0].NetworkSettings.Networks).To(HaveLen(1))
})
It("Container inspect with unlimited uilimits should be -1", func() {
It("Container inspect with unlimited ulimits should be -1", func() {
ctrName := "testctr"
session := podmanTest.Podman([]string{"run", "-d", "--ulimit", "core=-1:-1", "--name", ctrName, ALPINE, "top"})
session.WaitWithDefaultTimeout()