Wed, Nov 25, 2015 at 04:53:38PM CET, olichtne(a)redhat.com wrote:
From: Ondrej Lichtner <olichtne(a)redhat.com>
This patch adds two minor fixes for the multithreading support of the
regression tests.
First is that cpu pinning should be ignored when running multiple
netperf clients.
Second is that result objects sent to PerfRepo should carry information
about the number of netperf clients used.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
recipes/regression_tests/phase1/3_vlans.py | 14 ++++++++++-
.../regression_tests/phase1/3_vlans_over_bond.py | 14 ++++++++++-
recipes/regression_tests/phase1/bonding_test.py | 14 ++++++++++-
.../phase1/virtual_bridge_2_vlans_over_bond.py | 12 ++++++++++
.../phase1/virtual_bridge_vlan_in_guest.py | 14 ++++++++++-
.../phase1/virtual_bridge_vlan_in_host.py | 14 ++++++++++-
.../regression_tests/phase2/3_vlans_over_team.py | 14 ++++++++++-
recipes/regression_tests/phase2/team_test.py | 28 ++++++++++++++++++++--
...l_ovs_bridge_2_vlans_over_active_backup_bond.py | 12 ++++++++++
.../phase2/virtual_ovs_bridge_vlan_in_guest.py | 14 ++++++++++-
.../phase2/virtual_ovs_bridge_vlan_in_host.py | 14 ++++++++++-
11 files changed, 154 insertions(+), 10 deletions(-)
diff --git a/recipes/regression_tests/phase1/3_vlans.py
b/recipes/regression_tests/phase1/3_vlans.py
index 163daa9..907ad3c 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -136,7 +136,7 @@ for vlan1 in vlans:
netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)})
p_opts = "-L %s" % (m2_vlan2.get_ip(0))
- if nperf_cpupin:
+ if nperf_cpupin and nperf_mode != "multi":
p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin)
netperf_cli_tcp.update_options({"netperf_server": m1_vlan1.get_ip(0),
@@ -183,6 +183,9 @@ for vlan1 in vlans:
result_tcp.set_parameter('netperf_server_on_vlan', vlan1)
result_tcp.set_parameter('netperf_client_on_vlan', vlan2)
result_tcp.add_tag(product_name)
+ if nperf_mode == "multi":
+ result_tcp.add_tag("multithreaded")
+ result_tcp.set_parameter('num_parallel',
nperf_num_parallel)
Since nperf_num_parallel is converted to int() this patch introduced
regression:
Traceback (most recent call last):
File "/usr/bin/lnst-ctl", line 125, in get_recipe_result
res = exec_action(action, nettestctl)
File "/usr/bin/lnst-ctl", line 81, in exec_action
return nettestctl.run_recipe()
File
"/usr/lib/python2.7/site-packages/lnst/Controller/NetTestController.py", line
639, in run_recipe
res = self._run_recipe()
File
"/usr/lib/python2.7/site-packages/lnst/Controller/NetTestController.py", line
657, in _run_recipe
res = self._run_task(task)
File
"/usr/lib/python2.7/site-packages/lnst/Controller/NetTestController.py", line
705, in _run_task
return self._run_python_task(task)
File
"/usr/lib/python2.7/site-packages/lnst/Controller/NetTestController.py", line
694, in _run_python_task
module = imp.load_source(name, task_path.resolve())
File
"/usr/share/lnst/recipes/regression_tests/phase1/3_vlans_over_bond.py", line
194, in <module>
baseline = perf_api.get_baseline_of_result(result_tcp)
File "/usr/lib/python2.7/site-packages/lnst/Controller/Task.py", line 648,
in get_baseline_of_result
res_hash = result.generate_hash()
File "/usr/lib/python2.7/site-packages/lnst/Controller/Task.py", line 774,
in generate_hash
sha1.update(i[1])
TypeError: must be string or buffer, not int
I am now testing with the int() conversion removed as this could be solution
for the issue.
-Jan