This patch modifies all tests in phase1 and phase2 that involve 3 vlans. The change is that the netperf test is run only on one of the vlans instead on all of them that reduces the time the test takes.
Signed-off-by: Jan Tluka jtluka@redhat.com --- recipes/regression_tests/phase1/3_vlans.py | 319 ++++++++++---------- .../regression_tests/phase1/3_vlans_over_bond.py | 335 ++++++++++----------- .../regression_tests/phase2/3_vlans_over_team.py | 334 ++++++++++---------- 3 files changed, 494 insertions(+), 494 deletions(-)
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py index 907ad3c..ac20b60 100644 --- a/recipes/regression_tests/phase1/3_vlans.py +++ b/recipes/regression_tests/phase1/3_vlans.py @@ -64,50 +64,68 @@ ping_mod6 = ctl.get_module("Icmp6Ping", "count" : 100, "interval" : 0.1 }) + +m1_vlan1 = m1.get_interface(vlans[0]) +m2_vlan1 = m2.get_interface(vlans[0]) + +p_opts = "-L %s" % (m2_vlan1.get_ip(0)) +if nperf_cpupin and nperf_mode != "multi": + p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + netperf_srv = ctl.get_module("Netperf", options={ - "role" : "server" + "role" : "server", + "bind": m1_vlan1.get_ip(0) }) netperf_srv6 = ctl.get_module("Netperf", options={ "role" : "server", + "bind": m1_vlan1.get_ip(1), "netperf_opts" : " -6" }) netperf_cli_tcp = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(0), "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": p_opts }) netperf_cli_udp = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(0), "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": p_opts }) netperf_cli_tcp6 = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(1), "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": "-L %s -6" % (m2_vlan1.get_ip(1)) }) netperf_cli_udp6 = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(1), "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": "-L %s -6" % (m2_vlan1.get_ip(1)) })
if nperf_mode == "multi": @@ -121,171 +139,154 @@ if nperf_mode == "multi": netperf_cli_tcp6.update_options({"num_parallel": nperf_num_parallel}) netperf_cli_udp6.update_options({"num_parallel": nperf_num_parallel})
-for vlan1 in vlans: - m1_vlan1 = m1.get_interface(vlan1) - for vlan2 in vlans: - m2_vlan2 = m2.get_interface(vlan2) - - ping_mod.update_options({"addr": m2_vlan2.get_ip(0), - "iface": m1_vlan1.get_devname()}) - - ping_mod6.update_options({"addr": m2_vlan2.get_ip(1), - "iface": m1_vlan1.get_ip(1)}) - - netperf_srv.update_options({"bind": m1_vlan1.get_ip(0)}) - netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)}) +for setting in offload_settings: + #apply offload setting + dev_features = "" + for offload in setting: + dev_features += " %s %s" % (offload[0], offload[1])
- p_opts = "-L %s" % (m2_vlan2.get_ip(0)) - if nperf_cpupin and nperf_mode != "multi": - p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + m1.run("ethtool -K %s %s" % (m1_phy1.get_devname(), + dev_features)) + m2.run("ethtool -K %s %s" % (m2_phy1.get_devname(), + dev_features))
- netperf_cli_tcp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": p_opts }) + # Ping test + for vlan1 in vlans: + m1_vlan1 = m1.get_interface(vlan1) + for vlan2 in vlans: + m2_vlan2 = m2.get_interface(vlan2)
- netperf_cli_udp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": p_opts }) + ping_mod.update_options({"addr": m2_vlan2.get_ip(0), + "iface": m1_vlan1.get_devname()})
- netperf_cli_tcp6.update_options({"netperf_server": m1_vlan1.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": "-L %s -6" % (m2_vlan2.get_ip(1))}) - - if vlan1 == vlan2: - # These tests should pass - # Ping between same VLANs - for setting in offload_settings: - dev_features = "" - for offload in setting: - dev_features += " %s %s" % (offload[0], offload[1]) - - m1.run("ethtool -K %s %s" % (m1_phy1.get_devname(), - dev_features)) - m2.run("ethtool -K %s %s" % (m2_phy1.get_devname(), - dev_features)) + ping_mod6.update_options({"addr": m2_vlan2.get_ip(1), + "iface": m1_vlan1.get_ip(1)})
+ if vlan1 == vlan2: + # These tests should pass + # Ping between same VLANs if ipv in [ 'ipv4', 'both' ]: - # Ping test m1.run(ping_mod)
- # Netperf test (both TCP and UDP) - srv_proc = m1.run(netperf_srv, bg=True) - ctl.wait(2) - - # prepare PerfRepo result for tcp - result_tcp = perf_api.new_result("tcp_ipv4_id", - "tcp_ipv4_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_tcp.set_parameter(offload[0], offload[1]) - result_tcp.set_parameter('netperf_server_on_vlan', vlan1) - result_tcp.set_parameter('netperf_client_on_vlan', vlan2) - result_tcp.add_tag(product_name) - if nperf_mode == "multi": - result_tcp.add_tag("multithreaded") - result_tcp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_tcp) - netperf_baseline_template(netperf_cli_tcp, baseline) - - tcp_res_data = m2.run(netperf_cli_tcp, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_tcp, tcp_res_data) - perf_api.save_result(result_tcp) - - result_udp = perf_api.new_result("udp_ipv4_id", - "udp_ipv4_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_udp.set_parameter(offload[0], offload[1]) - result_udp.set_parameter('netperf_server_on_vlan', vlan1) - result_udp.set_parameter('netperf_client_on_vlan', vlan2) - result_udp.add_tag(product_name) - if nperf_mode == "multi": - result_udp.add_tag("multithreaded") - result_udp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_udp) - netperf_baseline_template(netperf_cli_udp, baseline) - - udp_res_data = m2.run(netperf_cli_udp, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_udp, udp_res_data) - perf_api.save_result(result_udp) - - srv_proc.intr() - if ipv in [ 'ipv6', 'both' ]: - # Ping test m1.run(ping_mod6) + else: + # These tests should fail + # Ping across different VLAN + if ipv in [ 'ipv4', 'both' ]: + m1.run(ping_mod, expect="fail")
- # Netperf test (both TCP and UDP) - srv_proc = m1.run(netperf_srv6, bg=True) - ctl.wait(2) - - # prepare PerfRepo result for tcp ipv6 - result_tcp = perf_api.new_result("tcp_ipv6_id", - "tcp_ipv6_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_tcp.set_parameter(offload[0], offload[1]) - result_tcp.set_parameter('netperf_server_on_vlan', vlan1) - result_tcp.set_parameter('netperf_client_on_vlan', vlan2) - result_tcp.set_tag(product_name) - if nperf_mode == "multi": - result_tcp.add_tag("multithreaded") - result_tcp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_tcp) - netperf_baseline_template(netperf_cli_tcp6, baseline) - - tcp_res_data = m2.run(netperf_cli_tcp6, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_tcp, tcp_res_data) - perf_api.save_result(result_tcp) - - # prepare PerfRepo result for udp ipv6 - result_udp = perf_api.new_result("udp_ipv6_id", - "udp_ipv6_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_udp.set_parameter(offload[0], offload[1]) - result_udp.set_parameter('netperf_server_on_vlan', vlan1) - result_udp.set_parameter('netperf_client_on_vlan', vlan2) - result_udp.set_tag(product_name) - if nperf_mode == "multi": - result_udp.add_tag("multithreaded") - result_udp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_udp) - netperf_baseline_template(netperf_cli_udp6, baseline) - - udp_res_data = m2.run(netperf_cli_udp6, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_udp, udp_res_data) - perf_api.save_result(result_udp) - - srv_proc.intr() - # These tests should fail - # Ping across different VLAN - else: - if ipv in [ 'ipv4', 'both' ]: - m1.run(ping_mod, expect="fail") - - if ipv in [ 'ipv6', 'both' ]: - m1.run(ping_mod6, expect="fail") + if ipv in [ 'ipv6', 'both' ]: + m1.run(ping_mod6, expect="fail") + + # Netperf test (both TCP and UDP) + if ipv in [ 'ipv4', 'both' ]: + srv_proc = m1.run(netperf_srv, bg=True) + ctl.wait(2) + + # prepare PerfRepo result for tcp + result_tcp = perf_api.new_result("tcp_ipv4_id", + "tcp_ipv4_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_tcp.set_parameter(offload[0], offload[1]) + result_tcp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_tcp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_tcp.add_tag(product_name) + if nperf_mode == "multi": + result_tcp.add_tag("multithreaded") + result_tcp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_tcp) + netperf_baseline_template(netperf_cli_tcp, baseline) + + tcp_res_data = m2.run(netperf_cli_tcp, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_tcp, tcp_res_data) + perf_api.save_result(result_tcp) + + # prepare PerfRepo result for udp + result_udp = perf_api.new_result("udp_ipv4_id", + "udp_ipv4_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_udp.set_parameter(offload[0], offload[1]) + result_udp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_udp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_udp.add_tag(product_name) + if nperf_mode == "multi": + result_udp.add_tag("multithreaded") + result_udp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_udp) + netperf_baseline_template(netperf_cli_udp, baseline) + + udp_res_data = m2.run(netperf_cli_udp, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_udp, udp_res_data) + perf_api.save_result(result_udp) + + srv_proc.intr() + + if ipv in [ 'ipv6', 'both' ]: + srv_proc = m1.run(netperf_srv6, bg=True) + ctl.wait(2) + + # prepare PerfRepo result for tcp ipv6 + result_tcp = perf_api.new_result("tcp_ipv6_id", + "tcp_ipv6_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_tcp.set_parameter(offload[0], offload[1]) + result_tcp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_tcp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_tcp.set_tag(product_name) + if nperf_mode == "multi": + result_tcp.add_tag("multithreaded") + result_tcp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_tcp) + netperf_baseline_template(netperf_cli_tcp6, baseline) + + tcp_res_data = m2.run(netperf_cli_tcp6, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_tcp, tcp_res_data) + perf_api.save_result(result_tcp) + + # prepare PerfRepo result for udp ipv6 + result_udp = perf_api.new_result("udp_ipv6_id", + "udp_ipv6_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_udp.set_parameter(offload[0], offload[1]) + result_udp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_udp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_udp.set_tag(product_name) + if nperf_mode == "multi": + result_udp.add_tag("multithreaded") + result_udp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_udp) + netperf_baseline_template(netperf_cli_udp6, baseline) + + udp_res_data = m2.run(netperf_cli_udp6, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_udp, udp_res_data) + perf_api.save_result(result_udp) + + srv_proc.intr()
#reset offload states dev_features = "" diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py index c14f1f0..3b9b582 100644 --- a/recipes/regression_tests/phase1/3_vlans_over_bond.py +++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py @@ -65,50 +65,68 @@ ping_mod6 = ctl.get_module("Icmp6Ping", "count" : 100, "interval" : 0.1 }) + +m1_vlan1 = m1.get_interface(vlans[0]) +m2_vlan1 = m2.get_interface(vlans[0]) + +p_opts = "-L %s" % (m2_vlan1.get_ip(0)) +if nperf_cpupin and nperf_mode != "multi": + p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + netperf_srv = ctl.get_module("Netperf", options={ - "role" : "server" + "role" : "server", + "bind": m1_vlan1.get_ip(0) }) netperf_srv6 = ctl.get_module("Netperf", options={ "role" : "server", + "bind": m1_vlan1.get_ip(1), "netperf_opts" : " -6" }) netperf_cli_tcp = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(0), "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": p_opts }) netperf_cli_udp = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(0), "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": p_opts }) netperf_cli_tcp6 = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(1), "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": "-L %s -6" % (m2_vlan1.get_ip(1)) }) netperf_cli_udp6 = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(1), "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": "-L %s -6" % (m2_vlan1.get_ip(1)) })
if nperf_mode == "multi": @@ -122,175 +140,156 @@ if nperf_mode == "multi": netperf_cli_tcp6.update_options({"num_parallel": nperf_num_parallel}) netperf_cli_udp6.update_options({"num_parallel": nperf_num_parallel})
-for vlan1 in vlans: - m1_vlan1 = m1.get_interface(vlan1) - for vlan2 in vlans: - m2_vlan2 = m2.get_interface(vlan2) - - ping_mod.update_options({"addr": m2_vlan2.get_ip(0), - "iface": m1_vlan1.get_devname()}) - - ping_mod6.update_options({"addr": m2_vlan2.get_ip(1), - "iface": m1_vlan1.get_ip(1)}) - - netperf_srv.update_options({"bind": m1_vlan1.get_ip(0)}) - - netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)}) - - p_opts = "-L %s" % (m2_vlan2.get_ip(0)) - if nperf_cpupin and nperf_mode != "multi": - p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) - - netperf_cli_tcp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": p_opts }) - - netperf_cli_udp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": p_opts }) - - netperf_cli_tcp6.update_options({"netperf_server": m1_vlan1.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": "-L %s -6" % (m2_vlan2.get_ip(1))}) - - if vlan1 == vlan2: - # These tests should pass - # Ping between same VLANs - for setting in offload_settings: - #apply offload setting - dev_features = "" - for offload in setting: - dev_features += " %s %s" % (offload[0], offload[1]) - m1.run("ethtool -K %s %s" % (m1_phy1.get_devname(), - dev_features)) - m1.run("ethtool -K %s %s" % (m1_phy2.get_devname(), - dev_features)) - m2.run("ethtool -K %s %s" % (m2_phy1.get_devname(), - dev_features)) - +for setting in offload_settings: + #apply offload setting + dev_features = "" + for offload in setting: + dev_features += " %s %s" % (offload[0], offload[1]) + + m1.run("ethtool -K %s %s" % (m1_phy1.get_devname(), + dev_features)) + m1.run("ethtool -K %s %s" % (m1_phy2.get_devname(), + dev_features)) + m2.run("ethtool -K %s %s" % (m2_phy1.get_devname(), + dev_features)) + + # Ping test + for vlan1 in vlans: + m1_vlan1 = m1.get_interface(vlan1) + for vlan2 in vlans: + m2_vlan2 = m2.get_interface(vlan2) + + ping_mod.update_options({"addr": m2_vlan2.get_ip(0), + "iface": m1_vlan1.get_devname()}) + + ping_mod6.update_options({"addr": m2_vlan2.get_ip(1), + "iface": m1_vlan1.get_ip(1)}) + + if vlan1 == vlan2: + # These tests should pass + # Ping between same VLANs if ipv in [ 'ipv4', 'both' ]: - # Ping test m1.run(ping_mod)
- # Netperf test (both TCP and UDP) - srv_proc = m1.run(netperf_srv, bg=True) - ctl.wait(2) - - # prepare PerfRepo result for tcp - result_tcp = perf_api.new_result("tcp_ipv4_id", - "tcp_ipv4_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_tcp.set_parameter(offload[0], offload[1]) - result_tcp.set_parameter('netperf_server_on_vlan', vlan1) - result_tcp.set_parameter('netperf_client_on_vlan', vlan2) - result_tcp.add_tag(product_name) - if nperf_mode == "multi": - result_tcp.add_tag("multithreaded") - result_tcp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_tcp) - netperf_baseline_template(netperf_cli_tcp, baseline) - - tcp_res_data = m2.run(netperf_cli_tcp, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_tcp, tcp_res_data) - perf_api.save_result(result_tcp) - - # prepare PerfRepo result for udp - result_udp = perf_api.new_result("udp_ipv4_id", - "udp_ipv4_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_udp.set_parameter(offload[0], offload[1]) - result_udp.set_parameter('netperf_server_on_vlan', vlan1) - result_udp.set_parameter('netperf_client_on_vlan', vlan2) - result_udp.add_tag(product_name) - if nperf_mode == "multi": - result_udp.add_tag("multithreaded") - result_udp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_udp) - netperf_baseline_template(netperf_cli_udp, baseline) - - udp_res_data = m2.run(netperf_cli_udp, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_udp, udp_res_data) - perf_api.save_result(result_udp) - - srv_proc.intr() - if ipv in [ 'ipv6', 'both' ]: - # Ping test m1.run(ping_mod6) + else: + # These tests should fail + # Ping across different VLAN + if ipv in [ 'ipv4', 'both' ]: + m1.run(ping_mod, expect="fail")
- # Netperf test (both TCP and UDP) - srv_proc = m1.run(netperf_srv6, bg=True) - ctl.wait(2) - - # prepare PerfRepo result for tcp ipv6 - result_tcp = perf_api.new_result("tcp_ipv6_id", - "tcp_ipv6_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_tcp.set_parameter(offload[0], offload[1]) - result_tcp.set_parameter('netperf_server_on_vlan', vlan1) - result_tcp.set_parameter('netperf_client_on_vlan', vlan2) - result_tcp.add_tag(product_name) - if nperf_mode == "multi": - result_tcp.add_tag("multithreaded") - result_tcp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_tcp) - netperf_baseline_template(netperf_cli_tcp6, baseline) - - tcp_res_data = m2.run(netperf_cli_tcp6, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_tcp, tcp_res_data) - perf_api.save_result(result_tcp) - - # prepare PerfRepo result for udp ipv6 - result_udp = perf_api.new_result("udp_ipv6_id", - "udp_ipv6_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_udp.set_parameter(offload[0], offload[1]) - result_udp.set_parameter('netperf_server_on_vlan', vlan1) - result_udp.set_parameter('netperf_client_on_vlan', vlan2) - result_udp.add_tag(product_name) - if nperf_mode == "multi": - result_udp.add_tag("multithreaded") - result_udp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_udp) - netperf_baseline_template(netperf_cli_udp6, baseline) - - udp_res_data = m2.run(netperf_cli_udp6, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_udp, udp_res_data) - perf_api.save_result(result_udp) - - srv_proc.intr() - # These tests should fail - # Ping across different VLAN - else: - if ipv in [ 'ipv4', 'both' ]: - m1.run(ping_mod, expect="fail") - - if ipv in [ 'ipv6', 'both' ]: - m1.run(ping_mod6, expect="fail") + if ipv in [ 'ipv6', 'both' ]: + m1.run(ping_mod6, expect="fail") + + # Netperf test (both TCP and UDP) + if ipv in [ 'ipv4', 'both' ]: + srv_proc = m1.run(netperf_srv, bg=True) + ctl.wait(2) + + # prepare PerfRepo result for tcp + result_tcp = perf_api.new_result("tcp_ipv4_id", + "tcp_ipv4_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_tcp.set_parameter(offload[0], offload[1]) + result_tcp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_tcp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_tcp.add_tag(product_name) + if nperf_mode == "multi": + result_tcp.add_tag("multithreaded") + result_tcp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_tcp) + netperf_baseline_template(netperf_cli_tcp, baseline) + + tcp_res_data = m2.run(netperf_cli_tcp, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_tcp, tcp_res_data) + perf_api.save_result(result_tcp) + + # prepare PerfRepo result for udp + result_udp = perf_api.new_result("udp_ipv4_id", + "udp_ipv4_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_udp.set_parameter(offload[0], offload[1]) + result_udp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_udp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_udp.add_tag(product_name) + if nperf_mode == "multi": + result_udp.add_tag("multithreaded") + result_udp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_udp) + netperf_baseline_template(netperf_cli_udp, baseline) + + udp_res_data = m2.run(netperf_cli_udp, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_udp, udp_res_data) + perf_api.save_result(result_udp) + + srv_proc.intr() + + if ipv in [ 'ipv6', 'both' ]: + srv_proc = m1.run(netperf_srv6, bg=True) + ctl.wait(2) + + # prepare PerfRepo result for tcp ipv6 + result_tcp = perf_api.new_result("tcp_ipv6_id", + "tcp_ipv6_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_tcp.set_parameter(offload[0], offload[1]) + result_tcp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_tcp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_tcp.add_tag(product_name) + if nperf_mode == "multi": + result_tcp.add_tag("multithreaded") + result_tcp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_tcp) + netperf_baseline_template(netperf_cli_tcp6, baseline) + + tcp_res_data = m2.run(netperf_cli_tcp6, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_tcp, tcp_res_data) + perf_api.save_result(result_tcp) + + # prepare PerfRepo result for udp ipv6 + result_udp = perf_api.new_result("udp_ipv6_id", + "udp_ipv6_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_udp.set_parameter(offload[0], offload[1]) + result_udp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_udp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_udp.add_tag(product_name) + if nperf_mode == "multi": + result_udp.add_tag("multithreaded") + result_udp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_udp) + netperf_baseline_template(netperf_cli_udp6, baseline) + + udp_res_data = m2.run(netperf_cli_udp6, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_udp, udp_res_data) + perf_api.save_result(result_udp) + + srv_proc.intr()
#reset offload states dev_features = "" diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py index dc163c0..99161a1 100644 --- a/recipes/regression_tests/phase2/3_vlans_over_team.py +++ b/recipes/regression_tests/phase2/3_vlans_over_team.py @@ -53,7 +53,6 @@ for vlan in vlans: vlan_if2 = m2.get_interface(vlan) vlan_if2.set_mtu(mtu)
- ctl.wait(15)
ping_mod = ctl.get_module("IcmpPing", @@ -66,50 +65,68 @@ ping_mod6 = ctl.get_module("Icmp6Ping", "count" : 100, "interval" : 0.1 }) + +m1_vlan1 = m1.get_interface(vlans[0]) +m2_vlan1 = m2.get_interface(vlans[0]) + +p_opts = "-L %s" % (m2_vlan1.get_ip(0)) +if nperf_cpupin and nperf_mode != "multi": + p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + netperf_srv = ctl.get_module("Netperf", options={ - "role" : "server" + "role" : "server", + "bind": m1_vlan1.get_ip(0) }) netperf_srv6 = ctl.get_module("Netperf", options={ "role" : "server", + "bind": m1_vlan1.get_ip(1), "netperf_opts" : " -6" }) netperf_cli_tcp = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(0), "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": p_opts }) netperf_cli_udp = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(0), "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": p_opts }) netperf_cli_tcp6 = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(1), "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": "-L %s -6" % (m2_vlan1.get_ip(1)) }) netperf_cli_udp6 = ctl.get_module("Netperf", options={ "role" : "client", + "netperf_server": m1_vlan1.get_ip(1), "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, "cpu_util" : nperf_cpu_util, - "runs": nperf_max_runs + "runs": nperf_max_runs, + "netperf_opts": "-L %s -6" % (m2_vlan1.get_ip(1)) })
if nperf_mode == "multi": @@ -123,173 +140,156 @@ if nperf_mode == "multi": netperf_cli_tcp6.update_options({"num_parallel": nperf_num_parallel}) netperf_cli_udp6.update_options({"num_parallel": nperf_num_parallel})
-for vlan1 in vlans: - m1_vlan1 = m1.get_interface(vlan1) - for vlan2 in vlans: - m2_vlan2 = m2.get_interface(vlan2) - - ping_mod.update_options({"addr": m2_vlan2.get_ip(0), - "iface": m1_vlan1.get_devname()}) - - ping_mod6.update_options({"addr": m2_vlan2.get_ip(1), - "iface": m1_vlan1.get_ip(1)}) - - netperf_srv.update_options({"bind": m1_vlan1.get_ip(0)}) - - netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)}) - - p_opts = "-L %s" % (m2_vlan2.get_ip(0)) - if nperf_cpupin and nperf_mode != "multi": - p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) - - netperf_cli_tcp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": p_opts}) - - netperf_cli_udp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": p_opts}) - - netperf_cli_tcp6.update_options({"netperf_server": m1_vlan1.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": "-L %s -6" % (m2_vlan2.get_ip(1))}) - - if vlan1 == vlan2: - # These tests should pass - # Ping between same VLANs - for setting in offload_settings: - dev_features = "" - for offload in setting: - dev_features += " %s %s" % (offload[0], offload[1]) - m1.run("ethtool -K %s %s" % (m1_phy1.get_devname(), - dev_features)) - m1.run("ethtool -K %s %s" % (m1_phy2.get_devname(), - dev_features)) - m2.run("ethtool -K %s %s" % (m2_phy1.get_devname(), - dev_features)) - +for setting in offload_settings: + #apply offload setting + dev_features = "" + for offload in setting: + dev_features += " %s %s" % (offload[0], offload[1]) + + m1.run("ethtool -K %s %s" % (m1_phy1.get_devname(), + dev_features)) + m1.run("ethtool -K %s %s" % (m1_phy2.get_devname(), + dev_features)) + m2.run("ethtool -K %s %s" % (m2_phy1.get_devname(), + dev_features)) + + # Ping test + for vlan1 in vlans: + m1_vlan1 = m1.get_interface(vlan1) + for vlan2 in vlans: + m2_vlan2 = m2.get_interface(vlan2) + + ping_mod.update_options({"addr": m2_vlan2.get_ip(0), + "iface": m1_vlan1.get_devname()}) + + ping_mod6.update_options({"addr": m2_vlan2.get_ip(1), + "iface": m1_vlan1.get_ip(1)}) + + if vlan1 == vlan2: + # These tests should pass + # Ping between same VLANs if ipv in [ 'ipv4', 'both' ]: - # Ping test m1.run(ping_mod)
- # Netperf test (both TCP and UDP) - srv_proc = m1.run(netperf_srv, bg=True) - ctl.wait(2) - - # prepare PerfRepo result for tcp - result_tcp = perf_api.new_result("tcp_ipv4_id", - "tcp_ipv4_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_tcp.set_parameter(offload[0], offload[1]) - result_tcp.set_parameter('netperf_server_on_vlan', vlan1) - result_tcp.set_parameter('netperf_client_on_vlan', vlan2) - result_tcp.add_tag(product_name) - if nperf_mode == "multi": - result_tcp.add_tag("multithreaded") - result_tcp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_tcp) - netperf_baseline_template(netperf_cli_tcp, baseline) - - tcp_res_data = m2.run(netperf_cli_tcp, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_tcp, tcp_res_data) - perf_api.save_result(result_tcp) - - # prepare PerfRepo result for udp - result_udp = perf_api.new_result("udp_ipv4_id", - "udp_ipv4_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_udp.set_parameter(offload[0], offload[1]) - result_udp.set_parameter('netperf_server_on_vlan', vlan1) - result_udp.set_parameter('netperf_client_on_vlan', vlan2) - result_udp.add_tag(product_name) - if nperf_mode == "multi": - result_udp.add_tag("multithreaded") - result_udp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_udp) - netperf_baseline_template(netperf_cli_udp, baseline) - - udp_res_data = m2.run(netperf_cli_udp, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_udp, udp_res_data) - perf_api.save_result(result_udp) - - srv_proc.intr() - if ipv in [ 'ipv6', 'both' ]: m1.run(ping_mod6) + else: + # These tests should fail + # Ping across different VLAN + if ipv in [ 'ipv4', 'both' ]: + m1.run(ping_mod, expect="fail")
- # Netperf test (both TCP and UDP) - srv_proc = m1.run(netperf_srv6, bg=True) - ctl.wait(2) - - # prepare PerfRepo result for tcp ipv6 - result_tcp = perf_api.new_result("tcp_ipv6_id", - "tcp_ipv6_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_tcp.set_parameter(offload[0], offload[1]) - result_tcp.set_parameter('netperf_server_on_vlan', vlan1) - result_tcp.set_parameter('netperf_client_on_vlan', vlan2) - result_tcp.add_tag(product_name) - if nperf_mode == "multi": - result_tcp.add_tag("multithreaded") - result_tcp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_tcp) - netperf_baseline_template(netperf_cli_tcp6, baseline) - - tcp_res_data = m2.run(netperf_cli_tcp6, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_tcp, tcp_res_data) - perf_api.save_result(result_tcp) - - # prepare PerfRepo result for udp ipv6 - result_udp = perf_api.new_result("udp_ipv6_id", - "udp_ipv6_result", - hash_ignore=[ - 'kernel_release', - 'redhat_release']) - for offload in setting: - result_udp.set_parameter(offload[0], offload[1]) - result_udp.set_parameter('netperf_server_on_vlan', vlan1) - result_udp.set_parameter('netperf_client_on_vlan', vlan2) - result_udp.add_tag(product_name) - if nperf_mode == "multi": - result_udp.add_tag("multithreaded") - result_udp.set_parameter('num_parallel', nperf_num_parallel) - - baseline = perf_api.get_baseline_of_result(result_udp) - netperf_baseline_template(netperf_cli_udp6, baseline) - - udp_res_data = m2.run(netperf_cli_udp6, - timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) - - netperf_result_template(result_udp, udp_res_data) - perf_api.save_result(result_udp) - - srv_proc.intr() - # These tests should fail - # Ping across different VLAN - else: - if ipv in [ 'ipv4', 'both' ]: - m1.run(ping_mod, expect="fail") - - if ipv in [ 'ipv6', 'both' ]: - m1.run(ping_mod6, expect="fail") + if ipv in [ 'ipv6', 'both' ]: + m1.run(ping_mod6, expect="fail") + + # Netperf test (both TCP and UDP) + if ipv in [ 'ipv4', 'both' ]: + srv_proc = m1.run(netperf_srv, bg=True) + ctl.wait(2) + + # prepare PerfRepo result for tcp + result_tcp = perf_api.new_result("tcp_ipv4_id", + "tcp_ipv4_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_tcp.set_parameter(offload[0], offload[1]) + result_tcp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_tcp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_tcp.add_tag(product_name) + if nperf_mode == "multi": + result_tcp.add_tag("multithreaded") + result_tcp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_tcp) + netperf_baseline_template(netperf_cli_tcp, baseline) + + tcp_res_data = m2.run(netperf_cli_tcp, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_tcp, tcp_res_data) + perf_api.save_result(result_tcp) + + # prepare PerfRepo result for udp + result_udp = perf_api.new_result("udp_ipv4_id", + "udp_ipv4_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_udp.set_parameter(offload[0], offload[1]) + result_udp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_udp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_udp.add_tag(product_name) + if nperf_mode == "multi": + result_udp.add_tag("multithreaded") + result_udp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_udp) + netperf_baseline_template(netperf_cli_udp, baseline) + + udp_res_data = m2.run(netperf_cli_udp, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_udp, udp_res_data) + perf_api.save_result(result_udp) + + srv_proc.intr() + + if ipv in [ 'ipv6', 'both' ]: + srv_proc = m1.run(netperf_srv6, bg=True) + ctl.wait(2) + + # prepare PerfRepo result for tcp ipv6 + result_tcp = perf_api.new_result("tcp_ipv6_id", + "tcp_ipv6_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_tcp.set_parameter(offload[0], offload[1]) + result_tcp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_tcp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_tcp.add_tag(product_name) + if nperf_mode == "multi": + result_tcp.add_tag("multithreaded") + result_tcp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_tcp) + netperf_baseline_template(netperf_cli_tcp6, baseline) + + tcp_res_data = m2.run(netperf_cli_tcp6, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_tcp, tcp_res_data) + perf_api.save_result(result_tcp) + + # prepare PerfRepo result for udp ipv6 + result_udp = perf_api.new_result("udp_ipv6_id", + "udp_ipv6_result", + hash_ignore=[ + 'kernel_release', + 'redhat_release']) + for offload in setting: + result_udp.set_parameter(offload[0], offload[1]) + result_udp.set_parameter('netperf_server_on_vlan', vlans[0]) + result_udp.set_parameter('netperf_client_on_vlan', vlans[0]) + result_udp.add_tag(product_name) + if nperf_mode == "multi": + result_udp.add_tag("multithreaded") + result_udp.set_parameter('num_parallel', nperf_num_parallel) + + baseline = perf_api.get_baseline_of_result(result_udp) + netperf_baseline_template(netperf_cli_udp6, baseline) + + udp_res_data = m2.run(netperf_cli_udp6, + timeout = (netperf_duration + nperf_reserve)*nperf_max_runs) + + netperf_result_template(result_udp, udp_res_data) + perf_api.save_result(result_udp) + + srv_proc.intr()
#reset offload states dev_features = ""
On Thu, Dec 03, 2015 at 04:20:52PM +0100, Jan Tluka wrote:
This patch modifies all tests in phase1 and phase2 that involve 3 vlans. The change is that the netperf test is run only on one of the vlans instead on all of them that reduces the time the test takes.
Signed-off-by: Jan Tluka jtluka@redhat.com
Acked-by: Ondrej Lichtner olichtne@redhat.com
lnst-developers@lists.fedorahosted.org