mirror of
https://github.com/containers/podman.git
synced 2025-06-24 03:08:13 +08:00
Skip blkio-weight test when no kernel BFQ support
Namely the Ubuntu 21.04 Kernel does not support BFQ. Regardless of the distro. skip this test if the required cgroup node doesn't exist. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -582,6 +582,9 @@ USER bin`, BB)
|
||||
if _, err := os.Stat("/sys/fs/cgroup/io.stat"); os.IsNotExist(err) {
|
||||
Skip("Kernel does not have io.stat")
|
||||
}
|
||||
if _, err := os.Stat("/sys/fs/cgroup/system.slice/io.bfq.weight"); os.IsNotExist(err) {
|
||||
Skip("Kernel does not support BFQ IO scheduler")
|
||||
}
|
||||
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))
|
||||
|
Reference in New Issue
Block a user