git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fixing Netns emulation
[nepi.git]
/
test
/
resources
/
linux
/
netns
/
netnsemulation.py
diff --git
a/test/resources/linux/netns/netnsemulation.py
b/test/resources/linux/netns/netnsemulation.py
old mode 100644
(file)
new mode 100755
(executable)
index
d6d0b44
..
faa5838
--- a/
test/resources/linux/netns/netnsemulation.py
+++ b/
test/resources/linux/netns/netnsemulation.py
@@
-21,7
+21,7
@@
from nepi.execution.ec import ExperimentController
from nepi.execution.trace import TraceAttr
from nepi.execution.ec import ExperimentController
from nepi.execution.trace import TraceAttr
-from test_utils import skipIfNotAlive
+from test_utils import skipIfNotAlive
, skipIf
import os
import time
import os
import time
@@
-51,10
+51,11
@@
class LinuxNetNSEmulationTest(unittest.TestCase):
self.fedora_identity = "%s/.ssh/id_rsa" % (os.environ['HOME'])
@skipIfNotAlive
self.fedora_identity = "%s/.ssh/id_rsa" % (os.environ['HOME'])
@skipIfNotAlive
+ @skipIf(os.getuid() != 0, "Test requires root privileges")
def t_ping(self, host, user = None, identity = None):
ec = ExperimentController(exp_id = "test-netns-p2p-ping")
def t_ping(self, host, user = None, identity = None):
ec = ExperimentController(exp_id = "test-netns-p2p-ping")
- node = ec.register_resource("
Linux
Node")
+ node = ec.register_resource("
linux::
Node")
if host == "localhost":
ec.set(node, "hostname", "localhost")
else:
if host == "localhost":
ec.set(node, "hostname", "localhost")
else:
@@
-65,7
+66,7
@@
class LinuxNetNSEmulationTest(unittest.TestCase):
ec.set(node, "cleanProcesses", True)
#ec.set(node, "cleanHome", True)
ec.set(node, "cleanProcesses", True)
#ec.set(node, "cleanHome", True)
- emu = ec.register_resource("
LinuxNetNS
Emulation")
+ emu = ec.register_resource("
linux::netns::
Emulation")
ec.set(emu, "verbose", True)
ec.register_connection(emu, node)
ec.set(emu, "verbose", True)
ec.register_connection(emu, node)
@@
-77,7
+78,7
@@
class LinuxNetNSEmulationTest(unittest.TestCase):
ec.register_connection(iface2, switch)
ping = ec.register_resource("netns::Application")
ec.register_connection(iface2, switch)
ping = ec.register_resource("netns::Application")
- ec.set(ping, "command", "10.0.0.2")
+ ec.set(ping, "command", "
ping -c20
10.0.0.2")
ec.register_connection(ping, netnode1)
ec.deploy()
ec.register_connection(ping, netnode1)
ec.deploy()