Allow bandwidth parameter for both tcp and udp iperf cases

Change-Id: I5ea970cc3e4887b1f3e0f7b276e3a5f39f9ae959
This commit is contained in:
sunluning
2017-10-23 15:26:10 +08:00
committed by Ilya Shakhat
parent 6fc8d21b3b
commit e11d4ed27c
2 changed files with 4 additions and 4 deletions

View File

@@ -31,10 +31,10 @@ def add_common_iperf_params(cmd, executor):
cmd.add('--len', executor.test_definition.get('buffer_size'))
if executor.test_definition.get('udp'):
cmd.add('--udp')
if executor.test_definition.get('bandwidth') is not None:
cmd.add('--bandwidth', executor.test_definition.get('bandwidth'))
if executor.test_definition.get('datagram_size'):
cmd.add('--len', executor.test_definition.get('datagram_size'))
if executor.test_definition.get('bandwidth') is not None:
cmd.add('--bandwidth', executor.test_definition.get('bandwidth'))
cmd.add('--time', executor.get_expected_duration())
cmd.add('--parallel', executor.test_definition.get('threads') or 1)
if executor.test_definition.get('interval'):

View File

@@ -40,7 +40,7 @@ class TestIperfGraphExecutor(testtools.TestCase):
'datagram_size': 1470}, AGENT)
expected = {'data': ('iperf --client %s --format m '
'--udp --bandwidth 100M --len 1470 '
'--udp --len 1470 --bandwidth 100M '
'--time 30 --parallel 1 --interval 1 --nodelay '
'--reportstyle C') % IP,
'type': 'program'}
@@ -138,7 +138,7 @@ class TestIperf3Executor(testtools.TestCase):
'datagram_size': 1470}, AGENT)
expected = {'data': ('iperf3 --client %s --format m '
'--udp --bandwidth 100M --len 1470 '
'--udp --len 1470 --bandwidth 100M '
'--time 30 --parallel 1 --interval 1 '
'--json') % IP,
'type': 'program'}