There is an extra dot in regex for parsing RR threshold value. This patch removes it, so the parsing works now correctly.
Signed-off-by: Jiri Prochazka jprochaz@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 6cbd504..43dab42 100644 --- a/test_modules/Netperf.py +++ b/test_modules/Netperf.py @@ -337,8 +337,8 @@ class Netperf(TestGeneric): threshold_unit_type = "bps" elif (self._testname == "TCP_RR" or self._testname == "UDP_RR" or self._testname == "SCTP_RR"): - pattern_rr = "(\d*(.\d*)?)\s*trans./sec" - r1 = re.search(pattern_rr, threshold.lower()) + pattern_rr = "(\d*(.\d*)?)\s*Trans/sec" + r1 = re.search(pattern_rr, threshold) if r1 is None: res_data["msg"] = "Invalid unit type in the "\ "throughput option"
scratch this patch please, it looks like there is still some issue with the parsing
2017-05-25 18:01 GMT+02:00 Jiri Prochazka jprochaz@redhat.com:
There is an extra dot in regex for parsing RR threshold value. This patch removes it, so the parsing works now correctly.
Signed-off-by: Jiri Prochazka jprochaz@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 6cbd504..43dab42 100644 --- a/test_modules/Netperf.py +++ b/test_modules/Netperf.py @@ -337,8 +337,8 @@ class Netperf(TestGeneric): threshold_unit_type = "bps" elif (self._testname == "TCP_RR" or self._testname == "UDP_RR" or self._testname == "SCTP_RR"):
pattern_rr = "(\d*(\.\d*)?)\s*trans\.\/sec"
r1 = re.search(pattern_rr, threshold.lower())
pattern_rr = "(\d*(\.\d*)?)\s*Trans\/sec"
r1 = re.search(pattern_rr, threshold) if r1 is None: res_data["msg"] = "Invalid unit type in the "\ "throughput option"
-- 2.9.4
lnst-developers@lists.fedorahosted.org