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 <fromani@redhat.com>
This commit is contained in:
Francesco Romani 2022-02-02 13:49:43 +01:00
parent 60585da68f
commit 2d1503dae3

View File

@ -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")
}