Skip to content

Commit

Permalink
Fix sig-proxy=false test and use image cache
Browse files Browse the repository at this point in the history
Pulling fedora-minimal was potentially causing timeouts, which is
bad. Using the cache avoids that.

Sig-proxy=false test was entirely nonfunctional - I think we
didn't update it when we fixed sig-proxy=true to be less racy.
It was still passing, which is concerning.

Signed-off-by: Matthew Heon <mheon@redhat.com>
  • Loading branch information
mheon committed Oct 22, 2019
1 parent a7f2668 commit 224d805
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/e2e/run_signal_test.go
Expand Up @@ -19,6 +19,7 @@ import (
)

const sigCatch = "trap \"echo FOO >> /h/fifo \" 8; echo READY >> /h/fifo; while :; do sleep 0.25; done"
const sigCatch2 = "trap \"echo Received\" SIGFPE; while :; do sleep 0.25; done"

var _ = Describe("Podman run with --sig-proxy", func() {
var (
Expand Down Expand Up @@ -110,11 +111,11 @@ var _ = Describe("Podman run with --sig-proxy", func() {
})

Specify("signals are not forwarded to container with sig-proxy false", func() {
signal := syscall.SIGPOLL
signal := syscall.SIGFPE
if rootless.IsRootless() {
podmanTest.RestoreArtifact(fedoraMinimal)
}
session, pid := podmanTest.PodmanPID([]string{"run", "--name", "test2", "--sig-proxy=false", fedoraMinimal, "bash", "-c", sigCatch})
session, pid := podmanTest.PodmanPID([]string{"run", "--name", "test2", "--sig-proxy=false", fedoraMinimal, "bash", "-c", sigCatch2})

ok := WaitForContainer(podmanTest)
Expect(ok).To(BeTrue())
Expand All @@ -132,7 +133,7 @@ var _ = Describe("Podman run with --sig-proxy", func() {

session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(137))
ok, _ = session.GrepString(fmt.Sprintf("Received %d", signal))
ok, _ = session.GrepString("Received")
Expect(ok).To(BeFalse())
})

Expand Down

0 comments on commit 224d805

Please sign in to comment.