From e9d5027acc185a53fcf9cfc1dbcec3d487018e8f Mon Sep 17 00:00:00 2001 From: Yingshun Cui Date: Mon, 23 Oct 2023 10:49:11 +0800 Subject: [PATCH] vdpa: Fixup 'save' related failures The vDPA interface starts to support save/restore, so updating the cases. Signed-off-by: Yingshun Cui --- .../lifecycle/lifecycle_vdpa_interface.cfg | 1 - .../lifecycle/lifecycle_vdpa_interface.py | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/libvirt/tests/cfg/virtual_network/lifecycle/lifecycle_vdpa_interface.cfg b/libvirt/tests/cfg/virtual_network/lifecycle/lifecycle_vdpa_interface.cfg index a145e619d4..15ab0814e3 100644 --- a/libvirt/tests/cfg/virtual_network/lifecycle/lifecycle_vdpa_interface.cfg +++ b/libvirt/tests/cfg/virtual_network/lifecycle/lifecycle_vdpa_interface.cfg @@ -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: diff --git a/libvirt/tests/src/virtual_network/lifecycle/lifecycle_vdpa_interface.py b/libvirt/tests/src/virtual_network/lifecycle/lifecycle_vdpa_interface.py index d3d2aabc2c..9ef792c9b3 100644 --- a/libvirt/tests/src/virtual_network/lifecycle/lifecycle_vdpa_interface.py +++ b/libvirt/tests/src/virtual_network/lifecycle/lifecycle_vdpa_interface.py @@ -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)