Each netperf test takes an optional arguments specified after double
dash "--". For example UDP_STREAM test takes -m option to specify how
big the messages are sent.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
test_modules/Netperf.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py
index 89664fb..a691fa5 100644
--- a/test_modules/Netperf.py
+++ b/test_modules/Netperf.py
@@ -33,6 +33,7 @@ class Netperf(TestGeneric):
self._duration = self.get_opt("duration")
self._port = self.get_opt("port")
self._testname = self.get_opt("testname",
default="TCP_STREAM")
+ self._testoptions = self.get_opt("testoptions")
self._confidence = self.get_opt("confidence")
self._bind = self.get_opt("bind", opt_type="addr")
self._cpu_util = self.get_opt("cpu_util")
@@ -122,6 +123,12 @@ class Netperf(TestGeneric):
if self._is_omni():
cmd += ' -- -k "THROUGHPUT, LOCAL_CPU_UTIL, REMOTE_CPU_UTIL,
CONFIDENCE_LEVEL, THROUGHPUT_CONFID"'
+ if self._testoptions:
+ if cmd.find(" -- ") == -1:
+ cmd += " -- %s" % self._testoptions
+ else:
+ cmd += self._testoptions
+
elif self._role == "server":
cmd = "netserver -D"
if self._bind is not None:
--
2.4.11