diff options
author | Martin Winter <mwinter@opensourcerouting.org> | 2020-11-25 22:59:40 +0100 |
---|---|---|
committer | Martin Winter <mwinter@opensourcerouting.org> | 2020-11-27 19:45:14 +0100 |
commit | 1a31ada871c2ccc1cf79d9e85a6f27202c5b8bfb (patch) | |
tree | 6cba44392e09c58609f6e3495928061da3b6dc72 /tests/topotests | |
parent | tests: Fix Topotest runs with newerversion of Address Sanitizer (diff) | |
download | frr-1a31ada871c2ccc1cf79d9e85a6f27202c5b8bfb.tar.xz frr-1a31ada871c2ccc1cf79d9e85a6f27202c5b8bfb.zip |
tests: Fix FRR process shutdown in failed topotest teardown phase
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Diffstat (limited to 'tests/topotests')
-rw-r--r-- | tests/topotests/lib/topogen.py | 4 | ||||
-rw-r--r-- | tests/topotests/lib/topotest.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index 3e92bd756..7ae4223f7 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 92656a084..29471c00f 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 |