From 30da570ae1ee14204fdaea0e8bdc50c57456bd63 Mon Sep 17 00:00:00 2001 From: Yihuang Yu Date: Mon, 10 Aug 2020 19:41:28 +0800 Subject: [PATCH] cpu_device_hotplug_maximum: Update unplug verification timeout 1. Update unplug verification timeout 2. Set "allow_pcpu_overcommit = no" since overcommit on a single guest is not a positive scenario. Signed-off-by: Yihuang Yu --- qemu/tests/cfg/cpu_device_hotplug_maximum.cfg | 2 +- qemu/tests/cpu_device_hotplug_maximum.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu/tests/cfg/cpu_device_hotplug_maximum.cfg b/qemu/tests/cfg/cpu_device_hotplug_maximum.cfg index 4e4c2068..95c606da 100644 --- a/qemu/tests/cfg/cpu_device_hotplug_maximum.cfg +++ b/qemu/tests/cfg/cpu_device_hotplug_maximum.cfg @@ -7,7 +7,7 @@ required_qemu = [2.6.0, ) start_vm = no qemu_sandbox = on - allow_pcpu_overcommit = yes + allow_pcpu_overcommit = no # Require long time to reboot if CPU overcommit reboot_timeout = 360 vcpu_maxcpus = 0 diff --git a/qemu/tests/cpu_device_hotplug_maximum.py b/qemu/tests/cpu_device_hotplug_maximum.py index ad71e82d..bab013a2 100644 --- a/qemu/tests/cpu_device_hotplug_maximum.py +++ b/qemu/tests/cpu_device_hotplug_maximum.py @@ -72,6 +72,7 @@ def run(test, params, env): session = vm.wait_for_login() cpuinfo = vm.cpuinfo smp = cpuinfo.smp + vcpus_count = vm.params.get_numeric("vcpus_count") error_context.context("Hotplug all vCPU devices", logging.info) for vcpu_device in vcpu_devices: @@ -93,7 +94,7 @@ def run(test, params, env): error_context.context("Hotunplug all vCPU devices", logging.info) for vcpu_device in reversed(vcpu_devices): - vm.hotunplug_vcpu_device(vcpu_device) + vm.hotunplug_vcpu_device(vcpu_device, 10 * vcpus_count) if not utils_misc.wait_for(lambda: vm.get_cpu_count() == smp, verify_wait_timeout, first=5, step=10): logging.error(not_equal_text, vm.get_cpu_count(), smp) -- GitLab