From: Ondrej Lichtner <olichtne(a)redhat.com>
This patch adds initial support for PerfRepo integration to the phase1
regression test recipes. All recipes with PerfRepo integration have an
updated README file that describes how to enable this feature. Please
remember that you also need to configure the LNST Controller to be able
to connect to a PerfRepo instance.
In addition to that I refactored the usage of test modules by reusing
the same object with updated parameters for multiple runs of the same
test.
The patch also contains a minor fix connected to the test duration
alias - changing the test duration wasn't reflected in the timeout value
of the test therefore resulting in timeouts in case you defined a high
enough value in the alias.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
recipes/regression_tests/phase1/3_vlans.README | 30 ++
recipes/regression_tests/phase1/3_vlans.py | 313 ++++++++++++++++-----
recipes/regression_tests/phase1/3_vlans.xml | 1 +
.../phase1/3_vlans_over_active_backup_bond.README | 30 ++
.../phase1/3_vlans_over_active_backup_bond.xml | 1 +
.../regression_tests/phase1/3_vlans_over_bond.py | 313 ++++++++++++++++-----
.../phase1/3_vlans_over_round_robin_bond.README | 32 ++-
.../phase1/3_vlans_over_round_robin_bond.xml | 1 +
.../phase1/active_backup_bond.README | 30 ++
.../regression_tests/phase1/active_backup_bond.xml | 1 +
.../phase1/active_backup_double_bond.README | 30 ++
.../phase1/active_backup_double_bond.xml | 1 +
recipes/regression_tests/phase1/bonding_test.py | 175 +++++++++++-
.../phase1/round_robin_bond.README | 30 ++
.../regression_tests/phase1/round_robin_bond.xml | 1 +
.../phase1/round_robin_double_bond.README | 30 ++
.../phase1/round_robin_double_bond.xml | 1 +
...l_bridge_2_vlans_over_active_backup_bond.README | 30 ++
...tual_bridge_2_vlans_over_active_backup_bond.xml | 1 +
.../phase1/virtual_bridge_2_vlans_over_bond.py | 173 +++++++++++-
.../phase1/virtual_bridge_vlan_in_guest.README | 30 ++
.../phase1/virtual_bridge_vlan_in_guest.py | 175 +++++++++++-
.../phase1/virtual_bridge_vlan_in_guest.xml | 1 +
.../phase1/virtual_bridge_vlan_in_host.README | 32 ++-
.../phase1/virtual_bridge_vlan_in_host.py | 207 ++++++++++++--
.../phase1/virtual_bridge_vlan_in_host.xml | 1 +
26 files changed, 1467 insertions(+), 203 deletions(-)
diff --git a/recipes/regression_tests/phase1/3_vlans.README
b/recipes/regression_tests/phase1/3_vlans.README
index 54037a5..b559a44 100644
--- a/recipes/regression_tests/phase1/3_vlans.README
+++ b/recipes/regression_tests/phase1/3_vlans.README
@@ -43,3 +43,33 @@ Test description (3_vlans.py):
Offloads:
+ TSO, GRO, GSO
+ tested both on/off variants
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ 3_vlans.mapping and define the following id mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git a/recipes/regression_tests/phase1/3_vlans.py
b/recipes/regression_tests/phase1/3_vlans.py
index 7e2360e..1a2c834 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.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")
@@ -34,80 +56,77 @@ for vlan in vlans:
ctl.wait(15)
+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",
+ "duration" : netperf_duration,
+ "testname" : "TCP_STREAM",
+ "confidence" : "99,5"
+ })
+netperf_cli_udp6 = ctl.get_module("Netperf",
+ options={
+ "role" : "client",
+ "duration" : netperf_duration,
+ "testname" : "UDP_STREAM",
+ "confidence" : "99,5"
+ })
+
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)
- })
-
- 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)
- })
-
- 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)
- })
-
- 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)
- })
+ 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
@@ -123,24 +142,166 @@ 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' ]:
# Ping test
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/phase1/3_vlans.xml
b/recipes/regression_tests/phase1/3_vlans.xml
index aeb3ed1..fbbc583 100644
--- a/recipes/regression_tests/phase1/3_vlans.xml
+++ b/recipes/regression_tests/phase1/3_vlans.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.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.README
b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.README
index f2d2c4c..83e3537 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.README
+++ b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.README
@@ -52,3 +52,33 @@ Test description:
Offloads:
+ TSO, GRO, GSO
+ tested both on/off variants
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ 3_vlans_over_active_backup_bond.mapping and define the following id mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
index bcaf221..925d9f1 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_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="3_vlans_over_active_backup_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py
b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index 6fa1d80..c9d3286 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.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")
@@ -34,80 +56,77 @@ for vlan in vlans:
ctl.wait(15)
+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",
+ "duration" : netperf_duration,
+ "testname" : "TCP_STREAM",
+ "confidence" : "99,5"
+ })
+netperf_cli_udp6 = ctl.get_module("Netperf",
+ options={
+ "role" : "client",
+ "duration" : netperf_duration,
+ "testname" : "UDP_STREAM",
+ "confidence" : "99,5"
+ })
+
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",
- 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)
- })
-
- 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)
- })
+ 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
@@ -125,24 +144,166 @@ 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' ]:
# Ping test
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/phase1/3_vlans_over_round_robin_bond.README
b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.README
index 2d31025..ad18ae7 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.README
+++ b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.README
@@ -31,7 +31,7 @@ Topology:
+--------------------+ +--------------------+
Number of hosts: 2
-Host #1 decsription:
+Host #1 description:
Two ethernet devices, in round-robin bond mode
3 VLANs on bond interface
Host #2 description:
@@ -52,3 +52,33 @@ Test description:
Offloads:
+ TSO, GRO, GSO
+ tested both on/off variants
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ 3_vlans_over_round_robin_bond.mapping and define the following id mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git a/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
index 922f696..2fd3ede 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_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="3_vlans_over_round_robin_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/active_backup_bond.README
b/recipes/regression_tests/phase1/active_backup_bond.README
index 8980098..5cc8c2d 100644
--- a/recipes/regression_tests/phase1/active_backup_bond.README
+++ b/recipes/regression_tests/phase1/active_backup_bond.README
@@ -49,3 +49,33 @@ Test description:
Offloads:
+ TSO, GRO, GSO
+ tested both on/off variants
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ active_backup_bond.mapping and define the following id mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git a/recipes/regression_tests/phase1/active_backup_bond.xml
b/recipes/regression_tests/phase1/active_backup_bond.xml
index 720c6c2..cfd44fc 100644
--- a/recipes/regression_tests/phase1/active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/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_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/active_backup_double_bond.README
b/recipes/regression_tests/phase1/active_backup_double_bond.README
index 5deb92f..fdb2368 100644
--- a/recipes/regression_tests/phase1/active_backup_double_bond.README
+++ b/recipes/regression_tests/phase1/active_backup_double_bond.README
@@ -49,3 +49,33 @@ Test description:
Offloads:
+ TSO, GRO, GSO
+ tested both on/off variants
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ active_backup_double_bond.mapping and define the following id mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git a/recipes/regression_tests/phase1/active_backup_double_bond.xml
b/recipes/regression_tests/phase1/active_backup_double_bond.xml
index 417622c..cf83e7a 100644
--- a/recipes/regression_tests/phase1/active_backup_double_bond.xml
+++ b/recipes/regression_tests/phase1/active_backup_double_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_double_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/bonding_test.py
b/recipes/regression_tests/phase1/bonding_test.py
index acc3748..29f251a 100644
--- a/recipes/regression_tests/phase1/bonding_test.py
+++ b/recipes/regression_tests/phase1/bonding_test.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")
@@ -61,7 +82,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 +92,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 +103,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 +114,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,16 +129,150 @@ 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)
+ 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 = 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 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 = 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()
+
+ 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/phase1/round_robin_bond.README
b/recipes/regression_tests/phase1/round_robin_bond.README
index 06244f8..2a6db04 100644
--- a/recipes/regression_tests/phase1/round_robin_bond.README
+++ b/recipes/regression_tests/phase1/round_robin_bond.README
@@ -49,3 +49,33 @@ Test description:
Offloads:
+ TSO, GRO, GSO
+ tested both on/off variants
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ round_robin_bond.mapping and define the following id mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git a/recipes/regression_tests/phase1/round_robin_bond.xml
b/recipes/regression_tests/phase1/round_robin_bond.xml
index 619b4f5..ec43383 100644
--- a/recipes/regression_tests/phase1/round_robin_bond.xml
+++ b/recipes/regression_tests/phase1/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_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/round_robin_double_bond.README
b/recipes/regression_tests/phase1/round_robin_double_bond.README
index e5b127d..5366ce0 100644
--- a/recipes/regression_tests/phase1/round_robin_double_bond.README
+++ b/recipes/regression_tests/phase1/round_robin_double_bond.README
@@ -49,3 +49,33 @@ Test description:
Offloads:
+ TSO, GRO, GSO
+ tested both on/off variants
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ round_robin_double_bond.mapping and define the following id mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git a/recipes/regression_tests/phase1/round_robin_double_bond.xml
b/recipes/regression_tests/phase1/round_robin_double_bond.xml
index 4c00f70..c283826 100644
--- a/recipes/regression_tests/phase1/round_robin_double_bond.xml
+++ b/recipes/regression_tests/phase1/round_robin_double_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_double_bond.mapping" />
</define>
<network>
<host id="testmachine1">
diff --git
a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.README
b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.README
index 876c89c..ce3fb8e 100644
---
a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.README
+++
b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.README
@@ -74,3 +74,33 @@ Test description:
+ duration: 5
+ TCP_STREAM and UDP_STREAM
+ between guests in same VLANs
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ virtual_bridge_2_vlans_over_active_backup_bond.mapping and define the following id
mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git
a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml
b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml
index 2c9ed11..c320a93 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/virtual_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_bridge_2_vlans_over_bond.mapping" />
</define>
<network>
<host id="host1">
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
index 8347eaf..39d3079 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
@@ -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")
@@ -77,7 +98,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")
})
@@ -87,7 +109,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")
})
@@ -98,8 +121,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",
@@ -109,8 +133,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",
@@ -171,20 +196,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)
+ g3.run(netperf_cli_tcp, timeout = int(netperf_duration)*5 + 20)
+ 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)
+ g3.run(netperf_cli_tcp6, timeout = int(netperf_duration)*5 + 20)
+ 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/phase1/virtual_bridge_vlan_in_guest.README
b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.README
index 673a6c2..d6c26ed 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.README
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.README
@@ -50,3 +50,33 @@ Test description:
+ duration: 60s
+ TCP_STREAM and UDP_STREAM
+ between guest1's VLAN10 and host2's VLAN10
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ virtual_bridge_vlan_in_guest.mapping and define the following id mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
index bc90f5d..44e9d42 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase1/virtual_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)
@@ -105,18 +130,152 @@ for offload in offloads:
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/phase1/virtual_bridge_vlan_in_guest.xml
b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml
index ea49082..a980bfb 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml
+++ b/recipes/regression_tests/phase1/virtual_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_bridge_vlan_in_guest.mapping" />
</define>
<network>
<host id="host1">
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.README
b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.README
index 9ab0b5a..7910b28 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.README
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.README
@@ -40,7 +40,7 @@ Host #2 description:
Guest #1 description:
One ethernet device
Test name:
- virtual_bridge_vlan_in_guest.py
+ virtual_bridge_vlan_in_host.py
Test description:
Ping:
+ count: 100
@@ -50,3 +50,33 @@ Test description:
+ duration: 60s
+ TCP_STREAM and UDP_STREAM
+ between guest1's NIC and host2's VLAN10
+
+PerfRepo integration:
+ First, preparation in PerfRepo is required - you need to create Test objects
+ through the web interface that properly describe the individual Netperf
+ tests that this recipe runs. Don't forget to also add appropriate metrics.
+ For these Netperf tests it's always:
+ * throughput
+ * throughput_min
+ * throughput_max
+ * throughput_deviation
+
+ After that, to enable support for PerfRepo you need to create the file
+ virtual_bridge_vlan_in_host.mapping and define the following id mappings:
+ tcp_ipv4_id -> to store ipv4 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ tcp_ipv6_id -> to store ipv6 TCP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv4_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+ udp_ipv6_id -> to store ipv4 UDP_STREAM Netperf test results, maps to TestUid of a
PerfRepo Test object
+
+ To enable result comparison agains baselines you need to create a Report in
+ PerfRepo that will store the baseline. Set up the Report to only contain results
+ with the same hash tag and then add a new mapping to the mapping file, with
+ this format:
+ <some_hash> = <report_id>
+
+ The hash value is automatically generated during test execution and added
+ to each result stored in PerfRepo. To get the Report id you need to open
+ that report in our browser and find if in the URL.
+
+ When running this recipe you should also define the 'product_name' alias
+ (e.g. RHEL7) in order to tag the result object in PerfRepo.
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
index 0344641..fcfd303 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase1/virtual_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,32 +110,167 @@ 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"]:
- g1.run("ethtool -K %s %s %s" %
(g1.get_devname("guestnic"),
- offload, state))
- h1.run("ethtool -K %s %s %s" % (h1.get_devname("nic"),
- 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=70)
- h2.run(netperf_cli_udp, timeout=70)
- 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=70)
- h2.run(netperf_cli_udp6, timeout=70)
- server_proc.intr()
+ g1.run("ethtool -K %s %s %s" % (g1.get_devname("guestnic"),
+ offload, state))
+ h1.run("ethtool -K %s %s %s" % (h1.get_devname("nic"),
+ 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/phase1/virtual_bridge_vlan_in_host.xml
b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml
index 3649ca9..fe79146 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml
+++ b/recipes/regression_tests/phase1/virtual_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_bridge_vlan_in_host.mapping" />
</define>
<network>
<host id="host1">
--
2.4.6