From df99522c6794cbf9ea77c4c314dadf9e9b5b2a54 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 24 Dec 2018 06:55:24 -0500 Subject: Fixes to handle /dev/shm correctly. We had two problems with /dev/shm, first, you mount the container read/only then /dev/shm was mounted read/only. This is a bug a tmpfs directory should be read/write within a read-only container. The second problem is we were ignoring users mounted /dev/shm from the host. If user specified podman run -d -v /dev/shm:/dev/shm ... We were dropping this mount and still using the internal mount. Signed-off-by: Daniel J Walsh --- test/e2e/run_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index d73d8662f..cf366b197 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -669,4 +669,11 @@ USER mail` numContainers := podmanTest.NumberOfContainers() Expect(numContainers).To(Equal(1)) }) + It("podman run readonly container should NOT mount /dev/shm read/only", func() { + session := podmanTest.Podman([]string{"run", "--read-only", ALPINE, "mount"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + Expect(session.OutputToString()).To(Not(ContainSubstring("/dev/shm type tmpfs (ro,"))) + }) }) -- cgit v1.2.3-54-g00ecf