Test module get_opt() returns string representation of None rather than None value so we need to compare the attribute to 'None'. Without this the module will always return failure and throughput value will be silently ignored.
Fixes: 6ec96ab7 ("Netperf: fix SCTP_STREAM test") Signed-off-by: Jan Tluka jtluka@redhat.com --- test_modules/Netperf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py index 5ab0815..3c07922 100644 --- a/test_modules/Netperf.py +++ b/test_modules/Netperf.py @@ -218,7 +218,7 @@ class Netperf(TestGeneric): # pattern for SCTP streams and other tests # decimal decimal decimal float (float) pattern = "\d+\s+\d+\s+\d+\s+\d+.\d+\s+(\d+(?:.\d+){0,1})" - if self._cpu_util: + if self._cpu_util != 'None': # cpu utilization data in format: float float pattern += "\s+(\d+(?:.\d+){0,1})\s+(\d+(?:.\d+){0,1})"
@@ -228,7 +228,7 @@ class Netperf(TestGeneric): rate_in_kb = 0.0 else: rate_in_kb = float(r2.group(1)) - if self._cpu_util: + if self._cpu_util != 'None': res_val["LOCAL_CPU_UTIL"] = float(r2.group(2)) res_val["REMOTE_CPU_UTIL"] = float(r2.group(3))
On Thu, Oct 27, 2016 at 04:21:50PM +0200, Jan Tluka wrote:
Test module get_opt() returns string representation of None rather than None value so we need to compare the attribute to 'None'. Without this the module will always return failure and throughput value will be silently ignored.
Fixes: 6ec96ab7 ("Netperf: fix SCTP_STREAM test") Signed-off-by: Jan Tluka jtluka@redhat.com
test_modules/Netperf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py index 5ab0815..3c07922 100644 --- a/test_modules/Netperf.py +++ b/test_modules/Netperf.py @@ -218,7 +218,7 @@ class Netperf(TestGeneric): # pattern for SCTP streams and other tests # decimal decimal decimal float (float) pattern = "\d+\s+\d+\s+\d+\s+\d+.\d+\s+(\d+(?:.\d+){0,1})"
if self._cpu_util:
if self._cpu_util != 'None': # cpu utilization data in format: float float pattern += "\s+(\d+(?:\.\d+){0,1})\s+(\d+(?:\.\d+){0,1})"
@@ -228,7 +228,7 @@ class Netperf(TestGeneric): rate_in_kb = 0.0 else: rate_in_kb = float(r2.group(1))
if self._cpu_util:
if self._cpu_util != 'None': res_val["LOCAL_CPU_UTIL"] = float(r2.group(2)) res_val["REMOTE_CPU_UTIL"] = float(r2.group(3))
-- 2.7.4 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org
ack
Acked-by: Ondrej Lichtner olichtne@redhat.com
On Thu, Oct 27, 2016 at 04:21:50PM +0200, Jan Tluka wrote:
Test module get_opt() returns string representation of None rather than None value so we need to compare the attribute to 'None'. Without this the module will always return failure and throughput value will be silently ignored.
Fixes: 6ec96ab7 ("Netperf: fix SCTP_STREAM test") Signed-off-by: Jan Tluka jtluka@redhat.com
test_modules/Netperf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py index 5ab0815..3c07922 100644 --- a/test_modules/Netperf.py +++ b/test_modules/Netperf.py @@ -218,7 +218,7 @@ class Netperf(TestGeneric): # pattern for SCTP streams and other tests # decimal decimal decimal float (float) pattern = "\d+\s+\d+\s+\d+\s+\d+.\d+\s+(\d+(?:.\d+){0,1})"
if self._cpu_util:
if self._cpu_util != 'None': # cpu utilization data in format: float float pattern += "\s+(\d+(?:\.\d+){0,1})\s+(\d+(?:\.\d+){0,1})"
@@ -228,7 +228,7 @@ class Netperf(TestGeneric): rate_in_kb = 0.0 else: rate_in_kb = float(r2.group(1))
if self._cpu_util:
if self._cpu_util != 'None': res_val["LOCAL_CPU_UTIL"] = float(r2.group(2)) res_val["REMOTE_CPU_UTIL"] = float(r2.group(3))
-- 2.7.4 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org
pushed, thanks
-Ondrej
lnst-developers@lists.fedorahosted.org