summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorY Bharath <y.bharath@samsung.com>2024-05-07 17:01:03 +0200
committerY Bharath <y.bharath@samsung.com>2024-09-25 15:33:31 +0200
commit5118fd10184b14e8d2e1f1e9f5a858a907a1bd78 (patch)
treea5088d18db1281b25895f6b411e542299b58bd63
parentMerge pull request #16909 from donaldsharp/help (diff)
downloadfrr-5118fd10184b14e8d2e1f1e9f5a858a907a1bd78.tar.xz
frr-5118fd10184b14e8d2e1f1e9f5a858a907a1bd78.zip
tests: catch exception during switch shutdown
Signed-off-by: y-bharath14 <y.bharath@samsung.com>
-rw-r--r--tests/topotests/lib/topogen.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py
index 7941e5c1d..14dd61b07 100644
--- a/tests/topotests/lib/topogen.py
+++ b/tests/topotests/lib/topogen.py
@@ -492,7 +492,16 @@ class Topogen(object):
"Errors found post shutdown - details follow: {}".format(errors)
)
- self.net.stop()
+ try:
+ self.net.stop()
+
+ except OSError as error:
+ # OSError exception is raised when mininet tries to stop switch
+ # though switch is stopped once but mininet tries to stop same
+ # switch again, where it ended up with exception
+
+ logger.info(error)
+ logger.info("Exception ignored: switch is already stopped")
def get_exabgp_cmd(self):
if not self.exabgp_cmd: