Skip to content

Commit 8d81b05

Browse files
committed
e2e: update expected cpu.weight
The opencontainers/cgroups package has updated the v1 shares -> v2 weight conversion to a more accurate formula.
1 parent c691718 commit 8d81b05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

e2e/cgroups/cgroups.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,11 @@ var resourceFlagTests = []resourceFlagTest{
615615
controllerV1: "cpu",
616616
resourceV1: "cpu.shares",
617617
expectV1: "123",
618-
// Cgroups v2 has a conversion from shares to weight:
619-
// weight = (1 + ((cpuShares-2)*9999)/262142)
618+
// Cgroups v2 has a conversion from shares to weight.
619+
// See https://github.com/opencontainers/cgroups/pull/20
620620
delegationV2: "cpu",
621621
resourceV2: "cpu.weight",
622-
expectV2: "5",
622+
expectV2: "20",
623623
},
624624
{
625625
name: "cpuset-cpus",

0 commit comments

Comments
 (0)