Merge pull request #107915 from fromanirh/e2e-tm-cpum-check-node-allocatable

E2E: {cpu,topology} manager: improve debuggability
This commit is contained in:
Kubernetes Prow Robot 2022-02-02 10:40:18 -08:00 committed by GitHub
commit 2d0fa78f2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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