helpers.bats: cgroups_cpu_burst: check kernel version

On cgroup v2, cpu burst needs kernel >= 5.14
https://github.com/torvalds/linux/commit/f4183717b370ad28dd0c0d74760142b20e6e7931

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2023-12-15 12:52:28 +09:00
parent d618c6fe84
commit 758b2e2bda
+2
View File
@@ -465,6 +465,8 @@ function requires() {
p="$CGROUP_CPU_BASE_PATH"
f="cpu.cfs_burst_us"
elif [ -v CGROUP_V2 ]; then
# https://github.com/torvalds/linux/commit/f4183717b370ad28dd0c0d74760142b20e6e7931
requires_kernel 5.14
p="$CGROUP_BASE_PATH"
f="cpu.max.burst"
fi