From: Ondrej Lichtner olichtne@redhat.com
The "runs" module option was used to specify how many times should the test module run the netperf client, however it was ignored when "confidence" was specified since the user was expected to specify the "-i" option in the task.
After this patch the "runs" parameter will be used even when "confidence" is specified and will be used to add the "-i" parameter to the client command.
This patch also updates all the recipes tracked in the LNST recipe that specified the -i parameter, to instead use the "runs" option.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- recipes/regression_tests/phase1/3_vlans.py | 18 +++++++++++------- recipes/regression_tests/phase1/3_vlans_over_bond.py | 18 +++++++++++------- recipes/regression_tests/phase1/bonding_test.py | 10 +++++++--- .../phase1/virtual_bridge_2_vlans_over_bond.py | 16 ++++++++++------ .../phase1/virtual_bridge_vlan_in_guest.py | 10 +++++++--- .../phase1/virtual_bridge_vlan_in_host.py | 10 +++++++--- recipes/regression_tests/phase2/3_vlans_over_team.py | 18 +++++++++++------- recipes/regression_tests/phase2/team_test.py | 16 ++++++++++------ ...rtual_ovs_bridge_2_vlans_over_active_backup_bond.py | 16 ++++++++++------ .../phase2/virtual_ovs_bridge_vlan_in_guest.py | 10 +++++++--- .../phase2/virtual_ovs_bridge_vlan_in_host.py | 10 +++++++--- test_modules/Netperf.py | 8 +++----- 12 files changed, 101 insertions(+), 59 deletions(-)
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py index 69b958e..19c897e 100644 --- a/recipes/regression_tests/phase1/3_vlans.py +++ b/recipes/regression_tests/phase1/3_vlans.py @@ -77,7 +77,8 @@ netperf_cli_tcp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs }) netperf_cli_udp = ctl.get_module("Netperf", options={ @@ -85,7 +86,8 @@ netperf_cli_udp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs }) netperf_cli_tcp6 = ctl.get_module("Netperf", options={ @@ -93,7 +95,8 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs }) netperf_cli_udp6 = ctl.get_module("Netperf", options={ @@ -101,7 +104,8 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs })
for vlan1 in vlans: @@ -118,7 +122,7 @@ for vlan1 in vlans: netperf_srv.update_options({"bind": m1_vlan1.get_ip(0)}) netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)})
- p_opts = "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0)) + p_opts = "-L %s" % (m2_vlan2.get_ip(0)) if nperf_cpupin: p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin)
@@ -129,10 +133,10 @@ for vlan1 in vlans: "netperf_opts": p_opts })
netperf_cli_tcp6.update_options({"netperf_server": m1_vlan1.get_ip(1), - "netperf_opts": "-i %s -L %s -6" % (nperf_max_runs, m2_vlan2.get_ip(1))}) + "netperf_opts": "-L %s -6" % (m2_vlan2.get_ip(1))})
netperf_cli_udp6.update_options({"netperf_server": m1_vlan1.get_ip(1), - "netperf_opts": "-i %s -L %s -6" % (nperf_max_runs, m2_vlan2.get_ip(1))}) + "netperf_opts": "-L %s -6" % (m2_vlan2.get_ip(1))})
if vlan1 == vlan2: # These tests should pass diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py index adaf426..06c6b98 100644 --- a/recipes/regression_tests/phase1/3_vlans_over_bond.py +++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py @@ -78,7 +78,8 @@ netperf_cli_tcp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs }) netperf_cli_udp = ctl.get_module("Netperf", options={ @@ -86,7 +87,8 @@ netperf_cli_udp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs }) netperf_cli_tcp6 = ctl.get_module("Netperf", options={ @@ -94,7 +96,8 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs }) netperf_cli_udp6 = ctl.get_module("Netperf", options={ @@ -102,7 +105,8 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs })
for vlan1 in vlans: @@ -120,7 +124,7 @@ for vlan1 in vlans:
netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)})
- p_opts = "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0)) + p_opts = "-L %s" % (m2_vlan2.get_ip(0)) if nperf_cpupin: p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin)
@@ -131,10 +135,10 @@ for vlan1 in vlans: "netperf_opts": p_opts })
netperf_cli_tcp6.update_options({"netperf_server": m1_vlan1.get_ip(1), - "netperf_opts": "-i %s -L %s -6" % (nperf_max_runs, m2_vlan2.get_ip(1))}) + "netperf_opts": "-L %s -6" % (m2_vlan2.get_ip(1))})
netperf_cli_udp6.update_options({"netperf_server": m1_vlan1.get_ip(1), - "netperf_opts": "-i %s -L %s -6" % (nperf_max_runs, m2_vlan2.get_ip(1))}) + "netperf_opts": "-L %s -6" % (m2_vlan2.get_ip(1))})
if vlan1 == vlan2: # These tests should pass diff --git a/recipes/regression_tests/phase1/bonding_test.py b/recipes/regression_tests/phase1/bonding_test.py index b73f0dc..70827a2 100644 --- a/recipes/regression_tests/phase1/bonding_test.py +++ b/recipes/regression_tests/phase1/bonding_test.py @@ -72,7 +72,7 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
-p_opts = "-i %s -L %s" % (nperf_max_runs, test_if2.get_ip(0)) +p_opts = "-L %s" % (test_if2.get_ip(0)) if nperf_cpupin: p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin)
@@ -84,6 +84,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -95,6 +96,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -107,8 +109,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, test_if2.get_ip(1)) + "-L %s -6" % (test_if2.get_ip(1)) }) netperf_cli_udp6 = ctl.get_module("Netperf", options={ @@ -119,8 +122,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, test_if2.get_ip(1)) + "-L %s -6" % (test_if2.get_ip(1)) })
ctl.wait(15) diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py index 266530c..e241f1a 100644 --- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py +++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py @@ -107,8 +107,9 @@ netperf_cli_tcp = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, g3_guestnic.get_ip(0)) + "runs": nperf_max_runs, + "netperf_opts" : "-L %s" % + (g3_guestnic.get_ip(0)) })
netperf_cli_udp = ctl.get_module("Netperf", @@ -119,8 +120,9 @@ netperf_cli_udp = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, g3_guestnic.get_ip(0)) + "runs": nperf_max_runs, + "netperf_opts" : "-L %s" % + (g3_guestnic.get_ip(0)) })
netperf_cli_tcp6 = ctl.get_module("Netperf", @@ -132,8 +134,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, g3_guestnic.get_ip(1)) + "-L %s -6" % (g3_guestnic.get_ip(1)) })
netperf_cli_udp6 = ctl.get_module("Netperf", @@ -145,8 +148,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, g3_guestnic.get_ip(1)) + "-L %s -6" % (g3_guestnic.get_ip(1)) })
ping_mod_bad = ctl.get_module("IcmpPing", diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py index ee78d7d..1830051 100644 --- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py +++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py @@ -77,7 +77,7 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
-p_opts = "-i %s -L %s" % (nperf_max_runs, h2_vlan10.get_ip(0)) +p_opts = "-L %s" % (h2_vlan10.get_ip(0)) if nperf_cpupin: p_opts += " -T%s" % nperf_cpupin
@@ -89,6 +89,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -100,6 +101,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -112,8 +114,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, h2_vlan10.get_ip(1)) + "-L %s -6" % (h2_vlan10.get_ip(1)) })
netperf_cli_udp6 = ctl.get_module("Netperf", @@ -125,8 +128,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, h2_vlan10.get_ip(1)) + "-L %s -6" % (h2_vlan10.get_ip(1)) })
# configure mtu diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py index a8d99dd..8337687 100644 --- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py +++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py @@ -76,7 +76,7 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
-p_opts = "-i %s -L %s" % (nperf_max_runs, h2_vlan10.get_ip(0)) +p_opts = "-L %s" % (h2_vlan10.get_ip(0)) if nperf_cpupin: p_opts += " -T%s" % nperf_cpupin
@@ -88,6 +88,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -99,6 +100,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -111,8 +113,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, h2_vlan10.get_ip(1)) + "-L %s -6" % (h2_vlan10.get_ip(1)) })
netperf_cli_udp6 = ctl.get_module("Netperf", @@ -124,8 +127,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, h2_vlan10.get_ip(1)) + "-L %s -6" % (h2_vlan10.get_ip(1)) })
# configure mtu diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py index 5855915..25f42d1 100644 --- a/recipes/regression_tests/phase2/3_vlans_over_team.py +++ b/recipes/regression_tests/phase2/3_vlans_over_team.py @@ -79,7 +79,8 @@ netperf_cli_tcp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs }) netperf_cli_udp = ctl.get_module("Netperf", options={ @@ -87,7 +88,8 @@ netperf_cli_udp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs }) netperf_cli_tcp6 = ctl.get_module("Netperf", options={ @@ -95,7 +97,8 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs }) netperf_cli_udp6 = ctl.get_module("Netperf", options={ @@ -103,7 +106,8 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "cpu_util" : nperf_cpu_util + "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs })
for vlan1 in vlans: @@ -121,7 +125,7 @@ for vlan1 in vlans:
netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)})
- p_opts = "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0)) + p_opts = "-L %s" % (m2_vlan2.get_ip(0)) if nperf_cpupin: p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin)
@@ -132,10 +136,10 @@ for vlan1 in vlans: "netperf_opts": p_opts})
netperf_cli_tcp6.update_options({"netperf_server": m1_vlan1.get_ip(1), - "netperf_opts": "-i %s -L %s -6" % (nperf_max_runs, m2_vlan2.get_ip(1))}) + "netperf_opts": "-L %s -6" % (m2_vlan2.get_ip(1))})
netperf_cli_udp6.update_options({"netperf_server": m1_vlan1.get_ip(1), - "netperf_opts": "-i %s -L %s -6" % (nperf_max_runs, m2_vlan2.get_ip(1))}) + "netperf_opts": "-L %s -6" % (m2_vlan2.get_ip(1))})
if vlan1 == vlan2: # These tests should pass diff --git a/recipes/regression_tests/phase2/team_test.py b/recipes/regression_tests/phase2/team_test.py index 4897d8d..e670d2c 100644 --- a/recipes/regression_tests/phase2/team_test.py +++ b/recipes/regression_tests/phase2/team_test.py @@ -72,7 +72,7 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6" })
-p_opts = "-i %s -L %s" % (nperf_max_runs, test_if2.get_ip(0)) +p_opts = "-L %s" % (test_if2.get_ip(0)) if nperf_cpupin: p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin)
@@ -84,6 +84,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -95,6 +96,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -107,8 +109,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, test_if2.get_ip(1)) + "-L %s -6" % (test_if2.get_ip(1)) }) netperf_cli_udp6 = ctl.get_module("Netperf", options={ @@ -119,8 +122,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, test_if2.get_ip(1)) + "-L %s -6" % (test_if2.get_ip(1)) })
ctl.wait(15) @@ -248,7 +252,7 @@ netperf_srv.update_options({"bind" : test_if2.get_ip(0)})
netperf_srv6.update_options({"bind" : test_if2.get_ip(1)})
-p_opts = "-i %s -L %s" % (nperf_max_runs, test_if1.get_ip(0)) +p_opts = "-L %s" % (test_if1.get_ip(0)) if nperf_cpupin: p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin)
@@ -259,10 +263,10 @@ netperf_cli_udp.update_options({"netperf_server" : test_if2.get_ip(0), "netperf_opts" : p_opts})
netperf_cli_tcp6.update_options({"netperf_server" : test_if2.get_ip(1), - "netperf_opts" : "-i %s -L %s -6" % (nperf_max_runs, test_if1.get_ip(1))}) + "netperf_opts" : "-L %s -6" % (test_if1.get_ip(1))})
netperf_cli_udp6.update_options({"netperf_server" : test_if2.get_ip(1), - "netperf_opts" : "-i %s -L %s -6" % (nperf_max_runs, test_if1.get_ip(1))}) + "netperf_opts" : "-L %s -6" % (test_if1.get_ip(1))})
for setting in offload_settings: dev_features = "" diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py index 521b268..742bc1a 100644 --- a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py @@ -105,8 +105,9 @@ netperf_cli_tcp = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, g3_guestnic.get_ip(0)) + "runs": nperf_max_runs, + "netperf_opts" : "-L %s" % + (g3_guestnic.get_ip(0)) })
netperf_cli_udp = ctl.get_module("Netperf", @@ -117,8 +118,9 @@ netperf_cli_udp = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, g3_guestnic.get_ip(0)) + "runs": nperf_max_runs, + "netperf_opts" : "-L %s" % + (g3_guestnic.get_ip(0)) })
netperf_cli_tcp6 = ctl.get_module("Netperf", @@ -130,8 +132,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, g3_guestnic.get_ip(1)) + "-L %s -6" % (g3_guestnic.get_ip(1)) })
netperf_cli_udp6 = ctl.get_module("Netperf", @@ -143,8 +146,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, g3_guestnic.get_ip(1)) + "-L %s -6" % (g3_guestnic.get_ip(1)) })
ping_mod_bad = ctl.get_module("IcmpPing", diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py index 27bc63b..bf67b77 100644 --- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py @@ -74,7 +74,7 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
-p_opts = "-i %s -L %s" % (nperf_max_runs, h2_vlan10.get_ip(0)) +p_opts = "-L %s" % (h2_vlan10.get_ip(0)) if nperf_cpupin: p_opts += " -T%s" % nperf_cpupin
@@ -86,6 +86,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -97,6 +98,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -109,8 +111,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, h2_vlan10.get_ip(1)) + "-L %s -6" % (h2_vlan10.get_ip(1)) })
netperf_cli_udp6 = ctl.get_module("Netperf", @@ -122,8 +125,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, h2_vlan10.get_ip(1)) + "-L %s -6" % (h2_vlan10.get_ip(1)) })
ctl.wait(15) diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py index 3284851..1050871 100644 --- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py @@ -73,7 +73,7 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
-p_opts = "-i %s -L %s" % (nperf_max_runs, h2_vlan10.get_ip(0)) +p_opts = "-L %s" % (h2_vlan10.get_ip(0)) if nperf_cpupin: p_opts += " -T%s" % nperf_cpupin
@@ -85,6 +85,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -96,6 +97,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : p_opts })
@@ -108,8 +110,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf", "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, h2_vlan10.get_ip(1)) + "-L %s -6" % (h2_vlan10.get_ip(1)) })
netperf_cli_udp6 = ctl.get_module("Netperf", @@ -121,8 +124,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf", "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, + "runs": nperf_max_runs, "netperf_opts" : - "-i %s -L %s -6" % (nperf_max_runs, h2_vlan10.get_ip(1)) + "-L %s -6" % (h2_vlan10.get_ip(1)) }) ctl.wait(15)
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py index 10c993b..4ff8643 100644 --- a/test_modules/Netperf.py +++ b/test_modules/Netperf.py @@ -36,12 +36,7 @@ class Netperf(TestGeneric): self._family = self.get_opt("family") self._cpu_util = self.get_opt("cpu_util") self._num_parallel = int(self.get_opt("num_parallel", default=1)) - self._runs = self.get_opt("runs", default=1) - if self._runs > 1 and self._confidence is not None: - logging.warning("Ignoring 'runs' because 'confidence' "\ - "was specified.") - self._runs = 1
self._threshold = self._parse_threshold(self.get_opt("threshold")) self._threshold_deviation = self._parse_threshold( @@ -91,6 +86,9 @@ class Netperf(TestGeneric): confidence level that Netperf should try to achieve """ cmd += " -I %s" % self._confidence + if self._runs >= 3: + cmd += " -i %d,%d" % (self._runs, self._runs) + self._runs = 1
if self._cpu_util is not None: if self._cpu_util.lower() == "both":