From 666dec8c2f6ebe9b3a49713e0549cb3c4ccda3c9 Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Mon, 11 Aug 2025 11:02:16 +0200 Subject: [PATCH] e2e: node: cpumgr: remove old reserved cpus tests superseded by code in cpumanager_test.go, which will be moved in cpu_manager_test.go at the end of this series. Split to make the review easier. Signed-off-by: Francesco Romani --- test/e2e_node/cpu_manager_test.go | 50 ------------------------------- 1 file changed, 50 deletions(-) diff --git a/test/e2e_node/cpu_manager_test.go b/test/e2e_node/cpu_manager_test.go index 3139d754fca..4704e46b25d 100644 --- a/test/e2e_node/cpu_manager_test.go +++ b/test/e2e_node/cpu_manager_test.go @@ -136,56 +136,6 @@ func runCPUManagerTests(f *framework.Framework) { runAutomaticallyRemoveInactivePodsFromCPUManagerStateFile(ctx, f) }) - ginkgo.It("reservedSystemCPUs are excluded only for Gu pods (strict-cpu-reservation option not enabled by default)", func(ctx context.Context) { - cpuCap, cpuAlloc, _ = getLocalNodeCPUDetails(ctx, f) - - // Skip CPU Manager tests altogether if the CPU capacity < 2. - if cpuCap < 2 { - e2eskipper.Skipf("Skipping CPU Manager tests since the CPU capacity < 2") - } - - reservedSystemCPUs := cpuset.New(0) - newCfg := configureCPUManagerInKubelet(oldCfg, &cpuManagerKubeletArguments{ - policyName: string(cpumanager.PolicyStatic), - reservedSystemCPUs: reservedSystemCPUs, - }) - updateKubeletConfig(ctx, f, newCfg, true) - - ginkgo.By("running a Gu pod - it shouldn't use reserved system CPUs") - runGuPodTest(ctx, f, 1, reservedSystemCPUs) - - ginkgo.By("running a non-Gu pod - it can use reserved system CPUs") - runNonGuPodTest(ctx, f, cpuCap, cpuset.New()) - - }) - - ginkgo.It("reservedSystemCPUs are excluded for both Gu and non-Gu pods (strict-cpu-reservation option enabled)", func(ctx context.Context) { - cpuCap, cpuAlloc, _ = getLocalNodeCPUDetails(ctx, f) - - // Skip CPU Manager tests altogether if the CPU capacity < 2. - if cpuCap < 2 { - e2eskipper.Skipf("Skipping CPU Manager tests since the CPU capacity < 2") - } - - reservedSystemCPUs := cpuset.New(0) - cpuPolicyOptions := map[string]string{ - cpumanager.StrictCPUReservationOption: "true", - } - newCfg := configureCPUManagerInKubelet(oldCfg, &cpuManagerKubeletArguments{ - policyName: string(cpumanager.PolicyStatic), - reservedSystemCPUs: reservedSystemCPUs, - enableCPUManagerOptions: true, - options: cpuPolicyOptions, - }) - updateKubeletConfig(ctx, f, newCfg, true) - - ginkgo.By("running a Gu pod - it shouldn't use reserved system CPUs") - runGuPodTest(ctx, f, 1, reservedSystemCPUs) - - ginkgo.By("running a non-Gu pod - it shouldn't use reserved system CPUs with strict-cpu-reservation option enabled") - runNonGuPodTest(ctx, f, cpuCap, reservedSystemCPUs) - }) - f.It("should not reuse CPUs of restartable init containers", feature.SidecarContainers, func(ctx context.Context) { cpuCap, cpuAlloc, _ = getLocalNodeCPUDetails(ctx, f)