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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: vty_test_runner.py: raise exception when MSC socket connection fails
......................................................................
vty_test_runner.py: raise exception when MSC socket connection fails
Instead of below error, raise an exception to describe what's happening.
Seen in a jenkins run on https://gerrit.osmocom.org/#/c/945/2:
ERROR: testBSCreload (__main__.TestVTYNAT)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./vty_test_runner.py", line 787, in testBSCreload
msc = nat_msc_test(self, ip, port)
File "./vty_test_runner.py", line 1251, in nat_msc_test
return conn
UnboundLocalError: local variable 'conn' referenced before assignment
Change-Id: Iae26e7345267a21aed0b108b089453832889c9fa
---
M openbsc/tests/vty_test_runner.py
1 file changed, 4 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 9fe4c3e..f624fc9 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -1233,10 +1233,14 @@
msc.listen(5)
if (verbose):
print "MSC is ready at " + ip
+ conn = None
while "MSC is connected: 0" == x.vty.command("show msc connection"):
conn, addr = msc.accept()
if (verbose):
print "MSC got connection from ", addr
+ if not conn:
+ raise Exception("VTY reports MSC is connected, but I haven't"
+ " connected yet: %r %r" % (ip, port))
return conn
def ipa_handle_small(x, verbose = False):
--
To view, visit https://gerrit.osmocom.org/947
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iae26e7345267a21aed0b108b089453832889c9fa
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