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
d6197f30
Commit
d6197f30
authored
Jun 11, 2015
by
Brenden Blanco
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #54 from iovisor/yhs_dev
python commands module is removed in python 3, use subprocess
parents
a5c3c707
ad44963c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
tests/cc/test_brb.py
tests/cc/test_brb.py
+4
-3
tests/cc/test_brb2.py
tests/cc/test_brb2.py
+0
-1
No files found.
tests/cc/test_brb.py
View file @
d6197f30
...
...
@@ -73,7 +73,6 @@ import sys
from
time
import
sleep
from
unittest
import
main
,
TestCase
import
subprocess
import
commands
import
struct
arg1
=
sys
.
argv
.
pop
(
1
)
...
...
@@ -232,8 +231,10 @@ class TestBPFSocket(TestCase):
self
.
config_router_ns
(
self
.
ns_router
,
self
.
vm1_rtr_ip
,
self
.
vm2_rtr_ip
)
# get vm mac address
self
.
vm1_mac
=
commands
.
getoutput
(
'ip netns exec '
+
self
.
ns1
+
' cat /sys/class/net/eth0/address'
)
self
.
vm2_mac
=
commands
.
getoutput
(
'ip netns exec '
+
self
.
ns2
+
' cat /sys/class/net/eth0/address'
)
self
.
vm1_mac
=
subprocess
.
check_output
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns1
,
"cat"
,
"/sys/class/net/eth0/address"
])
self
.
vm1_mac
=
self
.
vm1_mac
.
strip
()
self
.
vm2_mac
=
subprocess
.
check_output
([
"ip"
,
"netns"
,
"exec"
,
self
.
ns2
,
"cat"
,
"/sys/class/net/eth0/address"
])
self
.
vm2_mac
=
self
.
vm2_mac
.
strip
()
# load the program and configure maps
self
.
config_maps
()
...
...
tests/cc/test_brb2.py
View file @
d6197f30
...
...
@@ -66,7 +66,6 @@ import sys
from
time
import
sleep
from
unittest
import
main
,
TestCase
import
subprocess
import
commands
arg1
=
sys
.
argv
.
pop
(
1
)
...
...
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