Files
cloud-hypervisor/test_infra
Muminul Islam 9059fb902d tests: Refactor test_cpu_affinity into reusable helper
Extract CPU affinity test logic from test_cpu_affinity into a
standalone _test_cpu_affinity helper that accepts a Guest
reference. The helper verifies the host has at least 4 CPUs,
boots a VM with affinity settings, and asserts vcpu0 is pinned
to cores 0,2 and vcpu1 to cores 1,3.

Add default_cpus_with_affinity_string() to Guest and
default_cpus_with_affinity() to GuestCommand in test_infra
to generate CPU arguments with affinity configuration.

Update the test_cpu_affinity call site in common_parallel to
use GuestFactory and delegate to the new helper, enabling
reuse with different guest types.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-19 16:17:28 +00:00
..