From: Rafael Zalamena Date: Fri, 8 Dec 2017 14:19:58 +0000 (-0200) Subject: topotest: improve informational messages X-Git-Tag: frr-7.1-dev~151^2~192 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=065bd557f83a3cbc9b8b7300093c68d0107e7e4e;p=matthieu%2Ffrr.git topotest: improve informational messages Signed-off-by: Rafael Zalamena --- diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 6bd9cf25a4..e436eb09d8 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -542,18 +542,24 @@ class Router(Node): for d in StringIO.StringIO(rundaemons): daemonpid = self.cmd('cat %s' % d.rstrip()).rstrip() if (daemonpid.isdigit() and pid_exists(int(daemonpid))): - logger.info('killing %s %s' % (self.name, os.path.basename(d.rstrip().rsplit(".", 1)[0]))) + logger.info('{}: stopping {}'.format( + self.name, + os.path.basename(d.rstrip().rsplit(".", 1)[0]) + )) self.cmd('kill -TERM %s' % daemonpid) self.waitOutput() if pid_exists(int(daemonpid)): numRunning += 1 if wait and numRunning > 0: - sleep(2) + sleep(2, '{}: waiting for daemons stopping'.format(self.name)) # 2nd round of kill if daemons didn't exit for d in StringIO.StringIO(rundaemons): daemonpid = self.cmd('cat %s' % d.rstrip()).rstrip() if (daemonpid.isdigit() and pid_exists(int(daemonpid))): - logger.info('killing (-7) %s %s' % (self.name, os.path.basename(d.rstrip().rsplit(".", 1)[0]))) + logger.info('{}: killing {}'.format( + self.name, + os.path.basename(d.rstrip().rsplit(".", 1)[0]) + )) self.cmd('kill -7 %s' % daemonpid) self.waitOutput() def removeIPs(self):