From 592aae4f924cfe1f3a3364d5e01a13bd005f8e82 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 17 Mar 2021 16:39:01 +0100 Subject: 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 --- test/e2e/run_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/e2e/run_test.go') 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() -- cgit v1.2.3-54-g00ecf