mirror of
https://github.com/containers/podman.git
synced 2025-06-22 18:08:11 +08:00
Merge pull request #21191 from edsantiago/debian_warnings
e2e: reenable warning checks on Debian
This commit is contained in:
@ -1173,7 +1173,13 @@ var _ = Describe("Podman checkpoint", func() {
|
|||||||
|
|
||||||
// As the container has been started with '--rm' it will be completely
|
// As the container has been started with '--rm' it will be completely
|
||||||
// cleaned up after checkpointing.
|
// cleaned up after checkpointing.
|
||||||
Expect(result).To(ExitCleanly())
|
// #11784 (closed wontfix): runc warns "lstat /sys/.../machine.slice/...: ENOENT"
|
||||||
|
// so we can't use ExitCleanly()
|
||||||
|
if podmanTest.OCIRuntime == "runc" {
|
||||||
|
Expect(result).To(Exit(0))
|
||||||
|
} else {
|
||||||
|
Expect(result).To(ExitCleanly())
|
||||||
|
}
|
||||||
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
|
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
|
||||||
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
|
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
|
||||||
|
|
||||||
@ -1254,7 +1260,13 @@ var _ = Describe("Podman checkpoint", func() {
|
|||||||
result.OutputToString(),
|
result.OutputToString(),
|
||||||
})
|
})
|
||||||
result.WaitWithDefaultTimeout()
|
result.WaitWithDefaultTimeout()
|
||||||
Expect(result).To(ExitCleanly())
|
// #11784 (closed wontfix): runc warns "lstat /sys/.../machine.slice/...: ENOENT"
|
||||||
|
// so we can't use ExitCleanly()
|
||||||
|
if podmanTest.OCIRuntime == "runc" {
|
||||||
|
Expect(result).To(Exit(0))
|
||||||
|
} else {
|
||||||
|
Expect(result).To(ExitCleanly())
|
||||||
|
}
|
||||||
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
|
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
|
||||||
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
|
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
|
||||||
|
|
||||||
|
@ -409,14 +409,20 @@ var _ = Describe("Podman exec", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman exec cannot be invoked", func() {
|
It("podman exec cannot be invoked", func() {
|
||||||
SkipIfNotFedora("FIXME: #19552 fails on Debian SID w/ runc 1.1.5")
|
|
||||||
setup := podmanTest.RunTopContainer("test1")
|
setup := podmanTest.RunTopContainer("test1")
|
||||||
setup.WaitWithDefaultTimeout()
|
setup.WaitWithDefaultTimeout()
|
||||||
Expect(setup).Should(ExitCleanly())
|
Expect(setup).Should(ExitCleanly())
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"exec", "test1", "/etc"})
|
session := podmanTest.Podman([]string{"exec", "test1", "/etc"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(Exit(126))
|
|
||||||
|
if podmanTest.OCIRuntime == "runc" {
|
||||||
|
// #19552 and others: some versions of runc exit 255.
|
||||||
|
Expect(session).Should(ExitWithError())
|
||||||
|
} else {
|
||||||
|
// crun (and, we hope, any other future runtimes)
|
||||||
|
Expect(session).Should(Exit(126))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman exec command not found", func() {
|
It("podman exec command not found", func() {
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
. "github.com/containers/podman/v4/test/utils"
|
. "github.com/containers/podman/v4/test/utils"
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
. "github.com/onsi/gomega/gexec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("Podman generate spec", func() {
|
var _ = Describe("Podman generate spec", func() {
|
||||||
@ -57,6 +58,12 @@ var _ = Describe("Podman generate spec", func() {
|
|||||||
|
|
||||||
session = podmanTest.Podman([]string{"generate", "spec", "--compact", "podspecgen"})
|
session = podmanTest.Podman([]string{"generate", "spec", "--compact", "podspecgen"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
|
||||||
|
if isRootless() && !CGROUPSV2 {
|
||||||
|
Expect(session).Should(Exit(0))
|
||||||
|
Expect(session.ErrorToString()).Should(ContainSubstring("Resource limits are not supported and ignored on cgroups V1 rootless"))
|
||||||
|
} else {
|
||||||
|
Expect(session).Should(ExitCleanly())
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -198,15 +198,7 @@ func (matcher *exitCleanlyMatcher) Match(actual interface{}) (success bool, err
|
|||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit status is 0. Now check for anything on stderr... except:
|
// Exit status is 0. Now check for anything on stderr
|
||||||
info := GetHostDistributionInfo()
|
|
||||||
if info.Distribution != "fedora" {
|
|
||||||
// runc on debian:
|
|
||||||
// FIXME: #11784 - lstat /sys/fs/.../*.scope: ENOENT
|
|
||||||
// FIXME: #11785 - cannot toggle freezer: cgroups not configured
|
|
||||||
return true, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if stderr != "" {
|
if stderr != "" {
|
||||||
matcher.msg = fmt.Sprintf("Unexpected warnings seen on stderr: %q", stderr)
|
matcher.msg = fmt.Sprintf("Unexpected warnings seen on stderr: %q", stderr)
|
||||||
return false, nil
|
return false, nil
|
||||||
|
Reference in New Issue
Block a user