[KVM-AUTOTEST PATCH 15/17] KVM test: use VM.migrate() instead of kvm_test_utils.migrate()

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

 



Signed-off-by: Michael Goldish <mgoldish@xxxxxxxxxx>
---
 client/tests/kvm/tests/migration.py                |    7 +++----
 client/tests/kvm/tests/migration_multi_host.py     |    3 +--
 client/tests/kvm/tests/timedrift_with_migration.py |    2 +-
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/client/tests/kvm/tests/migration.py b/client/tests/kvm/tests/migration.py
index 76cbcfc..d6dc1b0 100644
--- a/client/tests/kvm/tests/migration.py
+++ b/client/tests/kvm/tests/migration.py
@@ -26,7 +26,7 @@ def run_migration(test, params, env):
 
     mig_timeout = float(params.get("mig_timeout", "3600"))
     mig_protocol = params.get("migration_protocol", "tcp")
-    mig_cancel = bool(params.get("mig_cancel"))
+    mig_cancel_delay = int(params.get("mig_cancel") == "yes") * 2
     offline = params.get("offline", "no") == "yes"
     check = params.get("vmstate_check", "no") == "yes"
 
@@ -49,12 +49,11 @@ def run_migration(test, params, env):
         session2.close()
 
         # Migrate the VM
-        dest_vm = kvm_test_utils.migrate(vm, env,mig_timeout, mig_protocol,
-                                         mig_cancel, offline, check)
+        vm.migrate(mig_timeout, mig_protocol, mig_cancel_delay, offline, check)
 
         # Log into the guest again
         logging.info("Logging into guest after migration...")
-        session2 = dest_vm.wait_for_login(timeout=30)
+        session2 = vm.wait_for_login(timeout=30)
         logging.info("Logged in after migration")
 
         # Make sure the background process is still running
diff --git a/client/tests/kvm/tests/migration_multi_host.py b/client/tests/kvm/tests/migration_multi_host.py
index 12d70ef..7647af4 100644
--- a/client/tests/kvm/tests/migration_multi_host.py
+++ b/client/tests/kvm/tests/migration_multi_host.py
@@ -67,8 +67,7 @@ def run_migration_multi_host(test, params, env):
         c_socket.close()
 
         logging.info("Start migrating now...")
-        kvm_test_utils.migrate(vm=vm, dest_host=dsthost, mig_port=mig_port,
-                               env=env)
+        vm.migrate(dest_host=dsthost, remote_port=mig_port)
 
         # Wait up to 30 seconds for dest to reach this point
         test.job.barrier(srchost, 'mig_finished', 30).rendezvous(srchost,
diff --git a/client/tests/kvm/tests/timedrift_with_migration.py b/client/tests/kvm/tests/timedrift_with_migration.py
index b8d3e6c..66e8fde 100644
--- a/client/tests/kvm/tests/timedrift_with_migration.py
+++ b/client/tests/kvm/tests/timedrift_with_migration.py
@@ -48,7 +48,7 @@ def run_timedrift_with_migration(test, params, env):
             # Run current iteration
             logging.info("Migrating: iteration %d of %d..." %
                          (i + 1, migration_iterations))
-            vm = kvm_test_utils.migrate(vm, env)
+            vm.migrate()
             # Log in
             logging.info("Logging in after migration...")
             session = vm.wait_for_login(timeout=30)
-- 
1.7.3.4

--
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