Skip to content

Commit d0fba1d

Browse files
authored
Merge pull request #6646 from nanli1/fix_virtual_network_case_failed_when_get_gateway
virtual network: fix for getting gateway, boot msg match and throughout checkpoint issue on rhel 9.2
2 parents c928c76 + a63694c commit d0fba1d

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

libvirt/tests/cfg/virtual_network/rom/iface_rom_disable_pxe_boot.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
variants firmware:
99
- seabios:
1010
firmware_type = "seabios"
11-
boot_msg = "SeaBIOS "
11+
boot_msg = "BIOS"
1212
os_attrs = "${basic_os}"
1313
- uefi:
1414
only q35, aarch64

libvirt/tests/src/virtual_network/migrate/migrate_with_bridge_type_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def setup_test():
105105
utils_net.create_linux_bridge_tmux(bridge_name, iface_name=host_iface)
106106

107107
remote_host_iface = utils_net.get_default_gateway(
108-
iface_name=True, session=remote_session, force_dhcp=True, json=True)
108+
iface_name=True, session=remote_session, force_dhcp=False, json=True)
109109
params.update({"remote_host_iface": remote_host_iface})
110110
utils_net.create_linux_bridge_tmux(
111111
bridge_name, iface_name=remote_host_iface, session=remote_session)
@@ -200,7 +200,7 @@ def teardown_test():
200200
iface_dict = eval(params.get("iface_dict", "{}"))
201201
host_iface = params.get('host_iface')
202202
host_iface = host_iface if host_iface else utils_net.get_default_gateway(
203-
iface_name=True, force_dhcp=True, json=True)
203+
iface_name=True, force_dhcp=False, json=True)
204204

205205
vm_name = guest_os.get_vm(params)
206206
vm = env.get_vm(vm_name)

libvirt/tests/src/virtual_network/qos/check_actual_network_throughput.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def run(test, params, env):
4646
net_xml = NetworkXML.new_from_net_dumpxml('default')
4747
bk_net_xml = net_xml.copy()
4848
firewalld = service.Factory.create_service("firewalld")
49+
iface_type = params.get("iface_type")
4950

5051
try:
5152
if br_type == 'linux_br':
@@ -119,11 +120,12 @@ def run(test, params, env):
119120
)
120121
vm_sess.close()
121122
vm.destroy()
122-
ovs_list_cmd = 'ovs-vsctl list qos'
123-
ovs_list_output = process.run(ovs_list_cmd).stdout_text
124-
if ovs_list_output:
125-
test.fail(f'There should be no output of command {ovs_list_cmd}.'
126-
f'But we got {ovs_list_output}')
123+
if iface_type == "bridge" and br_type == "ovs_br":
124+
ovs_list_cmd = 'ovs-vsctl list qos'
125+
ovs_list_output = process.run(ovs_list_cmd).stdout_text
126+
if ovs_list_output:
127+
test.fail(f'There should be no output of command {ovs_list_cmd}.'
128+
f'But we got {ovs_list_output}')
127129

128130
finally:
129131
bkxml.sync()

libvirt/tests/src/virtual_network/rom/iface_rom_disable_pxe_boot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ def teardown_test():
7575

7676
if not utils_misc.wait_for(
7777
lambda: utils_net.get_default_gateway(
78-
iface_name=True, force_dhcp=True, json=True) is not None, timeout=15):
78+
iface_name=True, force_dhcp=False, json=True) is not None, timeout=15):
7979
test.fail("Cannot get default gateway in 15s")
8080
host_iface = params.get("host_iface")
8181
iface_name = host_iface if host_iface else utils_net.get_default_gateway(
82-
iface_name=True, force_dhcp=True).split()[0]
82+
iface_name=True, force_dhcp=False).split()[0]
8383
utils_net.create_linux_bridge_tmux(bridge_name, iface_name)
8484
iface_attrs = eval(params.get("iface_attrs") % bridge_name)
8585
disk_order = int(params.get("disk_order"))

0 commit comments

Comments
 (0)