mirror of
https://github.com/containers/podman.git
synced 2025-10-16 18:53:19 +08:00
Fix cgroupsv2 run test, unexpected output
Sometime between 10th and 23rd of Feb. 2020, the behavior of crun changed. Upon consulting with Giuseppe, the podman run tests for `device-read-*` and `device-write-*` do not depend on the container output for success, only the exit code. Add a comment and conditional regarding this in case of cgroupsv2. Also noted that these tests will likely require future refactoring/simplification. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -70,7 +70,11 @@ var _ = Describe("Podman run memory", func() {
|
||||
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(session.OutputToString()).To(Equal("41943040"))
|
||||
if cgroupsv2 {
|
||||
Expect(session.OutputToString()).To(Equal("max"))
|
||||
} else {
|
||||
Expect(session.OutputToString()).To(Equal("41943040"))
|
||||
}
|
||||
})
|
||||
|
||||
It("podman run memory-swappiness test", func() {
|
||||
|
@ -374,7 +374,9 @@ var _ = Describe("Podman run", func() {
|
||||
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("1048576"))
|
||||
if !cgroupsv2 { // TODO: Test Simplification. For now, we only care about exit(0) w/ cgroupsv2
|
||||
Expect(session.OutputToString()).To(ContainSubstring("1048576"))
|
||||
}
|
||||
})
|
||||
|
||||
It("podman run device-write-bps test", func() {
|
||||
@ -392,7 +394,9 @@ var _ = Describe("Podman run", func() {
|
||||
}
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("1048576"))
|
||||
if !cgroupsv2 { // TODO: Test Simplification. For now, we only care about exit(0) w/ cgroupsv2
|
||||
Expect(session.OutputToString()).To(ContainSubstring("1048576"))
|
||||
}
|
||||
})
|
||||
|
||||
It("podman run device-read-iops test", func() {
|
||||
@ -411,7 +415,9 @@ var _ = Describe("Podman run", func() {
|
||||
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("100"))
|
||||
if !cgroupsv2 { // TODO: Test Simplification. For now, we only care about exit(0) w/ cgroupsv2
|
||||
Expect(session.OutputToString()).To(ContainSubstring("100"))
|
||||
}
|
||||
})
|
||||
|
||||
It("podman run device-write-iops test", func() {
|
||||
@ -430,7 +436,9 @@ var _ = Describe("Podman run", func() {
|
||||
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("100"))
|
||||
if !cgroupsv2 { // TODO: Test Simplification. For now, we only care about exit(0) w/ cgroupsv2
|
||||
Expect(session.OutputToString()).To(ContainSubstring("100"))
|
||||
}
|
||||
})
|
||||
|
||||
It("podman run notify_socket", func() {
|
||||
|
Reference in New Issue
Block a user