If fail to create dest VM, it should raise an exception. The migration should be
interrupted. Otherwise, the migration is ineffective.

Signed-off-by: Amos Kong <[email protected]>
---
 client/tests/kvm/kvm_test_utils.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/client/tests/kvm/kvm_test_utils.py 
b/client/tests/kvm/kvm_test_utils.py
index 564ff35..148b246 100644
--- a/client/tests/kvm/kvm_test_utils.py
+++ b/client/tests/kvm/kvm_test_utils.py
@@ -137,7 +137,8 @@ def migrate(vm, env=None):
 
     # Clone the source VM and ask the clone to wait for incoming migration
     dest_vm = vm.clone()
-    dest_vm.create(for_migration=True)
+    if not dest_vm.create(for_migration=True):
+        raise error.TestError("Could not create dest VM")
 
     try:
         # Define the migration command
-- 
1.6.6

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to