diff --git a/test/e2e_node/topology_manager_test.go b/test/e2e_node/topology_manager_test.go index 913fa8501f9..7784258845b 100644 --- a/test/e2e_node/topology_manager_test.go +++ b/test/e2e_node/topology_manager_test.go @@ -340,6 +340,13 @@ func runTopologyManagerPolicySuiteTests(f *framework.Framework) { var cpuCap, cpuAlloc int64 cpuCap, cpuAlloc, _ = getLocalNodeCPUDetails(f) + ginkgo.By(fmt.Sprintf("checking node CPU capacity (%d) and allocatable CPUs (%d)", cpuCap, cpuAlloc)) + + // Albeit even the weakest CI machines usually have 2 cpus, let's be extra careful and + // check explicitly. We prefer to skip than a false negative (and a failed test). + if cpuAlloc < 1 { + e2eskipper.Skipf("Skipping basic CPU Manager tests since CPU capacity < 2") + } ginkgo.By("running a non-Gu pod") runNonGuPodTest(f, cpuCap) @@ -347,14 +354,14 @@ func runTopologyManagerPolicySuiteTests(f *framework.Framework) { ginkgo.By("running a Gu pod") runGuPodTest(f, 1) - 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") } + ginkgo.By("running multiple Gu and non-Gu pods") + runMultipleGuNonGuPods(f, cpuCap, cpuAlloc) + ginkgo.By("running a Gu pod requesting multiple CPUs") runMultipleCPUGuPod(f)