mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +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
|
||||
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user