diff --git a/libvirt/tests/cfg/virtual_network/update_device/unsupported_live_update_alter.cfg b/libvirt/tests/cfg/virtual_network/update_device/unsupported_live_update_alter.cfg index e8956d8f4f..b46a0c3b44 100644 --- a/libvirt/tests/cfg/virtual_network/update_device/unsupported_live_update_alter.cfg +++ b/libvirt/tests/cfg/virtual_network/update_device/unsupported_live_update_alter.cfg @@ -36,6 +36,7 @@ err_msg = cannot modify network device model from .* to .* - backend: extra_attrs = {'backend': {'tap': '/dev/net/tun', 'vhost': '/dev/vhost-net'}} + tmp_attrs = {'backend': None} update_attrs = {'backend': {'tap': '/dev/net/tun'}} err_msg = cannot modify network device backend settings - driver: diff --git a/libvirt/tests/cfg/virtual_network/update_device/unsupported_live_update_delete.cfg b/libvirt/tests/cfg/virtual_network/update_device/unsupported_live_update_delete.cfg index 07bd0d2903..faa80241ca 100644 --- a/libvirt/tests/cfg/virtual_network/update_device/unsupported_live_update_delete.cfg +++ b/libvirt/tests/cfg/virtual_network/update_device/unsupported_live_update_delete.cfg @@ -27,10 +27,6 @@ extra_attrs = {'rom': {'enabled': 'no'}} del_attr = rom err_msg = cannot modify network device rom enabled setting - - target_dev: - extra_attrs = {'target': {'dev': 'test'}} - del_attr = target - err_msg = cannot modify network device tap name - model_type: del_attr = model err_msg = cannot modify network device model from .* to .* @@ -41,10 +37,6 @@ - driver: del_attr = driver err_msg = cannot modify virtio network device driver attributes - - alias_name: - extra_attrs = {'alias': {'name': 'ua-47034d36-5483-411c-86f8-7989d08d762b'}} - del_attr = alias - err_msg = device not found: no device found at address .* matching MAC address .* and alias .* - mac: del_attr = mac_address err_msg = "cannot change network interface mac address|device not found" diff --git a/libvirt/tests/src/virtual_network/update_device/unsupported_live_update.py b/libvirt/tests/src/virtual_network/update_device/unsupported_live_update.py index e981f635ae..1211a3fb75 100644 --- a/libvirt/tests/src/virtual_network/update_device/unsupported_live_update.py +++ b/libvirt/tests/src/virtual_network/update_device/unsupported_live_update.py @@ -29,6 +29,7 @@ def run(test, params, env): iface_attrs = {**base_iface_attrs, **extra_attrs} update_attrs = eval(params.get('update_attrs', '{}')) + tmp_attrs = eval(params.get('tmp_attrs', '{}')) del_attr = params.get('del_attr') vmxml = vm_xml.VMXML.new_from_inactive_dumpxml(vm_name) @@ -41,7 +42,6 @@ def run(test, params, env): vmxml.os = osxml libvirt_vmxml.modify_vm_device(vmxml, 'disk', {'boot': '1'}) - vmxml.del_device('interface', by_tag=True) libvirt_vmxml.modify_vm_device(vmxml, 'interface', iface_attrs) LOG.debug(f'VMXML of {vm_name}:\n{virsh.dumpxml(vm_name).stdout_text}') @@ -56,6 +56,8 @@ def run(test, params, env): else: eval(f'iface.del_{del_attr}')() else: + if tmp_attrs: + iface.setup_attrs(**tmp_attrs) iface.setup_attrs(**update_attrs) LOG.debug(f'Interface xml to update with:\n{iface}')