Change:
Which jobs are failing: N/A - AFAICT CI jobs works fine Which test(s) are failing: Since when has it been failing: no historical record on CI Testgrid link: N/A Reason for failure: I believe the tests make too many assumptions around the hardware, and the code is actually OK. to be confirmed. Anything else we need to know:
/sig node /sig testing
also affects the recently topology manager e2e tests. My PR uses a different approach to check resource alignment so is not affected. /cc
I'll work on a PR to fix this issue ASAP
Thanks for opening this issue. We knew about this, just had not opened an issue to track it, so thanks for doing that! Deepthi has been looing at CPU Manager tests, not sure if she has some PR in progress or not. I'll make sure to forward this to her (can find her user id here ....) in case she has something in progress

Discussion:
return threadsPerCore > 1 } <ins> func isMultiNUMA() bool { outData, err := exec.Command("/bin/sh", "-c", "lscpu | grep "NUMA node(s):" | cut -d ":" -f 2").Output() framework.ExpectNoError(err) numaNodes, err := strconv.Atoi(strings.TrimSpace(string(outData))) framework.ExpectNoError(err) return numaNodes > 1 } </ins> func getCPUSiblingList(cpuRes int64) string { out, err := exec.Command("/bin/sh", "-c", fmt.Sprintf("cat /sys/devices/system/cpu/cpu%d/topology/thread_siblings_list | tr -d "nr"", cpuRes)).Output() framework.ExpectNoError(err) return string(out) } <ins> func getCoreSiblingList(cpuRes int64) string { out, err := exec.Command("/bin/sh", "-c", fmt.Sprintf("cat /sys/devices/system/cpu/cpu%d/topology/core_siblings_list | tr -d "nr"", cpuRes)).Output() framework.ExpectNoError(err) return string(out) } </ins> func deleteStateFile() { err := exec.Command("/bin/sh", "-c", "rm -f /var/lib/kubelet/cpu_manager_state").Run() framework.ExpectNoError(err, "error deleting state file")

if isHTEnabled() { cpuList = cpuset.MustParse(getCPUSiblingList(0)).ToSlice() cpu1 = cpuList[1] <ins> } else if isMultiNUMA() { cpuList = cpuset.MustParse(getCoreSiblingList(0)).ToSlice() cpu1 = cpuList[1] </ins> } expAllowedCPUsListRegex = fmt.Sprintf("^%dn$", cpu1) err = f.PodClient().MatchContainerOutput(pod1.Name, pod1.Spec.Containers[0].Name, expAllowedCPUsListRegex)

ginkgo.By("checking if the expected cpuset was assigned") cpuListString = "1-2" <del> if isHTEnabled() { </del> <ins> if isMultiNUMA() { cpuList = cpuset.MustParse(getCoreSiblingList(0)).ToSlice() if !isHTEnabled() { cset = cpuset.MustParse(fmt.Sprintf("%d,%d", cpuList[1], cpuList[2])) } else { cset = cpuset.MustParse(getCPUSiblingList(int64(cpuList[1]))) } cpuListString = fmt.Sprintf("%s", cset) } else if isHTEnabled() { </ins> cpuListString = "2-3" cpuList = cpuset.MustParse(getCPUSiblingList(0)).ToSlice() if cpuList[1] != 1 {

if cpuList[1] != 1 { cpu1, cpu2 = cpuList[1], 1 } <ins> if isMultiNUMA() { cpuList = cpuset.MustParse(getCoreSiblingList(0)).ToSlice() cpu2 = cpuList[1] } } else if isMultiNUMA() { cpuList = cpuset.MustParse(getCoreSiblingList(0)).ToSlice() cpu1, cpu2 = cpuList[1], cpuList[2] </ins> } expAllowedCPUsListRegex = fmt.Sprintf("^%d|%dn$", cpu1, cpu2) err = f.PodClient().MatchContainerOutput(pod.Name, pod.Spec.Containers[0].Name, expAllowedCPUsListRegex) framework.ExpectNoError(err, "expected log not found in container [%s] of pod [%s]",

if cpuList[1] != 1 { cpu1, cpu2 = cpuList[1], 1 } <ins> if isMultiNUMA() { cpuList = cpuset.MustParse(getCoreSiblingList(0)).ToSlice() cpu2 = cpuList[1] } } else if isMultiNUMA() { cpuList = cpuset.MustParse(getCoreSiblingList(0)).ToSlice() cpu1, cpu2 = cpuList[1], cpuList[2] </ins> } expAllowedCPUsListRegex = fmt.Sprintf("^%dn$", cpu1) err = f.PodClient().MatchContainerOutput(pod1.Name, pod1.Spec.Containers[0].Name, expAllowedCPUsListRegex) framework.ExpectNoError(err, "expected log not found in container [%s] of pod [%s]",

if isHTEnabled() { cpuList = cpuset.MustParse(getCPUSiblingList(0)).ToSlice() cpu1 = cpuList[1] <ins> } else if isMultiNUMA() { cpuList = cpuset.MustParse(getCoreSiblingList(0)).ToSlice() cpu1 = cpuList[1] </ins> } expAllowedCPUsListRegex = fmt.Sprintf("^%dn$", cpu1) err = f.PodClient().MatchContainerOutput(pod.Name, pod.Spec.Containers[0].Name, expAllowedCPUsListRegex)