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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Feb 24 19:45:35 UTC 2017


Review at  https://gerrit.osmocom.org/1914

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(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/14/1914/1

diff --git a/openbsc/tests/smpp_test_runner.py b/openbsc/tests/smpp_test_runner.py
index 339314e..71b9d6c 100644
--- a/openbsc/tests/smpp_test_runner.py
+++ b/openbsc/tests/smpp_test_runner.py
@@ -55,6 +55,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: newchange
Gerrit-Change-Id: I0a42caab3bb8c9c9d04b033e4de9efe0ca8fd2af
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list