From 67a5007106c59a3d2e6286276a25de0019e7463d Mon Sep 17 00:00:00 2001 From: Qingtang Zhou Date: Tue, 14 May 2013 17:44:09 +0800 Subject: [PATCH] qemu.tests.qemu_guest_agent: Update test steps for reboot test This patch adds one more login step for qemu guest agent reboot testing, to verify if the guest works well after reboot. Signed-off-by: Qingtang Zhou --- qemu/tests/qemu_guest_agent.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/qemu/tests/qemu_guest_agent.py b/qemu/tests/qemu_guest_agent.py index 439dfba2..b15e5c85 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 -- GitLab