[Autotest PATCH] KVM-test: subtest migrate: Use 'wait_for_login' to log into migrated guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Using 'wait_for' for logging into migrated guest repeats the work of
'wait_for_login' which exists already. We just need to change the name
of 'dest_vm'.

Signed-off-by: Yolkfull Chow <yzhou@xxxxxxxxxx>
---
 client/tests/kvm/kvm_test_utils.py  |    1 +
 client/tests/kvm/tests/migration.py |    7 ++-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/client/tests/kvm/kvm_test_utils.py b/client/tests/kvm/kvm_test_utils.py
index 02ec0cf..13af8e1 100644
--- a/client/tests/kvm/kvm_test_utils.py
+++ b/client/tests/kvm/kvm_test_utils.py
@@ -135,6 +135,7 @@ def migrate(vm, env=None):
 
     # Clone the source VM and ask the clone to wait for incoming migration
     dest_vm = vm.clone()
+    dest_vm.name = "migrated_guest"
     dest_vm.create(for_migration=True)
 
     try:
diff --git a/client/tests/kvm/tests/migration.py b/client/tests/kvm/tests/migration.py
index b8f171c..b65064b 100644
--- a/client/tests/kvm/tests/migration.py
+++ b/client/tests/kvm/tests/migration.py
@@ -46,11 +46,8 @@ def run_migration(test, params, env):
         dest_vm = kvm_test_utils.migrate(vm, env)
 
         # Log into the guest again
-        logging.info("Logging into guest after migration...")
-        session2 = kvm_utils.wait_for(dest_vm.remote_login, 30, 0, 2)
-        if not session2:
-            raise error.TestFail("Could not log into guest after migration")
-        logging.info("Logged in after migration")
+        session2 = kvm_test_utils.wait_for_login(dest_vm, timeout=30, start=0,
+                                                 step=2)
 
         # Make sure the background process is still running
         if session2.get_command_status(check_command, timeout=30) != 0:
-- 
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux