From ec05d07b5fd44f88abcd2895a932cf85e61bf92a Mon Sep 17 00:00:00 2001 From: Sebastian Mitterle Date: Tue, 22 Oct 2024 04:08:21 -0400 Subject: [PATCH] iface_stat: fix test on s390x 1. No ACPI, remove from definition 2. Our domain uses security driver 'dac' which is not available for unprivileged users. Remove it. Signed-off-by: Sebastian Mitterle --- libvirt/tests/cfg/virtual_network/iface_stat.cfg | 2 ++ libvirt/tests/src/virtual_network/iface_stat.py | 1 + 2 files changed, 3 insertions(+) diff --git a/libvirt/tests/cfg/virtual_network/iface_stat.cfg b/libvirt/tests/cfg/virtual_network/iface_stat.cfg index 9694b64722..ec031c5532 100644 --- a/libvirt/tests/cfg/virtual_network/iface_stat.cfg +++ b/libvirt/tests/cfg/virtual_network/iface_stat.cfg @@ -22,3 +22,5 @@ - macvtap: func_supported_since_libvirt_ver = (9, 2, 0) iface_attrs = {'acpi': {'index': '5'}, 'target': {'dev': tap_name, 'managed': 'no'}, 'model': 'virtio', 'type_name': 'ethernet'} + s390-virtio: + iface_attrs = {'target': {'dev': tap_name, 'managed': 'no'}, 'model': 'virtio', 'type_name': 'ethernet'} diff --git a/libvirt/tests/src/virtual_network/iface_stat.py b/libvirt/tests/src/virtual_network/iface_stat.py index 8c62774fa7..18c4553f87 100644 --- a/libvirt/tests/src/virtual_network/iface_stat.py +++ b/libvirt/tests/src/virtual_network/iface_stat.py @@ -187,6 +187,7 @@ def _collect_and_compare_stat(vm_name, session, **virsh_args): unpr_vmxml.del_device('interface', by_tag=True) libvirt_vmxml.modify_vm_device(unpr_vmxml, 'interface', iface_attrs) + unpr_vmxml.del_seclabel(by_attr=[('model', 'dac')]) network_base.define_vm_for_unprivileged_user(unpr_user, unpr_vmxml) unpr_vm_name = unpr_vmxml.vm_name