Workaround host availability of /dev/kvm

This test has been failing for a long time but nobody noticed because CI
doesn't have the device node (nested-VM support was disabled).  After
having enabled nested VM support, tests fail due to some unknown
special-handling of this device.

Fix both problems by removing the `skip()` and switching to a more generic
device which is only present when `--privileged` is used.

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich
2021-06-30 11:12:48 -04:00
parent 1968fdc874
commit cfbbc38a5b

View File

@ -89,10 +89,7 @@ var _ = Describe("Podman run device", func() {
})
It("podman run device host device with --privileged", func() {
if _, err := os.Stat("/dev/kvm"); err != nil {
Skip("/dev/kvm not available")
}
session := podmanTest.Podman([]string{"run", "--privileged", ALPINE, "ls", "/dev/kvm"})
session := podmanTest.Podman([]string{"run", "--privileged", ALPINE, "ls", "/dev/kmsg"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
})