mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-02 07:02:16 +00:00
As pointed out in kata-containers/kata-containers#12961, the k8s-number-cpus retry loop could fail all retried assertions and still pass. k8s-number-cpus retried until the guest reported three CPUs, but the post-loop result was never checked. Bash suppresses errexit for the equality test before && break, so the test could exhaust retries and still pass. The current kata-qemu handler sizes vCPUs from fractional container quotas: two 500m limits produce one workload vCPU, then the default vCPU is added and rounded once. Expect two CPUs and assert the final retry result so the test fails if the count never converges. Signed-off-by: Manuel Huber <manuelh@nvidia.com> Assisted-by: OpenAI Codex <codex@openai.com>