From: Ondrej Lichtner <olichtne(a)redhat.com>
This patch adds support for PerfRepo integration for phase2 regression
tests.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
.../phase2/3_vlans_over_active_backup_team.xml | 1 +
.../phase2/3_vlans_over_round_robin_team.xml | 1 +
.../regression_tests/phase2/3_vlans_over_team.py | 295 +++++++++++----
.../phase2/active_backup_double_team.xml | 1 +
.../regression_tests/phase2/active_backup_team.xml | 1 +
.../active_backup_team_vs_active_backup_bond.xml | 1 +
.../active_backup_team_vs_round_robin_bond.xml | 1 +
.../phase2/round_robin_double_team.xml | 1 +
.../regression_tests/phase2/round_robin_team.xml | 1 +
.../round_robin_team_vs_active_backup_bond.xml | 1 +
.../round_robin_team_vs_round_robin_bond.xml | 1 +
recipes/regression_tests/phase2/team_test.py | 412 +++++++++++++++++----
...l_ovs_bridge_2_vlans_over_active_backup_bond.py | 173 ++++++++-
..._ovs_bridge_2_vlans_over_active_backup_bond.xml | 1 +
.../phase2/virtual_ovs_bridge_vlan_in_guest.py | 175 ++++++++-
.../phase2/virtual_ovs_bridge_vlan_in_guest.xml | 1 +
.../phase2/virtual_ovs_bridge_vlan_in_host.py | 207 +++++++++--
.../phase2/virtual_ovs_bridge_vlan_in_host.xml | 1 +
18 files changed, 1094 insertions(+), 181 deletions(-)
diff --git a/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
b/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
index de4738f..f2cd757 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
+++ b/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="3_vlans_over_active_backup_team.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
b/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
index bf1bcf9..a03ef5e 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
+++ b/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="3_vlans_over_round_robin_team.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py
b/recipes/regression_tests/phase2/3_vlans_over_team.py
index 0913d27..ad1a611 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_team.py
+++ b/recipes/regression_tests/phase2/3_vlans_over_team.py
@@ -1,9 +1,30 @@
+import logging
from lnst.Controller.Task import ctl
+from lnst.Controller.PerfRepoUtils import parse_id_mapping, get_id
# ------
# SETUP
# ------
+mapping_file = ctl.get_alias("mapping_file")
+mapping = parse_id_mapping(mapping_file)
+
+product_name = ctl.get_alias("product_name")
+
+tcp_ipv4_id = get_id(mapping, "tcp_ipv4_id")
+tcp_ipv6_id = get_id(mapping, "tcp_ipv6_id")
+udp_ipv4_id = get_id(mapping, "udp_ipv4_id")
+udp_ipv6_id = get_id(mapping, "udp_ipv6_id")
+
+if tcp_ipv4_id is not None or\
+ tcp_ipv6_id is not None or\
+ udp_ipv4_id is not None or\
+ udp_ipv6_id is not None:
+ perf_api = ctl.connect_PerfRepo()
+ logging.info("PerfRepo support enabled for this run.")
+else:
+ logging.info("PerfRepo support disabled for this run.")
+
m1 = ctl.get_host("testmachine1")
m2 = ctl.get_host("testmachine2")
@@ -35,80 +56,79 @@ for vlan in vlans:
ctl.wait(15)
-for vlan1 in vlans:
- for vlan2 in vlans:
- ping_mod = ctl.get_module("IcmpPing",
- options={
- "addr" : m2.get_ip(vlan2, 0),
- "count" : 100,
- "iface" : m1.get_devname(vlan1),
- "interval" : 0.1
- })
-
- ping_mod6 = ctl.get_module("Icmp6Ping",
- options={
- "addr" : m2.get_ip(vlan2, 1),
- "count" : 100,
- "iface" : m1.get_ip(vlan1, 1),
- "interval" : 0.1
- })
-
- netperf_srv = ctl.get_module("Netperf",
- options={
- "role" : "server",
- "bind" : m1.get_ip(vlan1, 0),
- })
-
- netperf_srv6 = ctl.get_module("Netperf",
- options={
- "role" : "server",
- "bind" : m1.get_ip(vlan1, 1),
- "netperf_opts" : " -6",
- })
-
- netperf_cli_tcp = ctl.get_module("Netperf",
- options={
- "role" : "client",
- "netperf_server" :
- m1.get_ip(vlan1, 0),
- "duration" : netperf_duration,
- "testname" :
"TCP_STREAM",
- "netperf_opts" :
- "-L %s" % m2.get_ip(vlan1,
0)
- })
-
- netperf_cli_udp = ctl.get_module("Netperf",
- options={
- "role" : "client",
- "netperf_server" :
- m1.get_ip(vlan1, 0),
- "duration" : netperf_duration,
- "testname" :
"UDP_STREAM",
- "netperf_opts" :
- "-L %s" % m2.get_ip(vlan1,
0)
- })
-
- netperf_cli_tcp6 = ctl.get_module("Netperf",
+ping_mod = ctl.get_module("IcmpPing",
+ options={
+ "count" : 100,
+ "interval" : 0.1
+ })
+ping_mod6 = ctl.get_module("Icmp6Ping",
+ options={
+ "count" : 100,
+ "interval" : 0.1
+ })
+netperf_srv = ctl.get_module("Netperf",
+ options={
+ "role" : "server"
+ })
+netperf_srv6 = ctl.get_module("Netperf",
+ options={
+ "role" : "server",
+ "netperf_opts" : " -6"
+ })
+netperf_cli_tcp = ctl.get_module("Netperf",
+ options={
+ "role" : "client",
+ "duration" : netperf_duration,
+ "testname" : "TCP_STREAM",
+ "confidence" : "99,5"
+ })
+netperf_cli_udp = ctl.get_module("Netperf",
+ options={
+ "role" : "client",
+ "duration" : netperf_duration,
+ "testname" : "UDP_STREAM",
+ "confidence" : "99,5"
+ })
+netperf_cli_tcp6 = ctl.get_module("Netperf",
options={
"role" : "client",
- "netperf_server" :
- m1.get_ip(vlan1, 1),
"duration" : netperf_duration,
"testname" : "TCP_STREAM",
- "netperf_opts" :
- "-L %s -6" % m2.get_ip(vlan1, 1)
+ "confidence" : "99,5"
})
- netperf_cli_udp6 = ctl.get_module("Netperf",
+netperf_cli_udp6 = ctl.get_module("Netperf",
options={
"role" : "client",
- "netperf_server" :
- m1.get_ip(vlan1, 1),
"duration" : netperf_duration,
"testname" : "UDP_STREAM",
- "netperf_opts" :
- "-L %s -6" % m2.get_ip(vlan1, 1)
+ "confidence" : "99,5"
})
+for vlan1 in vlans:
+ for vlan2 in vlans:
+ ping_mod.update_options({"addr": m2.get_ip(vlan2, 0),
+ "iface": m1.get_devname(vlan1)})
+
+ ping_mod6.update_options({"addr": m2.get_ip(vlan2, 1),
+ "iface": m1.get_ip(vlan1, 1)})
+
+ netperf_srv.update_options({"bind": m1.get_ip(vlan1, 0)})
+
+ netperf_srv6.update_options({"bind": m1.get_ip(vlan1, 1)})
+
+ netperf_cli_tcp.update_options({"netperf_server": m1.get_ip(vlan1, 0),
+ "netperf_opts": "-i 5 -L %s"
% m2.get_ip(vlan1, 0)})
+
+ netperf_cli_udp.update_options({"netperf_server": m1.get_ip(vlan1, 0),
+ "netperf_opts": "-i 5 -L %s"
% m2.get_ip(vlan1, 0)})
+
+ netperf_cli_tcp6.update_options({"netperf_server": m1.get_ip(vlan1,
1),
+ "netperf_opts": "-i 5 -L %s
-6" % m2.get_ip(vlan1, 1)})
+
+ netperf_cli_udp6.update_options({"netperf_server": m1.get_ip(vlan1,
1),
+ "netperf_opts": "-i 5 -L %s
-6" % m2.get_ip(vlan1, 1)})
+
+
if vlan1 == vlan2:
# These tests should pass
# Ping between same VLANs
@@ -126,23 +146,164 @@ for vlan1 in vlans:
# Ping test
m1.run(ping_mod)
+ # prepare PerfRepo result for tcp
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv4_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv4_id,
"tcp_ipv4_result")
+ result_tcp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_server_on_vlan',
vlan1)
+ result_tcp.set_parameter('netperf_client_on_vlan',
vlan2)
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash =
result_tcp.generate_hash(['kernel-release',
+
'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold':
'%s bits/sec' % baseline_throughput,
+
'threshold_deviation': '%s bits/sec' % baseline_deviation})
+
+ # prepare PerfRepo result for udp
+ if udp_ipv4_id is not None:
+ result_udp = perf_api.new_result(udp_ipv4_id,
"udp_ipv4_result")
+ result_udp.set_parameter(offload, state)
+ result_udp.set_parameter('netperf_server_on_vlan',
vlan1)
+ result_udp.set_parameter('netperf_client_on_vlan',
vlan2)
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash =
result_tcp.generate_hash(['kernel-release',
+
'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold':
'%s bits/sec' % baseline_throughput,
+
'threshold_deviation': '%s bits/sec' % baseline_deviation})
+
# Netperf test (both TCP and UDP)
srv_proc = m1.run(netperf_srv, bg=True)
ctl.wait(2)
- m2.run(netperf_cli_tcp, timeout=70)
- m2.run(netperf_cli_udp, timeout=70)
+ tcp_res_data = m2.run(netperf_cli_tcp, timeout =
int(netperf_duration)*5 + 20)
+ udp_res_data = m2.run(netperf_cli_udp, timeout =
int(netperf_duration)*5 + 20)
srv_proc.intr()
+ if result_tcp is not None and\
+ tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate =
tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate -
deviation)
+ result_tcp.add_value('throughput_max', rate +
deviation)
+ result_tcp.add_value('throughput_deviation',
deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not
None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate =
udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate -
deviation)
+ result_udp.add_value('throughput_max', rate +
deviation)
+ result_udp.add_value('throughput_deviation',
deviation)
+ perf_api.save_result(result_udp)
+
if ipv in [ 'ipv6', 'both' ]:
m1.run(ping_mod6)
+ # prepare PerfRepo result for tcp ipv6
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv6_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv6_id,
"tcp_ipv6_result")
+ result_tcp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_server_on_vlan',
vlan1)
+ result_tcp.set_parameter('netperf_client_on_vlan',
vlan2)
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash =
result_tcp.generate_hash(['kernel-release',
+
'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold':
'%s bits/sec' % baseline_throughput,
+
'threshold_deviation': '%s bits/sec' % baseline_deviation})
+
+ # prepare PerfRepo result for udp ipv6
+ if udp_ipv6_id is not None:
+ result_udp = perf_api.new_result(udp_ipv6_id,
"udp_ipv6_result")
+ result_udp.set_parameter(offload, state)
+ result_udp.set_parameter('netperf_server_on_vlan',
vlan1)
+ result_udp.set_parameter('netperf_client_on_vlan',
vlan2)
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash =
result_tcp.generate_hash(['kernel-release',
+
'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold':
'%s bits/sec' % baseline_throughput,
+
'threshold_deviation': '%s bits/sec' % baseline_deviation})
+
# Netperf test (both TCP and UDP)
srv_proc = m1.run(netperf_srv6, bg=True)
ctl.wait(2)
- m2.run(netperf_cli_tcp6, timeout=70)
- m2.run(netperf_cli_udp6, timeout=70)
+ tcp_res_data = m2.run(netperf_cli_tcp6, timeout =
int(netperf_duration)*5 + 20)
+ udp_res_data = m2.run(netperf_cli_udp6, timeout =
int(netperf_duration)*5 + 20)
srv_proc.intr()
+ if result_tcp is not None and tcp_res_data.get_result() is not
None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate =
tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate -
deviation)
+ result_tcp.add_value('throughput_max', rate +
deviation)
+ result_tcp.add_value('throughput_deviation',
deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not
None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate =
udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate -
deviation)
+ result_udp.add_value('throughput_max', rate +
deviation)
+ result_udp.add_value('throughput_deviation',
deviation)
+ perf_api.save_result(result_udp)
+
# These tests should fail
# Ping across different VLAN
else:
diff --git a/recipes/regression_tests/phase2/active_backup_double_team.xml
b/recipes/regression_tests/phase2/active_backup_double_team.xml
index ade6a3e..900fa0d 100644
--- a/recipes/regression_tests/phase2/active_backup_double_team.xml
+++ b/recipes/regression_tests/phase2/active_backup_double_team.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="active_backup_double_team.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/active_backup_team.xml
b/recipes/regression_tests/phase2/active_backup_team.xml
index fa91239..c3bc6fe 100644
--- a/recipes/regression_tests/phase2/active_backup_team.xml
+++ b/recipes/regression_tests/phase2/active_backup_team.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="active_backup_team.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
b/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
index 7ce28d2..78fefc1 100644
--- a/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
+++ b/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="active_backup_team_vs_active_backup_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
b/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
index 30f95ca..8b438b7 100644
--- a/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
+++ b/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="active_backup_team_vs_round_robin_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_double_team.xml
b/recipes/regression_tests/phase2/round_robin_double_team.xml
index e553b43..ed85c65 100644
--- a/recipes/regression_tests/phase2/round_robin_double_team.xml
+++ b/recipes/regression_tests/phase2/round_robin_double_team.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="round_robin_double_team.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_team.xml
b/recipes/regression_tests/phase2/round_robin_team.xml
index df91816..5834c63 100644
--- a/recipes/regression_tests/phase2/round_robin_team.xml
+++ b/recipes/regression_tests/phase2/round_robin_team.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="round_robin_team.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
b/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
index 19fad3e..e3f9b4e 100644
--- a/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
+++ b/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="round_robin_team_vs_active_backup_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
b/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
index 31e354a..9ba661a 100644
--- a/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
+++ b/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
@@ -3,6 +3,7 @@
<alias name="ipv" value="both" />
<alias name="mtu" value="1500" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="round_robin_team_vs_round_robin_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/team_test.py
b/recipes/regression_tests/phase2/team_test.py
index ee0456a..4c04d82 100644
--- a/recipes/regression_tests/phase2/team_test.py
+++ b/recipes/regression_tests/phase2/team_test.py
@@ -1,9 +1,31 @@
+import logging
from lnst.Controller.Task import ctl
+from lnst.Controller.PerfRepoUtils import parse_id_mapping, get_id
+
# ------
# SETUP
# ------
+mapping_file = ctl.get_alias("mapping_file")
+mapping = parse_id_mapping(mapping_file)
+
+product_name = ctl.get_alias("product_name")
+
+tcp_ipv4_id = get_id(mapping, "tcp_ipv4_id")
+tcp_ipv6_id = get_id(mapping, "tcp_ipv6_id")
+udp_ipv4_id = get_id(mapping, "udp_ipv4_id")
+udp_ipv6_id = get_id(mapping, "udp_ipv6_id")
+
+if tcp_ipv4_id is not None or\
+ tcp_ipv6_id is not None or\
+ udp_ipv4_id is not None or\
+ udp_ipv6_id is not None:
+ perf_api = ctl.connect_PerfRepo()
+ logging.info("PerfRepo support enabled for this run.")
+else:
+ logging.info("PerfRepo support disabled for this run.")
+
m1 = ctl.get_host("testmachine1")
m2 = ctl.get_host("testmachine2")
@@ -61,7 +83,8 @@ netperf_cli_tcp = ctl.get_module("Netperf",
"netperf_server" :
m1.get_ip("test_if", 0),
"duration" : netperf_duration,
"testname" : "TCP_STREAM",
- "netperf_opts" : "-L %s" %
m2.get_ip("test_if", 0)
+ "confidence" : "99,5",
+ "netperf_opts" : "-i 5 -L %s" %
m2.get_ip("test_if", 0)
})
netperf_cli_udp = ctl.get_module("Netperf",
@@ -70,7 +93,8 @@ netperf_cli_udp = ctl.get_module("Netperf",
"netperf_server" :
m1.get_ip("test_if", 0),
"duration" : netperf_duration,
"testname" : "UDP_STREAM",
- "netperf_opts" : "-L %s" %
m2.get_ip("test_if", 0)
+ "confidence" : "99,5",
+ "netperf_opts" : "-i 5 -L %s" %
m2.get_ip("test_if", 0)
})
netperf_cli_tcp6 = ctl.get_module("Netperf",
@@ -80,8 +104,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf",
m1.get_ip("test_if", 1),
"duration" : netperf_duration,
"testname" : "TCP_STREAM",
+ "confidence" : "99,5",
"netperf_opts" :
- "-L %s -6" %
m2.get_ip("test_if", 1)
+ "-i 5 -L %s -6" %
m2.get_ip("test_if", 1)
})
netperf_cli_udp6 = ctl.get_module("Netperf",
options={
@@ -90,8 +115,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf",
m1.get_ip("test_if", 1),
"duration" : netperf_duration,
"testname" : "UDP_STREAM",
+ "confidence" : "99,5",
"netperf_opts" :
- "-L %s -6" %
m2.get_ip("test_if", 1)
+ "-i 5 -L %s -6" %
m2.get_ip("test_if", 1)
})
ctl.wait(15)
@@ -104,87 +130,184 @@ for offload in offloads:
state))
if ipv in [ 'ipv4', 'both' ]:
m1.run(ping_mod)
+
+ # prepare PerfRepo result for tcp
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv4_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv4_id,
"tcp_ipv4_result")
+ result_tcp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_server',
"testmachine1")
+ result_tcp.set_parameter('netperf_client',
"testmachine2")
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
+ # prepare PerfRepo result for udp
+ if udp_ipv4_id is not None:
+ result_udp = perf_api.new_result(udp_ipv4_id,
"udp_ipv4_result")
+ result_udp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_server',
"testmachine1")
+ result_tcp.set_parameter('netperf_client',
"testmachine2")
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
server_proc = m1.run(netperf_srv, bg=True)
ctl.wait(2)
- m2.run(netperf_cli_tcp, timeout=70)
- m2.run(netperf_cli_udp, timeout=70)
+ tcp_res_data = m2.run(netperf_cli_tcp, timeout = int(netperf_duration)*5 +
20)
+ udp_res_data = m2.run(netperf_cli_udp, timeout = int(netperf_duration)*5 +
20)
server_proc.intr()
+ if result_tcp is not None and\
+ tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
+
if ipv in [ 'ipv6', 'both' ]:
m1.run(ping_mod6)
+
+ # prepare PerfRepo result for tcp
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv6_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv6_id,
"tcp_ipv6_result")
+ result_tcp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_direction',
"testmachine1->testmachine2")
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
+ # prepare PerfRepo result for udp
+ if udp_ipv6_id is not None:
+ result_udp = perf_api.new_result(udp_ipv4_id,
"udp_ipv6_result")
+ result_udp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_direction',
"testmachine1->testmachine2")
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
server_proc = m1.run(netperf_srv6, bg=True)
ctl.wait(2)
- m2.run(netperf_cli_tcp6, timeout=70)
- m2.run(netperf_cli_udp6, timeout=70)
+ tcp_res_data = m2.run(netperf_cli_tcp6, timeout = int(netperf_duration)*5 +
20)
+ udp_res_data = m2.run(netperf_cli_udp6, timeout = int(netperf_duration)*5 +
20)
server_proc.intr()
-ping_mod = ctl.get_module("IcmpPing",
- options={
- "addr" : m1.get_ip("test_if", 0),
- "count" : 100,
- "iface" : m2.get_devname("test_if"),
- "interval" : 0.1
- })
+ if result_tcp is not None and tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
-ping_mod6 = ctl.get_module("Icmp6Ping",
- options={
- "addr" : m1.get_ip("test_if", 1),
- "count" : 100,
- "iface" : m2.get_devname("test_if"),
- "interval" : 0.1
- })
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
-netperf_srv = ctl.get_module("Netperf",
- options = {
- "role" : "server",
- "bind" : m2.get_ip("test_if", 0)
- })
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
-netperf_srv6 = ctl.get_module("Netperf",
- options = {
- "role" : "server",
- "bind" : m2.get_ip("test_if", 1),
- "netperf_opts" : " -6"
- })
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
-netperf_cli_tcp = ctl.get_module("Netperf",
- options = {
- "role" : "client",
- "netperf_server" :
m2.get_ip("test_if", 0),
- "duration" : netperf_duration,
- "testname" : "TCP_STREAM",
- "netperf_opts" : "-L %s" %
m1.get_ip("test_if", 0)
- })
-netperf_cli_udp = ctl.get_module("Netperf",
- options = {
- "role" : "client",
- "netperf_server" :
m2.get_ip("test_if", 0),
- "duration" : netperf_duration,
- "testname" : "UDP_STREAM",
- "netperf_opts" : "-L %s" %
m1.get_ip("test_if", 0)
- })
-netperf_cli_tcp6 = ctl.get_module("Netperf",
- options={
- "role" : "client",
- "netperf_server" :
- m2.get_ip("test_if", 1),
- "duration" : netperf_duration,
- "testname" : "TCP_STREAM",
- "netperf_opts" :
- "-L %s -6" %
m1.get_ip("test_if", 1)
- })
-netperf_cli_udp6 = ctl.get_module("Netperf",
- options={
- "role" : "client",
- "netperf_server" :
- m2.get_ip("test_if", 1),
- "duration" : netperf_duration,
- "testname" : "UDP_STREAM",
- "netperf_opts" :
- "-L %s -6" %
m1.get_ip("test_if", 1)
- })
+ping_mod.update_options({"addr" : m1.get_ip("test_if", 0),
+ "iface" : m2.get_devname("test_if")})
+
+ping_mod6.update_options({"addr" : m1.get_ip("test_if", 1),
+ "iface" : m2.get_devname("test_if")})
+
+netperf_srv.update_options({"bind" : m2.get_ip("test_if", 0)})
+
+netperf_srv6.update_options({"bind" : m2.get_ip("test_if", 1)})
+
+netperf_cli_tcp.update_options({"netperf_server" :
m2.get_ip("test_if", 0),
+ "netperf_opts" : "-i 5 -L %s" %
m1.get_ip("test_if", 0)})
+
+netperf_cli_udp.update_options({"netperf_server" :
m2.get_ip("test_if", 0),
+ "netperf_opts" : "-i 5 -L %s" %
m1.get_ip("test_if", 0)})
+
+netperf_cli_tcp6.update_options({"netperf_server" :
m2.get_ip("test_if", 1),
+ "netperf_opts" : "-i 5 -L %s -6" %
m1.get_ip("test_if", 1)})
+
+netperf_cli_udp6.update_options({"netperf_server" :
m2.get_ip("test_if", 1),
+ "netperf_opts" : "-i 5 -L %s -6" %
m1.get_ip("test_if", 1)})
for offload in offloads:
for state in ["off", "on"]:
@@ -194,16 +317,159 @@ for offload in offloads:
state))
if ipv in [ 'ipv4', 'both' ]:
m2.run(ping_mod)
+
+ # prepare PerfRepo result for tcp
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv4_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv4_id,
"tcp_ipv4_result")
+ result_tcp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_server',
"testmachine2")
+ result_tcp.set_parameter('netperf_client',
"testmachine1")
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
+ # prepare PerfRepo result for udp
+ if udp_ipv4_id is not None:
+ result_udp = perf_api.new_result(udp_ipv4_id,
"udp_ipv4_result")
+ result_udp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_server',
"testmachine1")
+ result_tcp.set_parameter('netperf_client',
"testmachine2")
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
server_proc = m2.run(netperf_srv, bg=True)
ctl.wait(2)
- m1.run(netperf_cli_tcp, timeout=70)
- m1.run(netperf_cli_udp, timeout=70)
+ tcp_res_data = m1.run(netperf_cli_tcp, timeout = int(netperf_duration)*5 +
20)
+ udp_res_data = m1.run(netperf_cli_udp, timeout = int(netperf_duration)*5 +
20)
server_proc.intr()
+ if result_tcp is not None and\
+ tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
+
if ipv in [ 'ipv6', 'both' ]:
m2.run(ping_mod6)
+
+ # prepare PerfRepo result for tcp
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv6_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv6_id,
"tcp_ipv6_result")
+ result_tcp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_server',
"testmachine2")
+ result_tcp.set_parameter('netperf_client',
"testmachine1")
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
+ # prepare PerfRepo result for udp
+ if udp_ipv6_id is not None:
+ result_udp = perf_api.new_result(udp_ipv4_id,
"udp_ipv6_result")
+ result_udp.set_parameter(offload, state)
+ result_tcp.set_parameter('netperf_server',
"testmachine2")
+ result_tcp.set_parameter('netperf_client',
"testmachine1")
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
server_proc = m2.run(netperf_srv6, bg=True)
ctl.wait(2)
- m1.run(netperf_cli_tcp6, timeout=70)
- m1.run(netperf_cli_udp6, timeout=70)
+ tcp_res_data = m1.run(netperf_cli_tcp6, timeout = int(netperf_duration)*5 +
20)
+ udp_res_data = m1.run(netperf_cli_udp6, timeout = int(netperf_duration)*5 +
20)
server_proc.intr()
+
+ if result_tcp is not None and tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
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 4dcded8..3ac8cb9 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
@@ -1,9 +1,30 @@
+import logging
from lnst.Controller.Task import ctl
+from lnst.Controller.PerfRepoUtils import parse_id_mapping, get_id
# ------
# SETUP
# ------
+mapping_file = ctl.get_alias("mapping_file")
+mapping = parse_id_mapping(mapping_file)
+
+product_name = ctl.get_alias("product_name")
+
+tcp_ipv4_id = get_id(mapping, "tcp_ipv4_id")
+tcp_ipv6_id = get_id(mapping, "tcp_ipv6_id")
+udp_ipv4_id = get_id(mapping, "udp_ipv4_id")
+udp_ipv6_id = get_id(mapping, "udp_ipv6_id")
+
+if tcp_ipv4_id is not None or\
+ tcp_ipv6_id is not None or\
+ udp_ipv4_id is not None or\
+ udp_ipv6_id is not None:
+ perf_api = ctl.connect_PerfRepo()
+ logging.info("PerfRepo support enabled for this run.")
+else:
+ logging.info("PerfRepo support disabled for this run.")
+
# Host 1 + guests 1 and 2
h1 = ctl.get_host("host1")
g1 = ctl.get_host("guest1")
@@ -78,7 +99,8 @@ netperf_cli_tcp = ctl.get_module("Netperf",
"netperf_server" :
g1.get_ip("guestnic"),
"duration" : netperf_duration,
"testname" : "TCP_STREAM",
- "netperf_opts" : "-L %s" %
+ "confidence" : "99,5",
+ "netperf_opts" : "-i 5 -L %s"
%
g3.get_ip("guestnic")
})
@@ -88,7 +110,8 @@ netperf_cli_udp = ctl.get_module("Netperf",
"netperf_server" :
g1.get_ip("guestnic"),
"duration" : netperf_duration,
"testname" : "UDP_STREAM",
- "netperf_opts" : "-L %s" %
+ "confidence" : "99,5",
+ "netperf_opts" : "-i 5 -L %s"
%
g3.get_ip("guestnic")
})
@@ -99,8 +122,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf",
g1.get_ip("guestnic", 1),
"duration" : netperf_duration,
"testname" : "TCP_STREAM",
+ "confidence" : "99,5",
"netperf_opts" :
- "-L %s -6" %
g3.get_ip("guestnic", 1)
+ -i 5 "-L %s -6" %
g3.get_ip("guestnic", 1)
})
netperf_cli_udp6 = ctl.get_module("Netperf",
@@ -110,8 +134,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf",
g1.get_ip("guestnic", 1),
"duration" : netperf_duration,
"testname" : "UDP_STREAM",
+ "confidence" : "99,5",
"netperf_opts" :
- "-L %s -6" %
g3.get_ip("guestnic", 1)
+ "-i 5 -L %s -6" %
g3.get_ip("guestnic", 1)
})
ping_mod_bad = ctl.get_module("IcmpPing",
@@ -173,20 +198,152 @@ for offload in offloads:
g1.run(ping_mod_bad, expect="fail")
g3.run(ping_mod_bad2, expect="fail")
+ # prepare PerfRepo result for tcp
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv4_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv4_id,
"tcp_ipv4_result")
+ result_tcp.set_parameter(offload, state)
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+ # prepare PerfRepo result for udp
+ if udp_ipv4_id is not None:
+ result_udp = perf_api.new_result(udp_ipv4_id,
"udp_ipv4_result")
+ result_udp.set_parameter(offload, state)
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
server_proc = g1.run(netperf_srv, bg=True)
ctl.wait(2)
- g3.run(netperf_cli_tcp, timeout=70)
- g3.run(netperf_cli_udp, timeout=70)
+ result_tcp = g3.run(netperf_cli_tcp, timeout = int(netperf_duration)*5 + 20)
+ result_udp = g3.run(netperf_cli_udp, timeout = int(netperf_duration)*5 + 20)
server_proc.intr()
+ if result_tcp is not None and\
+ tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
+
if ipv in [ 'ipv6', 'both' ]:
g1.run(ping_mod6)
g4.run(ping_mod62)
g1.run(ping_mod6_bad, expect="fail")
g3.run(ping_mod6_bad2, expect="fail")
+ # prepare PerfRepo result for tcp ipv6
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv6_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv6_id,
"tcp_ipv6_result")
+ result_tcp.set_parameter(offload, state)
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
+ # prepare PerfRepo result for udp ipv6
+ if udp_ipv6_id is not None:
+ result_udp = perf_api.new_result(udp_ipv6_id,
"udp_ipv6_result")
+ result_udp.set_parameter(offload, state)
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
server_proc = g1.run(netperf_srv6, bg=True)
ctl.wait(2)
- g3.run(netperf_cli_tcp6, timeout=70)
- g3.run(netperf_cli_udp6, timeout=70)
+ result_tcp = g3.run(netperf_cli_tcp6, timeout = int(netperf_duration)*5 +
20)
+ result_udp = g3.run(netperf_cli_udp6, timeout = int(netperf_duration)*5 +
20)
server_proc.intr()
+
+ if result_tcp is not None and tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
diff --git
a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml
b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml
index 4f1c7b1..95e1c20 100644
---
a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml
+++
b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml
@@ -2,6 +2,7 @@
<define>
<alias name="ipv" value="both" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="virtual_ovs_bridge_2_vlans_over_active_backup_bond.mapping" />
</define>
<network>
<host id="host1">
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 e8099b8..24ea12d 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
@@ -1,9 +1,30 @@
+import logging
from lnst.Controller.Task import ctl
+from lnst.Controller.PerfRepoUtils import parse_id_mapping, get_id
# ------
# SETUP
# ------
+mapping_file = ctl.get_alias("mapping_file")
+mapping = parse_id_mapping(mapping_file)
+
+product_name = ctl.get_alias("product_name")
+
+tcp_ipv4_id = get_id(mapping, "tcp_ipv4_id")
+tcp_ipv6_id = get_id(mapping, "tcp_ipv6_id")
+udp_ipv4_id = get_id(mapping, "udp_ipv4_id")
+udp_ipv6_id = get_id(mapping, "udp_ipv6_id")
+
+if tcp_ipv4_id is not None or\
+ tcp_ipv6_id is not None or\
+ udp_ipv4_id is not None or\
+ udp_ipv6_id is not None:
+ perf_api = ctl.connect_PerfRepo()
+ logging.info("PerfRepo support enabled for this run.")
+else:
+ logging.info("PerfRepo support disabled for this run.")
+
h1 = ctl.get_host("host1")
g1 = ctl.get_host("guest1")
@@ -56,7 +77,8 @@ netperf_cli_tcp = ctl.get_module("Netperf",
"netperf_server" :
g1.get_ip("vlan10"),
"duration" : netperf_duration,
"testname" : "TCP_STREAM",
- "netperf_opts" : "-L %s" %
+ "confidence" : "99,5",
+ "netperf_opts" : "-i 5 -L %s"
%
h2.get_ip("vlan10")
})
@@ -66,7 +88,8 @@ netperf_cli_udp = ctl.get_module("Netperf",
"netperf_server" :
g1.get_ip("vlan10"),
"duration" : netperf_duration,
"testname" : "UDP_STREAM",
- "netperf_opts" : "-L %s" %
+ "confidence" : "99,5",
+ "netperf_opts" : "-i 5 -L %s"
%
h2.get_ip("vlan10")
})
@@ -77,8 +100,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf",
g1.get_ip("vlan10", 1),
"duration" : netperf_duration,
"testname" : "TCP_STREAM",
+ "confidence" : "99,5",
"netperf_opts" :
- "-L %s -6" %
h2.get_ip("vlan10", 1)
+ "-i 5 -L %s -6" %
h2.get_ip("vlan10", 1)
})
netperf_cli_udp6 = ctl.get_module("Netperf",
@@ -88,8 +112,9 @@ netperf_cli_udp6 = ctl.get_module("Netperf",
g1.get_ip("vlan10", 1),
"duration" : netperf_duration,
"testname" : "UDP_STREAM",
+ "confidence" : "99,5",
"netperf_opts" :
- "-L %s -6" %
h2.get_ip("vlan10", 1)
+ "-i 5 -L %s -6" %
h2.get_ip("vlan10", 1)
})
ctl.wait(15)
@@ -104,18 +129,152 @@ for offload in offloads:
offload, state))
if ipv in [ 'ipv4', 'both' ]:
g1.run(ping_mod)
+
+ # prepare PerfRepo result for tcp
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv4_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv4_id,
"tcp_ipv4_result")
+ result_tcp.set_parameter(offload, state)
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+ # prepare PerfRepo result for udp
+ if udp_ipv4_id is not None:
+ result_udp = perf_api.new_result(udp_ipv4_id,
"udp_ipv4_result")
+ result_udp.set_parameter(offload, state)
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
server_proc = g1.run(netperf_srv, bg=True)
ctl.wait(2)
- h2.run(netperf_cli_tcp, timeout=70)
- h2.run(netperf_cli_udp, timeout=70)
+ tcp_res_data = h2.run(netperf_cli_tcp, timeout = int(netperf_duration)*5 +
20)
+ udp_res_data = h2.run(netperf_cli_udp, timeout = int(netperf_duration)*5 +
20)
server_proc.intr()
+ if result_tcp is not None and\
+ tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
+
if ipv in [ 'ipv6', 'both' ]:
g1.run(ping_mod6)
+
+ # prepare PerfRepo result for tcp ipv6
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv6_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv6_id,
"tcp_ipv6_result")
+ result_tcp.set_parameter(offload, state)
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
+ # prepare PerfRepo result for udp ipv6
+ if udp_ipv6_id is not None:
+ result_udp = perf_api.new_result(udp_ipv6_id,
"udp_ipv6_result")
+ result_udp.set_parameter(offload, state)
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
server_proc = g1.run(netperf_srv6, bg=True)
ctl.wait(2)
- h2.run(netperf_cli_tcp6, timeout=70)
- h2.run(netperf_cli_udp6, timeout=70)
+ tcp_res_data = h2.run(netperf_cli_tcp6, timeout = int(netperf_duration)*5 +
20)
+ udp_res_data = h2.run(netperf_cli_udp6, timeout = int(netperf_duration)*5 +
20)
server_proc.intr()
+
+ if result_tcp is not None and tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
index 6f08cdd..beb75d2 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
@@ -2,6 +2,7 @@
<define>
<alias name="ipv" value="both" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="virtual_ovs_bridge_vlan_in_guest.mapping" />
</define>
<network>
<host id="host1">
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 fdf7186..c9b68bf 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
@@ -1,9 +1,28 @@
+import logging
from lnst.Controller.Task import ctl
+from lnst.Controller.PerfRepoUtils import parse_id_mapping, get_id
# ------
# SETUP
# ------
+mapping_file = ctl.get_alias("mapping_file")
+mapping = parse_id_mapping(mapping_file)
+
+tcp_ipv4_id = get_id(mapping, "tcp_ipv4_id")
+tcp_ipv6_id = get_id(mapping, "tcp_ipv6_id")
+udp_ipv4_id = get_id(mapping, "udp_ipv4_id")
+udp_ipv6_id = get_id(mapping, "udp_ipv6_id")
+
+if tcp_ipv4_id is not None or\
+ tcp_ipv6_id is not None or\
+ udp_ipv4_id is not None or\
+ udp_ipv6_id is not None:
+ perf_api = ctl.connect_PerfRepo()
+ logging.info("PerfRepo support enabled for this run.")
+else:
+ logging.info("PerfRepo support disabled for this run.")
+
h1 = ctl.get_host("host1")
g1 = ctl.get_host("guest1")
@@ -56,7 +75,8 @@ netperf_cli_tcp = ctl.get_module("Netperf",
"netperf_server" :
g1.get_ip("guestnic"),
"duration" : netperf_duration,
"testname" : "TCP_STREAM",
- "netperf_opts" : "-L %s" %
+ "confidence" : "99,5",
+ "netperf_opts" : "-i 5 -L %s"
%
h2.get_ip("vlan10")
})
@@ -66,7 +86,8 @@ netperf_cli_udp = ctl.get_module("Netperf",
"netperf_server" :
g1.get_ip("guestnic"),
"duration" : netperf_duration,
"testname" : "UDP_STREAM",
- "netperf_opts" : "-L %s" %
+ "confidence" : "99,5",
+ "netperf_opts" : "-i 5 -L %s"
%
h2.get_ip("vlan10")
})
@@ -77,8 +98,9 @@ netperf_cli_tcp6 = ctl.get_module("Netperf",
g1.get_ip("guestnic", 1),
"duration" : netperf_duration,
"testname" : "TCP_STREAM",
+ "confidence" : "99,5",
"netperf_opts" :
- "-L %s -6" %
h2.get_ip("vlan10", 1)
+ "-i 5 -L %s -6" %
h2.get_ip("vlan10", 1)
})
netperf_cli_udp6 = ctl.get_module("Netperf",
@@ -88,31 +110,166 @@ netperf_cli_udp6 = ctl.get_module("Netperf",
g1.get_ip("guestnic", 1),
"duration" : netperf_duration,
"testname" : "UDP_STREAM",
+ "confidence" : "99,5",
"netperf_opts" :
- "-L %s -6" %
h2.get_ip("vlan10", 1)
+ "-i 5 -L %s -6" %
h2.get_ip("vlan10", 1)
})
ctl.wait(15)
for offload in offloads:
for state in ["off", "on"]:
- h1.run("ethtool -K %s %s %s" % (h1.get_devname("nic"),
- offload, state))
- g1.run("ethtool -K %s %s %s" %
(g1.get_devname("guestnic"),
- offload, state))
- h2.run("ethtool -K %s %s %s" % (h2.get_devname("nic"),
- offload, state))
- if ipv in [ 'ipv4', 'both' ]:
- g1.run(ping_mod)
- server_proc = g1.run(netperf_srv, bg=True)
- ctl.wait(2)
- h2.run(netperf_cli_tcp, timeout=65)
- h2.run(netperf_cli_udp, timeout=65)
- server_proc.intr()
-
- if ipv in [ 'ipv6', 'both' ]:
- g1.run(ping_mod6)
- server_proc = g1.run(netperf_srv6, bg=True)
- ctl.wait(2)
- h2.run(netperf_cli_tcp6, timeout=65)
- h2.run(netperf_cli_udp6, timeout=65)
- server_proc.intr()
+ h1.run("ethtool -K %s %s %s" % (h1.get_devname("nic"),
+ offload, state))
+ g1.run("ethtool -K %s %s %s" % (g1.get_devname("guestnic"),
+ offload, state))
+ h2.run("ethtool -K %s %s %s" % (h2.get_devname("nic"),
+ offload, state))
+ if ipv in [ 'ipv4', 'both' ]:
+ g1.run(ping_mod)
+
+ # prepare PerfRepo result for tcp
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv4_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv4_id,
"tcp_ipv4_result")
+ result_tcp.set_parameter(offload, state)
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+ # prepare PerfRepo result for udp
+ if udp_ipv4_id is not None:
+ result_udp = perf_api.new_result(udp_ipv4_id,
"udp_ipv4_result")
+ result_udp.set_parameter(offload, state)
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
+ server_proc = g1.run(netperf_srv, bg=True)
+ ctl.wait(2)
+ tcp_res_data = h2.run(netperf_cli_tcp, timeout = int(netperf_duration)*5 +
20)
+ udp_res_data = h2.run(netperf_cli_udp, timeout = int(netperf_duration)*5 +
20)
+ server_proc.intr()
+
+ if result_tcp is not None and\
+ tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
+
+ if ipv in [ 'ipv6', 'both' ]:
+ g1.run(ping_mod6)
+
+ # prepare PerfRepo result for tcp ipv6
+ result_tcp = None
+ result_udp = None
+ if tcp_ipv6_id is not None:
+ result_tcp = perf_api.new_result(tcp_ipv6_id,
"tcp_ipv6_result")
+ result_tcp.set_parameter(offload, state)
+ if product_name is not None:
+ result_tcp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_tcp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_tcp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
+ # prepare PerfRepo result for udp ipv6
+ if udp_ipv6_id is not None:
+ result_udp = perf_api.new_result(udp_ipv6_id,
"udp_ipv6_result")
+ result_udp.set_parameter(offload, state)
+ if product_name is not None:
+ result_udp.set_tag(product_name)
+ res_hash = result_tcp.generate_hash(['kernel-release',
+ 'redhat-release'])
+ result_udp.set_tag(res_hash)
+
+ baseline = None
+ report_id = get_id(mapping, res_hash)
+ if report_id is not None:
+ baseline = perf_api.get_baseline(report_id)
+
+ if baseline is not None:
+ baseline_throughput =
baseline.get_value('throughput').get_result()
+ baseline_deviation =
baseline.get_value('throughput_deviation').get_result()
+ netperf_cli_udp.update_options({'threshold': '%s
bits/sec' % baseline_throughput,
+ 'threshold_deviation':
'%s bits/sec' % baseline_deviation})
+
+ server_proc = g1.run(netperf_srv6, bg=True)
+ ctl.wait(2)
+ tcp_res_data = h2.run(netperf_cli_tcp6, timeout = int(netperf_duration)*5 +
20)
+ udp_res_data = h2.run(netperf_cli_udp6, timeout = int(netperf_duration)*5 +
20)
+ server_proc.intr()
+
+ if result_tcp is not None and tcp_res_data.get_result() is not None and\
+ tcp_res_data.get_result()['res_data'] is not None:
+ rate = tcp_res_data.get_result()['res_data']['rate']
+ deviation =
tcp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_tcp.add_value('throughput', rate)
+ result_tcp.add_value('throughput_min', rate - deviation)
+ result_tcp.add_value('throughput_max', rate + deviation)
+ result_tcp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_tcp)
+
+ if result_udp is not None and udp_res_data.get_result() is not None and\
+ result_udp.get_result()['res_data'] is not None:
+ rate = udp_res_data.get_result()['res_data']['rate']
+ deviation =
udp_res_data.get_result()['res_data']['rate_deviation']
+
+ result_udp.add_value('throughput', rate)
+ result_udp.add_value('throughput_min', rate - deviation)
+ result_udp.add_value('throughput_max', rate + deviation)
+ result_udp.add_value('throughput_deviation', deviation)
+ perf_api.save_result(result_udp)
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
index a5bbc39..e931335 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
@@ -2,6 +2,7 @@
<define>
<alias name="ipv" value="both" />
<alias name="netperf_duration" value="60" />
+ <alias name="mapping_file"
value="virtual_ovs_bridge_vlan_in_host.mapping" />
</define>
<network>
<host id="host1">
--
2.5.0