Skip to content

Commit 2764304

Browse files
committed
adaptation: add linux memory policy test.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
1 parent 9f3d9db commit 2764304

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

pkg/adaptation/adaptation_suite_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,11 @@ var _ = Describe("Plugin container creation adjustments", func() {
570570
case "linux sysctl":
571571
a.SetLinuxSysctl("net.core.somaxconn", "256")
572572

573+
case "linux memory policy":
574+
a.SetLinuxMemoryPolicy(
575+
api.MpolMode_MPOL_INTERLEAVE, "0,1", api.MpolFlag_MPOL_F_STATIC_NODES,
576+
)
577+
573578
case "resources/cpu":
574579
a.SetLinuxCPUShares(123)
575580
a.SetLinuxCPUQuota(456)
@@ -866,6 +871,20 @@ var _ = Describe("Plugin container creation adjustments", func() {
866871
},
867872
),
868873

874+
Entry("adjust linux memory policy", "linux memory policy",
875+
&api.ContainerAdjustment{
876+
Linux: &api.LinuxContainerAdjustment{
877+
MemoryPolicy: &api.LinuxMemoryPolicy{
878+
Mode: api.MpolMode_MPOL_INTERLEAVE,
879+
Nodes: "0,1",
880+
Flags: []api.MpolFlag{
881+
api.MpolFlag_MPOL_F_STATIC_NODES,
882+
},
883+
},
884+
},
885+
},
886+
),
887+
869888
Entry("adjust CPU resources", "resources/cpu",
870889
&api.ContainerAdjustment{
871890
Linux: &api.LinuxContainerAdjustment{

0 commit comments

Comments
 (0)