diff --git a/qemu/tests/qemu_guest_agent.py b/qemu/tests/qemu_guest_agent.py index 439dfba2db756cd9d4c89caa607a95a496481a50..b15e5c85ce5f059a8cd009d9c33975bf4b1387ba 100644 --- a/qemu/tests/qemu_guest_agent.py +++ b/qemu/tests/qemu_guest_agent.py @@ -282,13 +282,19 @@ class QemuGuestAgentBasicCheck(QemuGuestAgentTest): @param env: Dictionary with test environmen. """ self.__gagent_check_shutdown(self.gagent.SHUTDOWN_MODE_REBOOT) - # XXX: This way of checking if VM is rebooted can only work with - # Linux guest, is there any way to check windows guest reboot? pattern = params["gagent_guest_reboot_pattern"] error.context("Verify serial output has '%s'" % pattern) rebooted = self.__gagent_check_serial_output(pattern) if not rebooted: raise error.TestFail("Could not reboot VM via guest agent") + error.context("Try to re-login to guest after reboot") + try: + session = self._get_session(self.params, None) + session.close() + except Exception, detail: + raise error.TestFail("Could not login to guest," + " detail: '%s'" % detail) + @error.context_aware