[MERGED] openbsc[master]: vty_test_runner.py: fix socket leak

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Feb 24 18:33:31 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: vty_test_runner.py: fix socket leak
......................................................................


vty_test_runner.py: fix socket leak

Each running test would open up another socket without ever closing unused
ones. Close the sockets after each test is done.

Change-Id: Ie433c8560de54f9a9d05fa07c44bae3126d19b30
---
M openbsc/tests/vty_test_runner.py
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index f434360..8b17397 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -57,6 +57,8 @@
         self.vty = obscvty.VTYInteract(appstring, "127.0.0.1", appport)
 
     def tearDown(self):
+        if self.vty:
+            self.vty._close_socket()
         self.vty = None
         osmoutil.end_proc(self.proc)
 

-- 
To view, visit https://gerrit.osmocom.org/1905
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie433c8560de54f9a9d05fa07c44bae3126d19b30
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder


More information about the gerrit-log mailing list