Skip to content

Commit

Permalink
Merge pull request #5229 from Yingshun/vdpa_save
Browse files Browse the repository at this point in the history
vdpa: Fixup 'save' related failures
  • Loading branch information
chloerh authored Oct 26, 2023
2 parents b3e185d + e9d5027 commit 2c756a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
func_supported_since_libvirt_ver = (7, 3, 0)
func_supported_since_qemu_kvm_ver = (6, 0, 0)
iface_dict = {"source": {'dev':'/dev/vhost-vdpa-0'}}
save_error = "yes"
variants test_target:
- simulator:
- mellanox:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,12 @@ def run_test(dev_type, params, test_obj=None):
vm, test_obj=test_obj, config_vdpa=True, **params)

test.log.info("Save the VM.")
save_error = "yes" == params.get("save_error", "no")
save_path = os.path.join(data_dir.get_tmp_dir(), vm.name + '.save')
res = virsh.save(vm.name, save_path, debug=True)
libvirt.check_exit_status(res, expect_error=save_error)
if not save_error:
test.log.info("Restore vm.")
virsh.restore(save_path, **VIRSH_ARGS)
check_points.check_network_accessibility(
vm, test_obj=test_obj, config_vdpa=False, **params)
virsh.save(vm.name, save_path, **VIRSH_ARGS)
test.log.info("Restore vm.")
virsh.restore(save_path, **VIRSH_ARGS)
check_points.check_network_accessibility(
vm, test_obj=test_obj, config_vdpa=False, **params)

test.log.info("Suspend and resume the vm.")
virsh.suspend(vm.name, **VIRSH_ARGS)
Expand Down

0 comments on commit 2c756a2

Please sign in to comment.