=============================== test session starts ================================ platform linux2 -- Python 2.7.12, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 rootdir: /home/ubuntu/ipmininet collected 1 item ipmininet/tests/test_sshd.py ^C^C ================================= warnings summary ================================= ipmininet/tests/test_sshd.py::test_sshd_example ipmininet/tests/test_sshd.py::test_sshd_example /home/ubuntu/ipmininet/ipmininet/iptopo.py:119: DeprecationWarning: object.__init__() takes no parameters super(RouterDescription, self).__init__(o) -- Docs: https://docs.pytest.org/en/latest/warnings.html !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! config = <_pytest.config.Config object at 0x7f3307dac490> doit = def wrap_session(config, doit): """Skeleton command line program""" session = Session(config) session.exitstatus = EXIT_OK initstate = 0 try: try: config._do_configure() initstate = 1 config.hook.pytest_sessionstart(session=session) initstate = 2 > session.exitstatus = doit(config, session) or 0 .eggs/pytest-4.4.0-py2.7.egg/_pytest/main.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <_pytest.config.Config object at 0x7f3307dac490> session = def _main(config, session): """ default command line protocol for initialization, session, running tests and reporting. """ config.hook.pytest_collection(session=session) > config.hook.pytest_runtestloop(session=session) .eggs/pytest-4.4.0-py2.7.egg/_pytest/main.py:249: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtestloop'>, args = () kwargs = {'session': } notincall = set([]) def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() if self.spec and self.spec.argnames: notincall = ( set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys()) ) if notincall: warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(tuple(notincall)), stacklevel=2, ) > return self._hookexec(self, self.get_hookimpls(), kwargs) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/hooks.py:289: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3308545850> hook = <_HookCaller 'pytest_runtestloop'> methods = [>, >] kwargs = {'session': } def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/manager.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtestloop'> methods = [>, >] kwargs = {'session': } self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( methods, kwargs, > firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, ) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/manager.py:62: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ session = def pytest_runtestloop(session): if session.testsfailed and not session.config.option.continue_on_collection_errors: raise session.Interrupted("%d errors during collection" % session.testsfailed) if session.config.option.collectonly: return True for i, item in enumerate(session.items): nextitem = session.items[i + 1] if i + 1 < len(session.items) else None > item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) .eggs/pytest-4.4.0-py2.7.egg/_pytest/main.py:270: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_protocol'>, args = () kwargs = {'item': , 'nextitem': None} notincall = set([]) def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() if self.spec and self.spec.argnames: notincall = ( set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys()) ) if notincall: warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(tuple(notincall)), stacklevel=2, ) > return self._hookexec(self, self.get_hookimpls(), kwargs) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/hooks.py:289: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3308545850> hook = <_HookCaller 'pytest_runtest_protocol'> methods = [>] kwargs = {'item': , 'nextitem': None} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/manager.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_protocol'> methods = [>] kwargs = {'item': , 'nextitem': None} self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( methods, kwargs, > firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, ) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/manager.py:62: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = , nextitem = None def pytest_runtest_protocol(item, nextitem): item.ihook.pytest_runtest_logstart(nodeid=item.nodeid, location=item.location) > runtestprotocol(item, nextitem=nextitem) .eggs/pytest-4.4.0-py2.7.egg/_pytest/runner.py:78: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = , log = True, nextitem = None def runtestprotocol(item, log=True, nextitem=None): hasrequest = hasattr(item, "_request") if hasrequest and not item._request: item._initrequest() rep = call_and_report(item, "setup", log) reports = [rep] if rep.passed: if item.config.getoption("setupshow", False): show_test_item(item) if not item.config.getoption("setuponly", False): > reports.append(call_and_report(item, "call", log)) .eggs/pytest-4.4.0-py2.7.egg/_pytest/runner.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = , when = 'call', log = True, kwds = {} def call_and_report(item, when, log=True, **kwds): > call = call_runtest_hook(item, when, **kwds) .eggs/pytest-4.4.0-py2.7.egg/_pytest/runner.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = , when = 'call', kwds = {} hookname = 'pytest_runtest_call' reraise = (, ) def call_runtest_hook(item, when, **kwds): hookname = "pytest_runtest_" + when ihook = getattr(item.ihook, hookname) reraise = (Exit,) if not item.config.getoption("usepdb", False): reraise += (KeyboardInterrupt,) return CallInfo.from_call( > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) .eggs/pytest-4.4.0-py2.7.egg/_pytest/runner.py:198: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = func = at 0x7f330747ee60>, when = 'call' reraise = (, ) @classmethod def from_call(cls, func, when, reraise=None): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" start = time() excinfo = None try: > result = func() .eggs/pytest-4.4.0-py2.7.egg/_pytest/runner.py:226: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) .eggs/pytest-4.4.0-py2.7.egg/_pytest/runner.py:198: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'>, args = () kwargs = {'item': }, notincall = set([]) def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() if self.spec and self.spec.argnames: notincall = ( set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys()) ) if notincall: warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(tuple(notincall)), stacklevel=2, ) > return self._hookexec(self, self.get_hookimpls(), kwargs) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/hooks.py:289: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3308545850> hook = <_HookCaller 'pytest_runtest_call'> methods = [>, >] kwargs = {'item': } def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/manager.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [>, >] kwargs = {'item': } self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( methods, kwargs, > firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, ) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/manager.py:62: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item): _update_current_test_var(item, "call") sys.last_type, sys.last_value, sys.last_traceback = (None, None, None) try: > item.runtest() .eggs/pytest-4.4.0-py2.7.egg/_pytest/runner.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self): """ execute the underlying test function. """ > self.ihook.pytest_pyfunc_call(pyfuncitem=self) .eggs/pytest-4.4.0-py2.7.egg/_pytest/python.py:1464: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_pyfunc_call'>, args = () kwargs = {'pyfuncitem': }, notincall = set([]) def __call__(self, *args, **kwargs): if args: raise TypeError("hook calling supports only keyword arguments") assert not self.is_historic() if self.spec and self.spec.argnames: notincall = ( set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys()) ) if notincall: warnings.warn( "Argument(s) {} which are declared in the hookspec " "can not be found in this hook call".format(tuple(notincall)), stacklevel=2, ) > return self._hookexec(self, self.get_hookimpls(), kwargs) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/hooks.py:289: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f3308545850> hook = <_HookCaller 'pytest_pyfunc_call'> methods = [>] kwargs = {'pyfuncitem': } def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/manager.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_pyfunc_call'> methods = [>] kwargs = {'pyfuncitem': } self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( methods, kwargs, > firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, ) .eggs/pluggy-0.9.0-py2.7.egg/pluggy/manager.py:62: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyfuncitem = @hookimpl(trylast=True) def pytest_pyfunc_call(pyfuncitem): testfunction = pyfuncitem.obj iscoroutinefunction = getattr(inspect, "iscoroutinefunction", None) if iscoroutinefunction is not None and iscoroutinefunction(testfunction): msg = "Coroutine functions are not natively supported and have been skipped.\n" msg += "You need to install a suitable plugin for your async framework, for example:\n" msg += " - pytest-asyncio\n" msg += " - pytest-trio\n" msg += " - pytest-tornasync" warnings.warn(PytestWarning(msg.format(pyfuncitem.nodeid))) skip(msg="coroutine function and no async plugin installed (see warnings)") funcargs = pyfuncitem.funcargs testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames} > testfunction(**testargs) .eggs/pytest-4.4.0-py2.7.egg/_pytest/python.py:178: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @require_root def test_sshd_example(): try: net = IPNet(topo=SSHTopo()) net.start() ssh_key = None with open("/tmp/sshd_r2.cfg") as fileobj: for line in fileobj: if "AuthorizedKeysFile" in line: ssh_key = line.split(" ")[1].split(".")[0] assert ssh_key is not None, "No authorized SSH key found in the configuration" assert os.path.isfile(ssh_key), "Cannot find key file at %s" % ssh_key ip = net["r2"].intf("r2-eth0").ip cmd = "ssh -oStrictHostKeyChecking=no -i %s %s ls" % (ssh_key, ip) t = 0 while t < 60 and net["r1"].popen(cmd.split(" ")).wait() != 0: time.sleep(0.5) p = net["r1"].popen(cmd.split(" ")) assert p.wait() == 0, "Cannot connect with SSH to the router" net.stop() finally: > cleanup() ipmininet/tests/test_sshd.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def cleanup(): """Cleanup all possible junk that we may have started.""" log.setLogLevel('info') # Standard mininet cleanup > mnclean.cleanup() ipmininet/clean.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = @classmethod def cleanup( cls): """Clean up junk which might be left over from old runs; do fast stuff before slow dp and link removal!""" info( "*** Removing excess controllers/ofprotocols/ofdatapaths/" "pings/noxes\n" ) zombies = 'controller ofprotocol ofdatapath ping nox_core lt-nox_core ' zombies += 'ovs-openflowd ovs-controller udpbwtest mnexec ivs' # Note: real zombie processes can't actually be killed, since they # are already (un)dead. Then again, # you can't connect to them either, so they're mostly harmless. # Send SIGTERM first to give processes a chance to shutdown cleanly. sh( 'killall ' + zombies + ' 2> /dev/null' ) > time.sleep( 1 ) E KeyboardInterrupt /usr/lib/python2.7/dist-packages/mininet/clean.py:60: KeyboardInterrupt ========================== 2 warnings in 2179.71 seconds ===========================