Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
812c91cc
Commit
812c91cc
authored
11 years ago
by
Rich Lane
Browse files
Options
Downloads
Patches
Plain Diff
test_hifi: use SWITCH to pick the switch class
parent
27da832d
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mininet/test/test_hifi.py
+5
-5
5 additions, 5 deletions
mininet/test/test_hifi.py
with
5 additions
and
5 deletions
mininet/test/test_hifi.py
+
5
−
5
View file @
812c91cc
...
...
@@ -39,7 +39,7 @@ def runOptionsTopoTest( self, n, hopts=None, lopts=None ):
"
Generic topology-with-options test runner.
"
mn
=
Mininet
(
topo
=
SingleSwitchOptionsTopo
(
n
=
n
,
hopts
=
hopts
,
lopts
=
lopts
),
host
=
CPULimitedHost
,
link
=
TCLink
)
host
=
CPULimitedHost
,
link
=
TCLink
,
switch
=
SWITCH
)
dropped
=
mn
.
run
(
mn
.
ping
)
self
.
assertEqual
(
dropped
,
0
)
...
...
@@ -58,7 +58,7 @@ def testCPULimits( self ):
#self.runOptionsTopoTest( N, hopts=hopts )
mn
=
Mininet
(
SingleSwitchOptionsTopo
(
n
=
N
,
hopts
=
hopts
),
host
=
CPULimitedHost
)
host
=
CPULimitedHost
,
switch
=
SWITCH
)
mn
.
start
()
results
=
mn
.
runCpuLimitTest
(
cpu
=
CPU_FRACTION
)
mn
.
stop
()
...
...
@@ -73,7 +73,7 @@ def testLinkBandwidth( self ):
lopts
=
{
'
bw
'
:
BW
,
'
use_htb
'
:
True
}
# Also verify correctness of limit limitng within a bound.
mn
=
Mininet
(
SingleSwitchOptionsTopo
(
n
=
N
,
lopts
=
lopts
),
link
=
TCLink
)
link
=
TCLink
,
switch
=
SWITCH
)
bw_strs
=
mn
.
run
(
mn
.
iperf
)
for
bw_str
in
bw_strs
:
bw
=
float
(
bw_str
.
split
(
'
'
)[
0
]
)
...
...
@@ -85,7 +85,7 @@ def testLinkDelay( self ):
DELAY_TOLERANCE
=
0.8
# Delay fraction below which test should fail
lopts
=
{
'
delay
'
:
'
%sms
'
%
DELAY_MS
,
'
use_htb
'
:
True
}
mn
=
Mininet
(
SingleSwitchOptionsTopo
(
n
=
N
,
lopts
=
lopts
),
link
=
TCLink
)
link
=
TCLink
,
switch
=
SWITCH
)
ping_delays
=
mn
.
run
(
mn
.
pingFull
)
test_outputs
=
ping_delays
[
0
]
# Ignore unused variables below
...
...
@@ -105,7 +105,7 @@ def testLinkLoss( self ):
REPS
=
1
lopts
=
{
'
loss
'
:
LOSS_PERCENT
,
'
use_htb
'
:
True
}
mn
=
Mininet
(
topo
=
SingleSwitchOptionsTopo
(
n
=
N
,
lopts
=
lopts
),
host
=
CPULimitedHost
,
link
=
TCLink
)
host
=
CPULimitedHost
,
link
=
TCLink
,
switch
=
SWITCH
)
# Drops are probabilistic, but the chance of no dropped packets is
# 1 in 100 million with 4 hops for a link w/99% loss.
dropped_total
=
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment