diff --git a/mininet/net.py b/mininet/net.py index 3b3b1ff..4e98c60 100755 --- a/mininet/net.py +++ b/mininet/net.py @@ -617,7 +617,7 @@ class Mininet( object ): # XXX This should be cleaned up - def iperf( self, hosts=None, l4Type='TCP', udpBw='10M', format=None ): + def iperf( self, hosts=None, l4Type='TCP', udpBw='10M', format='M' ): """Run iperf between two hosts. hosts: list of hosts; if None, uses opposite hosts l4Type: string, one of [ TCP, UDP ] @@ -640,8 +640,8 @@ class Mininet( object ): bwArgs = '-b ' + udpBw + ' ' elif l4Type != 'TCP': raise Exception( 'Unexpected l4 type: %s' % l4Type ) - if format: - iperfArgs += '-f %s ' % format + if not format == 'M': + iperfArgs += '-f %s ' %format server.sendCmd( iperfArgs + '-s', printPid=True ) servout = '' while server.lastPid is None: diff --git a/mininet/test/test_hifi.py b/mininet/test/test_hifi.py index 8f8a1ce..c888e29 100755 --- a/mininet/test/test_hifi.py +++ b/mininet/test/test_hifi.py @@ -106,7 +106,7 @@ class testOptionsTopoCommon( object ): # pylint: enable-msg=W0612 for rttval in [rttmin, rttavg, rttmax]: # Multiply delay by 4 to cover there & back on two links - self.assertWithinTolerance( rttval, DELAY_MS * 4.0, + self.assertWithinTolerance( rttval, DELAY_MS * 4.0, DELAY_TOLERANCE)