Updated netperf2 test to support the TCP_SENDFILE test.
Signed-off-by: Bryce Boe <bboe@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2128 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/netperf2/netperf2.py b/client/tests/netperf2/netperf2.py
index 3faba17b..3399612 100755
--- a/client/tests/netperf2/netperf2.py
+++ b/client/tests/netperf2/netperf2.py
@@ -25,7 +25,7 @@
self.client_path = '%s %%s %%s' % os.path.join(self.srcdir,
'src/netperf -H')
- self.valid_tests = ['TCP_STREAM', 'TCP_RR', 'TCP_CRR',
+ self.valid_tests = ['TCP_STREAM', 'TCP_RR', 'TCP_CRR', 'TCP_SENDFILE',
'UDP_STREAM', 'UDP_RR']
self.results = []
@@ -112,7 +112,7 @@
# Each of the functions return tuples in which the keys define
# what that item in the tuple represents
- if self.test == 'TCP_STREAM':
+ if self.test in ['TCP_STREAM', 'TCP_SENDFILE']:
function = self.process_tcp_stream
keys = ('Throughput',)
elif self.test == 'UDP_STREAM':
@@ -154,7 +154,8 @@
def process_tcp_stream(self, output):
- """Parses the following and returns a singleton containing throughput.
+ """Parses the following (works for both TCP_STREAM and TCP_SENDFILE)
+ and returns a singleton containing throughput.
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to kcqz13.prod.google.com (10.75.222.13) port 0 AF_INET
Recv Send Send