intfoptions and test adjustments (#992)

* 2.3.0a1

* intfoptions and test_intfoptions tweaks

also added cleanup() to test_walkthrough fixture
This commit is contained in:
lantz
2021-01-03 22:24:28 -08:00
committed by GitHub
parent b7c412073a
commit e02e338e3c
7 changed files with 19 additions and 22 deletions
+3 -3
View File
@@ -25,10 +25,10 @@ def intfOptions():
# flush out latency from reactive forwarding delay
net.pingAll()
info( '\n*** Configuring one intf with bandwidth of 5 Mb\n' )
link1.intf1.config( bw=5 )
info( '\n*** Configuring one intf with bandwidth of 10 Mb\n' )
link1.intf1.config( bw=10 )
info( '\n*** Running iperf to test\n' )
net.iperf()
net.iperf( seconds=10 )
info( '\n*** Configuring one intf with loss of 50%\n' )
link1.intf1.config( loss=50 )
+1 -1
View File
@@ -22,7 +22,7 @@ class testIntfOptions( unittest.TestCase ):
while True:
index = p.expect( opts, timeout=600 )
if index == 0:
BW = 5
BW = 10
bw = float( p.match.group( 1 ) )
self.assertGreaterEqual( bw, BW * ( 1 - tolerance ) )
self.assertLessEqual( bw, BW * ( 1 + tolerance ) )