summaryrefslogtreecommitdiff
path: root/test/e2e/run_ns_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-09-06 14:53:54 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-07 12:05:54 +0000
commit43bcf99e6d36206f110514c153ca513d8f4453be (patch)
treea43449d8d84718ef289dbb72aee57e5eb03bac9f /test/e2e/run_ns_test.go
parent8b2b88ebff512bdb3981e046710eea7dca586edb (diff)
downloadpodman-43bcf99e6d36206f110514c153ca513d8f4453be.tar.gz
podman-43bcf99e6d36206f110514c153ca513d8f4453be.tar.bz2
podman-43bcf99e6d36206f110514c153ca513d8f4453be.zip
Change shm test to be less flaky.
This tests fails a lot, I think because of a race condition. Changing to just make sure the inode of the /dev/shm on the host is the same as inside the container. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1420 Approved by: mheon
Diffstat (limited to 'test/e2e/run_ns_test.go')
-rw-r--r--test/e2e/run_ns_test.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/e2e/run_ns_test.go b/test/e2e/run_ns_test.go
index 56be68c48..a61b4ab03 100644
--- a/test/e2e/run_ns_test.go
+++ b/test/e2e/run_ns_test.go
@@ -48,18 +48,15 @@ var _ = Describe("Podman run ns", func() {
})
It("podman run ipcns test", func() {
- testFile := "/dev/shm/podmantest"
- setup := podmanTest.SystemExec("touch", []string{testFile})
+ setup := podmanTest.SystemExec("ls", []string{"--inode", "-d", "/dev/shm"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
+ hostShm := setup.OutputToString()
- session := podmanTest.Podman([]string{"run", "--ipc=host", fedoraMinimal, "ls", testFile})
+ session := podmanTest.Podman([]string{"run", "--ipc=host", fedoraMinimal, "ls", "--inode", "-d", "/dev/shm"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- Expect(session.OutputToString()).To(ContainSubstring(testFile))
-
- err := os.Remove(testFile)
- Expect(err).To(BeNil())
+ Expect(session.OutputToString()).To(Equal(hostShm))
})
It("podman run bad ipc pid test", func() {