aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-08-24 22:21:06 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-08-24 22:24:09 +0200
commit35b4f26c70fae6abb01773eb767b88eefaddcfe2 (patch)
tree68812d212c9d5d451ca24cf7285087430fd42092
parent9a83fe33b5c93eff0e65064cc45158d8d0f6ea0d (diff)
downloadpodman-35b4f26c70fae6abb01773eb767b88eefaddcfe2.tar.gz
podman-35b4f26c70fae6abb01773eb767b88eefaddcfe2.tar.bz2
podman-35b4f26c70fae6abb01773eb767b88eefaddcfe2.zip
test: use private instead of slave for the mount
using "slave" means that every mount operation on the host that happens between the mount creation for `/host` and running `findmnt` will be propagated to the container mount. To prevent new mounts on the host to appear in the container thus invalidating the test we have, just create the mount as private and use `/sys` as source as it has multiple mounts on the top but less likely to get new mounts once it is configured. Closes: https://github.com/containers/podman/issues/15241 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--test/e2e/run_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index b2840d544..1f6b6fa3d 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -1236,7 +1236,7 @@ USER mail`, BB)
It("podman run --mount type=bind,bind-nonrecursive", func() {
SkipIfRootless("FIXME: rootless users are not allowed to mount bind-nonrecursive")
- session := podmanTest.Podman([]string{"run", "--mount", "type=bind,bind-nonrecursive,slave,src=/,target=/host", fedoraMinimal, "findmnt", "-nR", "/host"})
+ session := podmanTest.Podman([]string{"run", "--mount", "type=bind,bind-nonrecursive,private,src=/sys,target=/host-sys", fedoraMinimal, "findmnt", "-nR", "/host-sys"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(session.OutputToStringArray()).To(HaveLen(1))