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:
parent
3148e01651
commit
7e90bcbb9a
|
|
@ -582,6 +582,9 @@ USER bin`, BB)
|
||||||
if _, err := os.Stat("/sys/fs/cgroup/io.stat"); os.IsNotExist(err) {
|
if _, err := os.Stat("/sys/fs/cgroup/io.stat"); os.IsNotExist(err) {
|
||||||
Skip("Kernel does not have io.stat")
|
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 := podmanTest.Podman([]string{"run", "--rm", "--blkio-weight=15", ALPINE, "sh", "-c", "cat /sys/fs/cgroup/io.bfq.weight"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue