From 2d1503dae35fc414e9ce3131deff131a2cf166b9 Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Wed, 2 Feb 2022 13:49:43 +0100 Subject: [PATCH] e2e: node: {cpu,topo}mgr: make logic on allocatable The existing cpu/topology manager tests correctly check for the node resources and skip if the detected resources are not enough to run the tests, to avoid false negatives. Unfortunately they do the check against the node capacity, while the correct approach is to check the allocatable resources. The existing check is correct only on a narrow set of cases; otherwise can still lead to false negatives. This PR fixes that. Signed-off-by: Francesco Romani --- test/e2e_node/topology_manager_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e_node/topology_manager_test.go b/test/e2e_node/topology_manager_test.go index 705545b87b0..d6cd39ebf54 100644 --- a/test/e2e_node/topology_manager_test.go +++ b/test/e2e_node/topology_manager_test.go @@ -351,8 +351,8 @@ func runTopologyManagerPolicySuiteTests(f *framework.Framework) { ginkgo.By("running multiple Gu and non-Gu pods") runMultipleGuNonGuPods(f, cpuCap, cpuAlloc) - // Skip rest of the tests if CPU capacity < 3. - if cpuCap < 3 { + // Skip rest of the tests if CPU allocatable < 3. + if cpuAlloc < 3 { e2eskipper.Skipf("Skipping rest of the CPU Manager tests since CPU capacity < 3") }