mirror of https://github.com/containers/podman.git
Merge pull request #24274 from Luap99/fix-signal-exit
test/e2e: fix default signal exit code test
This commit is contained in:
commit
1dcb4c58c2
|
@ -92,10 +92,6 @@ var _ = Describe("Podman run with --sig-proxy", func() {
|
|||
|
||||
Specify("signals are not forwarded to container with sig-proxy false", func() {
|
||||
signal := syscall.SIGFPE
|
||||
if isRootless() {
|
||||
err = podmanTest.RestoreArtifact(fedoraMinimal)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
}
|
||||
session, pid := podmanTest.PodmanPID([]string{"run", "--name", "test2", "--sig-proxy=false", fedoraMinimal, "bash", "-c", sigCatch2})
|
||||
|
||||
Expect(WaitForContainer(podmanTest)).To(BeTrue(), "WaitForContainer()")
|
||||
|
@ -112,7 +108,11 @@ var _ = Describe("Podman run with --sig-proxy", func() {
|
|||
Expect(killSession).Should(ExitCleanly())
|
||||
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).To(ExitWithError(2, "SIGFPE: floating-point exception"))
|
||||
// Exit code is normally 2, however with GOTRACEBACK=crash (default in
|
||||
// Fedora/RHEL rpm builds) it will be 134 thus allow both.
|
||||
// https://github.com/containers/podman/issues/24213
|
||||
errorMsg := "SIGFPE: floating-point exception"
|
||||
Expect(session).To(Or(ExitWithError(2, errorMsg), ExitWithError(134, errorMsg)))
|
||||
Expect(session.OutputToString()).To(Not(ContainSubstring("Received")))
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue