diff mbox

[KVM-AUTOTEST,04/26] KVM test: migrate_with_file_transfer: respect 'mig_cancel'

Message ID 1294751618-21631-4-git-send-email-mgoldish@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Goldish Jan. 11, 2011, 1:13 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/tests/migration_with_file_transfer.py b/client/tests/kvm/tests/migration_with_file_transfer.py
index 8a2cc77..58601b4 100644
--- a/client/tests/kvm/tests/migration_with_file_transfer.py
+++ b/client/tests/kvm/tests/migration_with_file_transfer.py
@@ -27,6 +27,7 @@  def run_migration_with_file_transfer(test, params, env):
 
     mig_timeout = float(params.get("mig_timeout", "3600"))
     mig_protocol = params.get("migration_protocol", "tcp")
+    mig_cancel_delay = int(params.get("mig_cancel") == "yes") * 2
 
     host_path = "/tmp/file-%s" % kvm_utils.generate_random_string(6)
     host_path_returned = "%s-returned" % host_path
@@ -44,7 +45,7 @@  def run_migration_with_file_transfer(test, params, env):
                 while bg.is_alive():
                     logging.info("File transfer not ended, starting a round of "
                                  "migration...")
-                    vm.migrate(mig_timeout, mig_protocol)
+                    vm.migrate(mig_timeout, mig_protocol, mig_cancel_delay)
             finally:
                 bg.join()