iperf continues to run with unrecognized options and will pass.
this commit will fail the test if there was an unrecognized option msg.
Signed-off-by: Roi Dayan <roid(a)mellanox.com>
---
test_modules/Iperf.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test_modules/Iperf.py b/test_modules/Iperf.py
index 77bd1a0..47b0d2d 100644
--- a/test_modules/Iperf.py
+++ b/test_modules/Iperf.py
@@ -91,6 +91,12 @@ class Iperf(TestGeneric):
logging.info("Iperf connection failed!")
return (False, "Iperf connection failed!")
+ m = re.search(" (unrecognized option .*)", output)
+ if m:
+ err = m.groups()[0]
+ logging.info("Iperf error: %s" % err)
+ return (False, "Iperf error: %s" % err)
+
m =
re.search("\[[^0-9]*[0-9]*\]\s*0.0+-\s*\d*\.\d+\s*sec\s*\d*(\.\d*){0,1}\s*[
kGMT]Bytes\s*(\d*(\.\d*){0,1}\s*[ kGMT]bits\/sec)", output, re.IGNORECASE)
if m is None:
logging.info("Could not get performance throughput!")
--
2.8.0