Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def clean_up_migration_jobs(client, vm):

def get_os_cpu_count(vm):
if "windows" in vm.name:
cmd = shlex.split("echo %NUMBER_OF_PROCESSORS%")
cmd = shlex.split('powershell.exe -command "[Environment]::ProcessorCount"')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Execution Plan

Run smoke tests: False
(No dependency path found from any @pytest.mark.smoke test to get_os_cpu_count in tests/utils.py)

Affected Tests

The change only affects the Windows VM branch of get_os_cpu_count. Target Windows CPU hotplug tests specifically:

  • tests/virt/node/hotplug/test_cpu_memory_hotplug.py — filter with -k "test_hotplug_cpu and WIN"
  • tests/infrastructure/instance_types/test_cpu_memory_hotplug_instancetype.py::TestCPUHotPlugInstanceType::test_hotplug_cpu_instance_type
  • tests/virt/node/migration_and_maintenance/test_post_copy_migration.py — filter with -k "test_hotplug_cpu and WIN"

Note: Linux VMs are unaffected (the else: nproc branch is unchanged).

else:
cmd = shlex.split("nproc")
return int(run_ssh_commands(host=vm.ssh_exec, commands=cmd)[0].strip())
Expand Down