Skip to content

Commit d14c97a

Browse files
committed
windows: Add guest agent reporting tests
Test that the distro reporting and clipboard watch feature are still working after device unplug or suspend events. Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>
1 parent 39a4a79 commit d14c97a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/guest_tools/win/test_guest_tools_win.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
from lib.windows import (
1010
WINDOWS_SHUTDOWN_COMMAND,
1111
PowerAction,
12+
check_vm_clipboard,
13+
check_vm_distro,
1214
check_vm_dns,
1315
set_vm_dns,
1416
vif_has_rss,
@@ -95,6 +97,26 @@ def test_rss(self, vm_install_test_tools_per_test_class: VM):
9597
for vif in vifs:
9698
assert vif_has_rss(vif)
9799

100+
def test_reporting_after_xeniface_disable(self, vm_install_test_tools_per_test_class: VM):
101+
vm = vm_install_test_tools_per_test_class
102+
for _iter in range(3):
103+
logging.info("Disable Xeniface")
104+
vm.execute_powershell_script(r'Disable-PnpDevice "XENBUS\VEN_XN&DEV_IFACE\_" -Confirm:$false')
105+
vm.xenstore_rm("data/os_distro", accept_unknown_key=True)
106+
logging.info("Enable Xeniface")
107+
vm.execute_powershell_script(r'Enable-PnpDevice "XENBUS\VEN_XN&DEV_IFACE\_" -Confirm:$false')
108+
check_vm_distro(vm)
109+
check_vm_clipboard(vm)
110+
111+
def test_reporting_after_suspend(self, vm_install_test_tools_per_test_class: VM):
112+
vm = vm_install_test_tools_per_test_class
113+
for _iter in range(3):
114+
vm.suspend(verify=True)
115+
vm.resume()
116+
wait_for_vm_running_and_ssh_up_without_tools(vm)
117+
check_vm_distro(vm)
118+
check_vm_clipboard(vm)
119+
98120

99121
@pytest.mark.multi_vms
100122
@pytest.mark.usefixtures("windows_vm")

0 commit comments

Comments
 (0)