If container exits with 125 podman should exit with 125

fixes: https://github.com/containers/podman/issues/11540

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2021-09-12 08:51:53 -04:00
parent cc94914474
commit ba2130ff55
6 changed files with 20 additions and 16 deletions

View File

@ -1,6 +1,7 @@
package integration
import (
"fmt"
"os"
"github.com/containers/podman/v3/libpod/define"
@ -63,4 +64,10 @@ var _ = Describe("Podman run exit", func() {
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(50))
})
It("podman run exit 125", func() {
result := podmanTest.Podman([]string{"run", ALPINE, "sh", "-c", fmt.Sprintf("exit %d", define.ExecErrorCodeGeneric)})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(define.ExecErrorCodeGeneric))
})
})