Skip to content

Commit

Permalink
Merge pull request #24274 from Luap99/fix-signal-exit
Browse files Browse the repository at this point in the history
test/e2e: fix default signal exit code test
  • Loading branch information
openshift-merge-bot[bot] authored Oct 15, 2024
2 parents 3fbae8e + b0f2ebb commit 1dcb4c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/e2e/run_signal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()")
Expand All @@ -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")))
})

Expand Down

1 comment on commit 1dcb4c5

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.