This can me squashed into the patch #7 that introduced this method and #TODO
-Ondrej
On Thu, Feb 18, 2021 at 01:58:44PM +0100, Jan Tluka wrote:
This fixes the recipe failure when the perf_tool_cpu parameter is not
specified.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
.../ENRT/MeasurementGenerators/IperfMeasurementGenerator.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Recipes/ENRT/MeasurementGenerators/IperfMeasurementGenerator.py
b/lnst/Recipes/ENRT/MeasurementGenerators/IperfMeasurementGenerator.py
index adac62a2..2a09b70f 100644
--- a/lnst/Recipes/ENRT/MeasurementGenerators/IperfMeasurementGenerator.py
+++ b/lnst/Recipes/ENRT/MeasurementGenerators/IperfMeasurementGenerator.py
@@ -154,9 +154,11 @@ class IperfMeasurementGenerator(BaseMeasurementGenerator):
if process_no is None:
return None
- # TODO: what if cpu related params are None, return None?
+ try:
+ cpus = self.params.perf_tool_cpu
+ except:
+ return None
- cpus = self.params.perf_tool_cpu
if self.params.perf_tool_cpu_policy == 'round-robin':
return [cpus[process_no % len(cpus)]]
elif self.params.perf_tool_cpu_policy == 'all':
--
2.26.2
_______________________________________________
LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...
Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure