Skip to content

Commit 17cd12f

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

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
@@ -557,6 +557,11 @@ var _ = Describe("Plugin container creation adjustments", func() {
557557
Policy: api.LinuxSchedulerPolicy_SCHED_NONE,
558558
})
559559

560+
case "linux memory policy":
561+
a.SetLinuxMemoryPolicy(
562+
api.MpolMode_MPOL_INTERLEAVE, "0,1", api.MpolFlag_MPOL_F_STATIC_NODES,
563+
)
564+
560565
case "resources/cpu":
561566
a.SetLinuxCPUShares(123)
562567
a.SetLinuxCPUQuota(456)
@@ -846,6 +851,20 @@ var _ = Describe("Plugin container creation adjustments", func() {
846851
},
847852
),
848853

854+
Entry("adjust linux memory policy", "linux memory policy",
855+
&api.ContainerAdjustment{
856+
Linux: &api.LinuxContainerAdjustment{
857+
MemoryPolicy: &api.LinuxMemoryPolicy{
858+
Mode: api.MpolMode_MPOL_INTERLEAVE,
859+
Nodes: "0,1",
860+
Flags: []api.MpolFlag{
861+
api.MpolFlag_MPOL_F_STATIC_NODES,
862+
},
863+
},
864+
},
865+
},
866+
),
867+
849868
Entry("adjust CPU resources", "resources/cpu",
850869
&api.ContainerAdjustment{
851870
Linux: &api.LinuxContainerAdjustment{

0 commit comments

Comments
 (0)