diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2021-03-17 16:39:01 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2021-03-17 18:41:16 +0100 |
commit | 592aae4f924cfe1f3a3364d5e01a13bd005f8e82 (patch) | |
tree | 7f824155cdc55840d11b668883ccf2f63d2d9807 /test/e2e/run_test.go | |
parent | 1c873c7da8b5fddf02d512826ab7f728fc0b6111 (diff) | |
download | podman-592aae4f924cfe1f3a3364d5e01a13bd005f8e82.tar.gz podman-592aae4f924cfe1f3a3364d5e01a13bd005f8e82.tar.bz2 podman-592aae4f924cfe1f3a3364d5e01a13bd005f8e82.zip |
test: fix test for last crun/runc
there was a documentation issue for the kernel that reported the range
to be different than on cgroup v1.
The issue has been fixed in crun/runc. Adapt the test.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r-- | test/e2e/run_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index be2fb926f..366ba666c 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -584,11 +584,13 @@ USER bin` } } if CGROUPSV2 { - // convert linearly from [10-1000] to [1-10000] session := podmanTest.Podman([]string{"run", "--rm", "--blkio-weight=15", ALPINE, "sh", "-c", "cat /sys/fs/cgroup/io.bfq.weight"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - Expect(session.OutputToString()).To(ContainSubstring("51")) + // there was a documentation issue in the kernel that reported a different range [1-10000] for the io controller. + // older versions of crun/runc used it. For the time being allow both versions to pass the test. + // FIXME: drop "|51" once all the runtimes we test have the fix in place. + Expect(strings.Replace(session.OutputToString(), "default ", "", 1)).To(MatchRegexp("15|51")) } else { session := podmanTest.Podman([]string{"run", "--rm", "--blkio-weight=15", ALPINE, "cat", "/sys/fs/cgroup/blkio/blkio.weight"}) session.WaitWithDefaultTimeout() |