mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Extend Windows guest CPU hotplug test and update doc
Both changes aim to document the absence of the CPU hot-remove functionality on Windows. Closes #2457. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
e5211a6e1d
commit
3f5ecbd326
@@ -5784,6 +5784,27 @@ mod tests {
|
||||
// Check the CH process has the correct number of vcpu threads
|
||||
assert_eq!(get_vcpu_threads_count(child.id()), vcpu_num);
|
||||
|
||||
let vcpu_num = 4;
|
||||
// Remove some CPUs. Note that Windows doesn't support hot-remove.
|
||||
resize_command(&api_socket, Some(vcpu_num), None, None);
|
||||
// Wait to make sure CPUs are removed
|
||||
thread::sleep(std::time::Duration::new(10, 0));
|
||||
// Reboot to let Windows catch up
|
||||
ssh_command_ip_with_auth(
|
||||
"shutdown /r /t 0",
|
||||
&auth,
|
||||
"192.168.249.2",
|
||||
DEFAULT_SSH_RETRIES,
|
||||
DEFAULT_SSH_TIMEOUT,
|
||||
)
|
||||
.unwrap();
|
||||
// Wait to make sure Windows completely rebooted
|
||||
thread::sleep(std::time::Duration::new(60, 0));
|
||||
// Check the guest sees the correct number
|
||||
assert_eq!(get_cpu_count_windows(&auth), vcpu_num);
|
||||
// Check the CH process has the correct number of vcpu threads
|
||||
assert_eq!(get_vcpu_threads_count(child.id()), vcpu_num);
|
||||
|
||||
ssh_command_ip_with_auth(
|
||||
"shutdown /s",
|
||||
&auth,
|
||||
|
||||
Reference in New Issue
Block a user