Merge pull request #734 from akoshibe/upstream
Allow match on 'packets received' in ping results
This commit is contained in:
+2
-3
@@ -696,7 +696,7 @@ class Mininet( object ):
|
|||||||
m = re.search( r, pingOutput )
|
m = re.search( r, pingOutput )
|
||||||
if m is not None:
|
if m is not None:
|
||||||
return errorTuple
|
return errorTuple
|
||||||
r = r'(\d+) packets transmitted, (\d+) received'
|
r = r'(\d+) packets transmitted, (\d+)( packets)? received'
|
||||||
m = re.search( r, pingOutput )
|
m = re.search( r, pingOutput )
|
||||||
if m is None:
|
if m is None:
|
||||||
error( '*** Error: could not parse ping output: %s\n' %
|
error( '*** Error: could not parse ping output: %s\n' %
|
||||||
@@ -827,7 +827,7 @@ class Mininet( object ):
|
|||||||
debug( 'Client output: %s\n' % cliout )
|
debug( 'Client output: %s\n' % cliout )
|
||||||
servout = ''
|
servout = ''
|
||||||
# We want the last *b/sec from the iperf server output
|
# We want the last *b/sec from the iperf server output
|
||||||
# for TCP, there are two fo them because of waitListening
|
# for TCP, there are two of them because of waitListening
|
||||||
count = 2 if l4Type == 'TCP' else 1
|
count = 2 if l4Type == 'TCP' else 1
|
||||||
while len( re.findall( '/sec', servout ) ) < count:
|
while len( re.findall( '/sec', servout ) ) < count:
|
||||||
servout += server.monitor( timeoutms=5000 )
|
servout += server.monitor( timeoutms=5000 )
|
||||||
@@ -846,7 +846,6 @@ class Mininet( object ):
|
|||||||
duration: test duration in seconds (integer)
|
duration: test duration in seconds (integer)
|
||||||
returns a single list of measured CPU fractions as floats.
|
returns a single list of measured CPU fractions as floats.
|
||||||
"""
|
"""
|
||||||
cores = int( quietRun( 'nproc' ) )
|
|
||||||
pct = cpu * 100
|
pct = cpu * 100
|
||||||
info( '*** Testing CPU %.0f%% bandwidth limit\n' % pct )
|
info( '*** Testing CPU %.0f%% bandwidth limit\n' % pct )
|
||||||
hosts = self.hosts
|
hosts = self.hosts
|
||||||
|
|||||||
Reference in New Issue
Block a user