mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
vmm: config: Enhance test_cpu_parsing to add "affinity" parameter
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
71a7d5d85e
commit
ea58d2f68a
@ -2738,6 +2738,25 @@ mod tests {
|
||||
..Default::default()
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
CpusConfig::parse("boot=2,affinity=[0@[0,2],1@[1,3]]")?,
|
||||
CpusConfig {
|
||||
boot_vcpus: 2,
|
||||
max_vcpus: 2,
|
||||
affinity: Some(vec![
|
||||
CpuAffinity {
|
||||
vcpu: 0,
|
||||
host_cpus: vec![0, 2],
|
||||
},
|
||||
CpuAffinity {
|
||||
vcpu: 1,
|
||||
host_cpus: vec![1, 3],
|
||||
}
|
||||
]),
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user