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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sat Feb 25 18:07:18 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

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


smpp_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: I0a42caab3bb8c9c9d04b033e4de9efe0ca8fd2af
---
M openbsc/tests/smpp_test_runner.py
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/openbsc/tests/smpp_test_runner.py b/openbsc/tests/smpp_test_runner.py
index b6da86c..4527ac4 100644
--- a/openbsc/tests/smpp_test_runner.py
+++ b/openbsc/tests/smpp_test_runner.py
@@ -54,6 +54,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/1914
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a42caab3bb8c9c9d04b033e4de9efe0ca8fd2af
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list