Skip to content

Commit 2639fb1

Browse files
authored
Merge pull request #4314 from quanwenli/windows-fix
netperf: Windows small fix for host-vm tests
2 parents 3394030 + 1535ba1 commit 2639fb1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

generic/tests/cfg/netperf.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
# log_guestinfo_script = scripts/rh_perf_log_guestinfo_script.bat
9090
# log_guestinfo_exec = cmd /c
9191
# log_guestinfo_path = C:\log_guestinfo.bat
92-
server_mtu_cmd = "netsh interface ipv4 set subinterface "%s" mtu=%s"
92+
server_mtu_cmd = "netsh interface ipv4 set interface "%s" mtu=%s"
9393
i386, x86_64:
9494
cpu_model_flags = ",hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0xfff"
9595
windows_disable_firewall = "netsh advfirewall set allprofiles state off"

generic/tests/netperf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def mtu_set(mtu):
6262
server_mtu_cmd = params.get("server_mtu_cmd")
6363
client_mtu_cmd = params.get("client_mtu_cmd")
6464
host_mtu_cmd = params.get("host_mtu_cmd")
65+
client_physical_nic = params.get("client_physical_nic")
6566
error_context.context("Changing the MTU of guest", test.log.info)
6667
if params.get("os_type") == "linux":
6768
ethname = utils_net.get_linux_ifname(server_ctl, mac)
@@ -73,9 +74,8 @@ def mtu_set(mtu):
7374
netperf_base.ssh_cmd(server_ctl, server_mtu_cmd % (connection_id, mtu))
7475

7576
error_context.context("Changing the MTU of client", test.log.info)
76-
netperf_base.ssh_cmd(
77-
client, client_mtu_cmd % (params.get("client_physical_nic"), mtu)
78-
)
77+
if client_physical_nic:
78+
netperf_base.ssh_cmd(client, client_mtu_cmd % (client_physical_nic, mtu))
7979

8080
netdst = params.get("netdst", "switch")
8181
host_bridges = utils_net.Bridge()
@@ -300,6 +300,7 @@ def mtu_set(mtu):
300300
client = params.get("client", "localhost")
301301
client_ip = client
302302
clients = []
303+
client_pub_ip = None
303304
# client session 1 for control, session 2 for data communication
304305
for i in range(2):
305306
if client in params.get("vms"):

0 commit comments

Comments
 (0)