From 2ba2bff7bf23dc8d6a8702546d35fc417ca35250 Mon Sep 17 00:00:00 2001 From: Haijiao Zhao Date: Fri, 6 Dec 2024 02:36:36 -0500 Subject: [PATCH] rx_tx_queue_size:Skip getting tx size from interface xml Cannot get tx size from interface xml when it's not set Signed-off-by: Haijiao Zhao --- libvirt/tests/cfg/virtual_network/driver/rx_tx_queue_size.cfg | 1 + libvirt/tests/src/virtual_network/driver/rx_tx_queue_size.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libvirt/tests/cfg/virtual_network/driver/rx_tx_queue_size.cfg b/libvirt/tests/cfg/virtual_network/driver/rx_tx_queue_size.cfg index d3d7a974a0..c2b5e17be1 100644 --- a/libvirt/tests/cfg/virtual_network/driver/rx_tx_queue_size.cfg +++ b/libvirt/tests/cfg/virtual_network/driver/rx_tx_queue_size.cfg @@ -13,6 +13,7 @@ rx_tx_attrs = {'rx_queue_size': '512', 'tx_queue_size': '256'} - rx_1024_tx_unset: rx_tx_attrs = {'rx_queue_size': '1024'} + actual_tx = 256 - negative: status_error = yes variants: diff --git a/libvirt/tests/src/virtual_network/driver/rx_tx_queue_size.py b/libvirt/tests/src/virtual_network/driver/rx_tx_queue_size.py index 21b70b9884..7285900c48 100644 --- a/libvirt/tests/src/virtual_network/driver/rx_tx_queue_size.py +++ b/libvirt/tests/src/virtual_network/driver/rx_tx_queue_size.py @@ -53,7 +53,7 @@ def run(test, params, env): iface = network_base.get_iface_xml_inst(vm_name, 'after vm start') actual_rx = int(iface.driver.driver_attr.get('rx_queue_size')) - actual_tx = int(iface.driver.driver_attr.get('tx_queue_size')) + actual_tx = int(params.get('actual_tx') or iface.driver.driver_attr.get('tx_queue_size')) LOG.debug( f'Actual rx_queue_size={actual_rx} tx_queue_size={actual_tx}') if str(actual_rx) != iface_attrs['driver']['driver_attr']['rx_queue_size']: