From: Martin Winter Date: Wed, 25 Nov 2020 21:59:40 +0000 (+0100) Subject: tests: Fix FRR process shutdown in failed topotest teardown phase X-Git-Tag: base_7.6~197^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=1a31ada871c2ccc1cf79d9e85a6f27202c5b8bfb;p=mirror%2Ffrr.git tests: Fix FRR process shutdown in failed topotest teardown phase Signed-off-by: Martin Winter --- diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index 3e92bd7565..7ae4223f72 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -336,7 +336,7 @@ class Topogen(object): for gear in self.gears.values(): errors += gear.stop() if len(errors) > 0: - assert "Errors found post shutdown - details follow:" == 0, errors + logger.error("Errors found post shutdown - details follow: {}".format(errors)) self.net.stop() @@ -714,7 +714,7 @@ class TopoRouter(TopoGear): """ self.logger.debug("stopping") self.__stop_internal(False, False) - return self.__stop_internal() + return self.__stop_internal(True, False) def startDaemons(self, daemons): """ diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 92656a0844..29471c00fc 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -1241,7 +1241,7 @@ class Router(Node): if self.checkRouterVersion("<", minErrorVersion): # ignore errors in old versions errors = "" - if assertOnError and len(errors) > 0: + if assertOnError and errors is not None and len(errors) > 0: assert "Errors found - details follow:" == 0, errors return errors