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/run_privileged_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/run_privileged_test.go')
-rw-r--r-- | test/e2e/run_privileged_test.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/test/e2e/run_privileged_test.go b/test/e2e/run_privileged_test.go index 0c0de30c5..ee6e8e950 100644 --- a/test/e2e/run_privileged_test.go +++ b/test/e2e/run_privileged_test.go @@ -46,7 +46,6 @@ var _ = Describe("Podman privileged container tests", func() { It("podman privileged CapEff", func() { cap := SystemExec("grep", []string{"CapEff", "/proc/self/status"}) - cap.WaitWithDefaultTimeout() Expect(cap.ExitCode()).To(Equal(0)) session := podmanTest.Podman([]string{"run", "--privileged", "busybox", "grep", "CapEff", "/proc/self/status"}) @@ -57,7 +56,6 @@ var _ = Describe("Podman privileged container tests", func() { It("podman cap-add CapEff", func() { cap := SystemExec("grep", []string{"CapEff", "/proc/self/status"}) - cap.WaitWithDefaultTimeout() Expect(cap.ExitCode()).To(Equal(0)) session := podmanTest.Podman([]string{"run", "--cap-add", "all", "busybox", "grep", "CapEff", "/proc/self/status"}) @@ -97,7 +95,6 @@ var _ = Describe("Podman privileged container tests", func() { } cap := SystemExec("grep", []string{"NoNewPrivs", "/proc/self/status"}) - cap.WaitWithDefaultTimeout() if cap.ExitCode() != 0 { Skip("Can't determine NoNewPrivs") } |