Privileged containers should inherit host devices

When running a privileged container, it should inherit the same
devices the host has.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #330
Approved by: mheon
This commit is contained in:
baude
2018-02-14 12:51:06 -06:00
committed by Atomic Bot
parent d051dc38d8
commit be9ed1cfac
78 changed files with 3131 additions and 849 deletions

View File

@ -73,4 +73,17 @@ var _ = Describe("Podman privileged container tests", func() {
Expect(capAmp[1]).To(Equal(capEff[1]))
})
It("podman non-privileged should have very few devices", func() {
session := podmanTest.Podman([]string{"run", "busybox", "ls", "-l", "/dev"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(len(session.OutputToStringArray())).To(Equal(18))
})
It("podman privileged should inherit host devices", func() {
session := podmanTest.Podman([]string{"run", "--privileged", ALPINE, "ls", "-l", "/dev"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 20))
})
})