KVM-test: subtest migrate: Use 'wait_for_login' to log into migrated guest
PATCH 1/1 KVM-test: subtest migrate: Use 'wait_for_login' to log into migrated guest
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 <[email protected]>
--- client/tests/kvm/kvm_test_utils.py | 1 + client/tests/kvm/tests/migration.py | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-)
client/tests/kvm/kvm_test_utils.py +1 -0
@@ -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:
client/tests/kvm/tests/migration.py +2 -5
@@ -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:
Signature · 1 line
1.6.6