Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
3b74b139
Commit
3b74b139
authored
Jun 12, 2015
by
Yonghong Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reduce test time for test_brb and test_brb2
Signed-off-by:
Yonghong Song
<
yhs@plumgrid.com
>
parent
27e3c94b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
30 deletions
+24
-30
tests/cc/test_brb.py
tests/cc/test_brb.py
+13
-16
tests/cc/test_brb2.py
tests/cc/test_brb2.py
+11
-14
No files found.
tests/cc/test_brb.py
View file @
3b74b139
...
...
@@ -23,25 +23,22 @@
#
# ......
# 8: ARPING 100.1.1.254 from 100.1.1.1 eth0
# 8: Unicast reply from 100.1.1.254 [
E6:5F:05:95:4B:41] 0.532
ms
# 8: Unicast reply from 100.1.1.254 [
76:62:B5:5C:8C:6F] 0.533
ms
# 8: Sent 1 probes (1 broadcast(s))
# 8: Received 1 response(s)
# 8: ARPING 200.1.1.254 from 200.1.1.1 eth0
# 8: Unicast reply from 200.1.1.254 [
46:99:94:FB:6D:23] 0.522
ms
# 8: Unicast reply from 200.1.1.254 [
F2:F0:B4:ED:7B:1B] 0.524
ms
# 8: Sent 1 probes (1 broadcast(s))
# 8: Received 1 response(s)
# 8: PING 200.1.1.1 (200.1.1.1) 56(84) bytes of data.
# 8: 64 bytes from 200.1.1.1: icmp_req=1 ttl=63 time=0.066 ms
# 8: 64 bytes from 200.1.1.1: icmp_req=2 ttl=63 time=0.024 ms
# 8: 64 bytes from 200.1.1.1: icmp_req=3 ttl=63 time=0.052 ms
# 8: 64 bytes from 200.1.1.1: icmp_req=4 ttl=63 time=0.050 ms
# 8: 64 bytes from 200.1.1.1: icmp_req=5 ttl=63 time=0.052 ms
# 8: 64 bytes from 200.1.1.1: icmp_req=1 ttl=63 time=0.074 ms
# 8: 64 bytes from 200.1.1.1: icmp_req=2 ttl=63 time=0.061 ms
# 8:
# 8: --- 200.1.1.1 ping statistics ---
# 8:
5 packets transmitted, 5 received, 0% packet loss, time 3
999ms
# 8: rtt min/avg/max/mdev = 0.0
24/0.048/0.066/0.016
ms
# 8:
2 packets transmitted, 2 received, 0% packet loss, time
999ms
# 8: rtt min/avg/max/mdev = 0.0
61/0.067/0.074/0.010
ms
# 8: [ ID] Interval Transfer Bandwidth
# 8: [ 5] 0.0- 1.0 sec 4.
35 GBytes 37.4
Gbits/sec
# 8: [ 5] 0.0- 1.0 sec 4.
00 GBytes 34.3
Gbits/sec
# 8: Starting netserver with host 'IN(6)ADDR_ANY' port '12865' and family AF_UNSPEC
# 8: MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 200.1.1.1 (200.1.1.1) port 0 AF_INET : demo
# 8: Recv Send Send
...
...
@@ -49,18 +46,18 @@
# 8: Size Size Size Time Throughput
# 8: bytes bytes bytes secs. 10^6bits/sec
# 8:
# 8: 87380 16384 65160 1
0.00 45045.5
8
# 8: 87380 16384 65160 1
.00 41991.6
8
# 8: MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 200.1.1.1 (200.1.1.1) port 0 AF_INET : demo : first burst 0
# 8: Local /Remote
# 8: Socket Size Request Resp. Elapsed Trans.
# 8: Send Recv Size Size Time Rate
# 8: bytes Bytes bytes bytes secs. per sec
# 8:
# 8: 16384 87380 1 1 1
0.00 50563.99
# 8: 16384 87380 1 1 1
.00 48645.53
# 8: 16384 87380
# 8: .
# 8: ----------------------------------------------------------------------
# 8: Ran 1 test in
32.95
6s
# 8: Ran 1 test in
11.29
6s
# 8:
# 8: OK
...
...
@@ -247,7 +244,7 @@ class TestBPFSocket(TestCase):
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns2
,
"arping"
,
"-w"
,
"1"
,
"-c"
,
"1"
,
"-I"
,
"eth0"
,
self
.
vm2_rtr_ip
])
# ping
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"ping"
,
self
.
vm2_ip
,
"-c"
,
"
5
"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"ping"
,
self
.
vm2_ip
,
"-c"
,
"
2
"
])
# minimum one arp reply, 5 icmp reply
self
.
assertGreater
(
self
.
pem_stats
.
lookup
(
c_uint
(
0
)).
value
,
5
)
...
...
@@ -260,8 +257,8 @@ class TestBPFSocket(TestCase):
# netperf, run server on the background
subprocess
.
Popen
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns2
,
"netserver"
])
sleep
(
1
)
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"netperf"
,
"-H"
,
self
.
vm2_ip
,
"--"
,
"-m"
,
"65160"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"netperf"
,
"-H"
,
self
.
vm2_ip
,
"-t"
,
"TCP_RR"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"netperf"
,
"-
l"
,
"1"
,
"-
H"
,
self
.
vm2_ip
,
"--"
,
"-m"
,
"65160"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"netperf"
,
"-
l"
,
"1"
,
"-
H"
,
self
.
vm2_ip
,
"-t"
,
"TCP_RR"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns2
,
"killall"
,
"netserver"
])
# cleanup, tear down the veths and namespaces
...
...
tests/cc/test_brb2.py
View file @
3b74b139
...
...
@@ -24,17 +24,14 @@
#
# ......
# 9: PING 200.1.1.1 (200.1.1.1) 56(84) bytes of data.
# 9: 64 bytes from 200.1.1.1: icmp_req=1 ttl=63 time=0.086 ms
# 9: 64 bytes from 200.1.1.1: icmp_req=2 ttl=63 time=0.058 ms
# 9: 64 bytes from 200.1.1.1: icmp_req=3 ttl=63 time=0.058 ms
# 9: 64 bytes from 200.1.1.1: icmp_req=4 ttl=63 time=0.057 ms
# 9: 64 bytes from 200.1.1.1: icmp_req=5 ttl=63 time=0.058 ms
# 9: 64 bytes from 200.1.1.1: icmp_req=1 ttl=63 time=0.090 ms
# 9: 64 bytes from 200.1.1.1: icmp_req=2 ttl=63 time=0.032 ms
# 9:
# 9: --- 200.1.1.1 ping statistics ---
# 9:
5 packets transmitted, 5 received, 0% packet loss, time 3
999ms
# 9: rtt min/avg/max/mdev = 0.0
57/0.063/0.086/0.013
ms
# 9:
2 packets transmitted, 2 received, 0% packet loss, time
999ms
# 9: rtt min/avg/max/mdev = 0.0
32/0.061/0.090/0.029
ms
# 9: [ ID] Interval Transfer Bandwidth
# 9: [ 5] 0.0- 1.0 sec 3.
96 GBytes 34.0
Gbits/sec
# 9: [ 5] 0.0- 1.0 sec 3.
80 GBytes 32.6
Gbits/sec
# 9: Starting netserver with host 'IN(6)ADDR_ANY' port '12865' and family AF_UNSPEC
# 9: MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 200.1.1.1 (200.1.1.1) port 0 AF_INET : demo
# 9: Recv Send Send
...
...
@@ -42,18 +39,18 @@
# 9: Size Size Size Time Throughput
# 9: bytes bytes bytes secs. 10^6bits/sec
# 9:
# 9: 87380 16384 65160 1
0.00 39108.8
6
# 9: 87380 16384 65160 1
.00 39940.4
6
# 9: MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 200.1.1.1 (200.1.1.1) port 0 AF_INET : demo : first burst 0
# 9: Local /Remote
# 9: Socket Size Request Resp. Elapsed Trans.
# 9: Send Recv Size Size Time Rate
# 9: bytes Bytes bytes bytes secs. per sec
# 9:
# 9: 16384 87380 1 1 1
0.00 46834.27
# 9: 16384 87380 1 1 1
.00 46387.80
# 9: 16384 87380
# 9: .
# 9: ----------------------------------------------------------------------
# 9: Ran 1 test in
29.144
s
# 9: Ran 1 test in
7.495
s
# 9:
# 9: OK
...
...
@@ -191,7 +188,7 @@ class TestBPFSocket(TestCase):
def
test_brb2
(
self
):
# ping
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"ping"
,
self
.
vm2_ip
,
"-c"
,
"
5
"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"ping"
,
self
.
vm2_ip
,
"-c"
,
"
2
"
])
# minimum one arp request/reply, 5 icmp request/reply
self
.
assertGreater
(
self
.
pem_stats
.
lookup
(
c_uint
(
0
)).
value
,
11
)
...
...
@@ -204,8 +201,8 @@ class TestBPFSocket(TestCase):
# netperf, run server on the background
subprocess
.
Popen
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns2
,
"netserver"
])
sleep
(
1
)
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"netperf"
,
"-H"
,
self
.
vm2_ip
,
"--"
,
"-m"
,
"65160"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"netperf"
,
"-H"
,
self
.
vm2_ip
,
"-t"
,
"TCP_RR"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"netperf"
,
"-
l"
,
"1"
,
"-
H"
,
self
.
vm2_ip
,
"--"
,
"-m"
,
"65160"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"netperf"
,
"-
l"
,
"1"
,
"-
H"
,
self
.
vm2_ip
,
"-t"
,
"TCP_RR"
])
subprocess
.
call
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns2
,
"killall"
,
"netserver"
])
# cleanup, tear down the veths and namespaces
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment