diff options
author | Chris Evich <cevich@redhat.com> | 2019-02-28 09:38:02 -0500 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2019-03-01 09:18:45 -0500 |
commit | f67859ffb396be13cb8c4b8d91343b77de4eb288 (patch) | |
tree | 44a2ef27d992198f2ce0d9a6e0f0ec6a07c0008f /test/e2e/load_test.go | |
parent | e30628eeda9898a64c0a5ed541536d8d5a3cf13c (diff) | |
download | podman-f67859ffb396be13cb8c4b8d91343b77de4eb288.tar.gz podman-f67859ffb396be13cb8c4b8d91343b77de4eb288.tar.bz2 podman-f67859ffb396be13cb8c4b8d91343b77de4eb288.zip |
Fix SystemExec completion race
Some callers assume when SystemExec returns, the command has completed.
Other callers explicitly wait for completion (as required). However,
forgetting to do that is an incredibly easy mistake to make. Fix this
by adding an explicit parameter to the function. This requires
every caller to deliberately state whether or not a completion-check
is required.
Also address **many** resource naming / cleanup completion-races.
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'test/e2e/load_test.go')
-rw-r--r-- | test/e2e/load_test.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index c85810454..571754347 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -59,7 +59,7 @@ var _ = Describe("Podman load", func() { Expect(save.ExitCode()).To(Equal(0)) compress := SystemExec("gzip", []string{outfile}) - compress.WaitWithDefaultTimeout() + Expect(compress.ExitCode()).To(Equal(0)) outfile = outfile + ".gz" rmi := podmanTest.Podman([]string{"rmi", ALPINE}) @@ -174,7 +174,6 @@ var _ = Describe("Podman load", func() { It("podman load localhost registry from scratch", func() { outfile := filepath.Join(podmanTest.TempDir, "load_test.tar.gz") - setup := podmanTest.Podman([]string{"tag", ALPINE, "hello:world"}) setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -255,7 +254,6 @@ var _ = Describe("Podman load", func() { save.WaitWithDefaultTimeout() Expect(save.ExitCode()).To(Equal(0)) session := SystemExec("xz", []string{outfile}) - session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) rmi := podmanTest.Podman([]string{"rmi", BB}) |