Revision 0e733c77

View differences:

mininet/net.py
617 617

  
618 618
    # XXX This should be cleaned up
619 619

  
620
    def iperf( self, hosts=None, l4Type='TCP', udpBw='10M', format='M' ):
620
    def iperf( self, hosts=None, l4Type='TCP', udpBw='10M', format=None ):
621 621
        """Run iperf between two hosts.
622 622
           hosts: list of hosts; if None, uses opposite hosts
623 623
           l4Type: string, one of [ TCP, UDP ]
......
640 640
            bwArgs = '-b ' + udpBw + ' '
641 641
        elif l4Type != 'TCP':
642 642
            raise Exception( 'Unexpected l4 type: %s' % l4Type )
643
        if not format == 'M':
644
          iperfArgs += '-f %s ' %format
643
        if format:
644
            iperfArgs += '-f %s ' % format
645 645
        server.sendCmd( iperfArgs + '-s', printPid=True )
646 646
        servout = ''
647 647
        while server.lastPid is None:
mininet/test/test_hifi.py
105 105
        # pylint: enable-msg=W0612
106 106
        for rttval in [rttmin, rttavg, rttmax]:
107 107
            # Multiply delay by 4 to cover there & back on two links
108
            self.assertWithinTolerance( rttval, DELAY_MS * 4.0, 
108
            self.assertWithinTolerance( rttval, DELAY_MS * 4.0,
109 109
                                        DELAY_TOLERANCE)
110 110

  
111 111

  

Also available in: Unified diff