Skip to content

Commit

Permalink
vioser_in_use.py: change logic of 'memory leak check' location
Browse files Browse the repository at this point in the history
change logic of 'memory leak check' location for some serial case

Signed-off-by: demeng <[email protected]>
  • Loading branch information
6-dehan committed Jul 6, 2023
1 parent 4cc4a7d commit a958c85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions qemu/tests/vioser_in_use.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ def vcpu_hotplug_guest(test, params, vm, session):
vm.hotplug_vcpu_device(vcpu_id=vcpu_device)
# make the cpu hotplug has slot during data transfer
time.sleep(2)
if params.get("os_type") == "windows":
win_driver_utils.memory_leak_check(vm, test, params)


@error_context.context_aware
Expand Down Expand Up @@ -148,6 +146,11 @@ def run(test, params, env):
error_context.context("Check if guest is alive.", test.log.info)
vm.verify_kernel_crash()
session = vm.wait_for_login(timeout=timeout)
if params.get("memory_leak_check", "no") == "yes":
# for windows guest, disable/uninstall driver to get memory leak based on
# driver verifier is enabled
if params.get("os_type") == "windows":
win_driver_utils.memory_leak_check(vm, test, params)
session.close()
return

Expand Down
2 changes: 0 additions & 2 deletions qemu/tests/virtio_serial_hotplug_port_pci.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,4 @@ def run_serial_data_transfer():
# for windows guest, disable/uninstall driver to get memory leak based on
# driver verifier is enabled
if params.get("os_type") == "windows":
vm.devices.simple_hotplug(buses[0], vm.monitor)
vm.devices.simple_hotplug(serial_devices[0], vm.monitor)
win_driver_utils.memory_leak_check(vm, test, params)

0 comments on commit a958c85

Please sign in to comment.