mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #107915 from fromanirh/e2e-tm-cpum-check-node-allocatable
E2E: {cpu,topology} manager: improve debuggability
This commit is contained in:
commit
2d0fa78f2f
@ -340,6 +340,13 @@ func runTopologyManagerPolicySuiteTests(f *framework.Framework) {
|
|||||||
var cpuCap, cpuAlloc int64
|
var cpuCap, cpuAlloc int64
|
||||||
|
|
||||||
cpuCap, cpuAlloc, _ = getLocalNodeCPUDetails(f)
|
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")
|
ginkgo.By("running a non-Gu pod")
|
||||||
runNonGuPodTest(f, cpuCap)
|
runNonGuPodTest(f, cpuCap)
|
||||||
@ -347,14 +354,14 @@ func runTopologyManagerPolicySuiteTests(f *framework.Framework) {
|
|||||||
ginkgo.By("running a Gu pod")
|
ginkgo.By("running a Gu pod")
|
||||||
runGuPodTest(f, 1)
|
runGuPodTest(f, 1)
|
||||||
|
|
||||||
ginkgo.By("running multiple Gu and non-Gu pods")
|
// Skip rest of the tests if CPU allocatable < 3.
|
||||||
runMultipleGuNonGuPods(f, cpuCap, cpuAlloc)
|
if cpuAlloc < 3 {
|
||||||
|
|
||||||
// Skip rest of the tests if CPU capacity < 3.
|
|
||||||
if cpuCap < 3 {
|
|
||||||
e2eskipper.Skipf("Skipping rest of the CPU Manager tests since CPU capacity < 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")
|
ginkgo.By("running a Gu pod requesting multiple CPUs")
|
||||||
runMultipleCPUGuPod(f)
|
runMultipleCPUGuPod(f)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user