Skip to content

Commit 2cf63c6

Browse files
roypatbchalios
authored andcommitted
tests: Call wait_for_up in Microvm.restore_from_snapshot
After restoring a snapshot, we are not waiting for the VM to finish booting (it needs to have done that before we took a snapshot), but having a `wait_for_up` here is still a good sanity check for ensuring the VM is still responsive. So far our tests have been inconsistent on whether to put a `wait_for_up` here. This makes them consistent by always doing `wait_for_up` if a network device is available. Signed-off-by: Patrick Roy <[email protected]>
1 parent 9c303de commit 2cf63c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/framework/microvm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,9 @@ def restore_from_snapshot(
961961
enable_diff_snapshots=snapshot.is_diff,
962962
resume_vm=resume,
963963
)
964+
# This is not a "wait for boot", but rather a "VM still works after restoration"
965+
if snapshot.net_ifaces and resume:
966+
self.wait_for_up()
964967
return jailed_snapshot
965968

966969
def enable_entropy_device(self):

0 commit comments

Comments
 (0)