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.orgHello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1741 to look at the new patch set (#2). vty tests: more attempts to resolve 'Broken Pipe' error Change-Id: I4251a24eb7a57a354aa76de711547c3e76ebb846 --- M openbsc/tests/vty_test_runner.py 1 file changed, 34 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/41/1741/2 diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 608aef4..d57d770 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -781,10 +781,10 @@ self.vty.command("end") nat_msc_ip(self, ip, port) - msc = nat_msc_test(self, ip, port) - b0 = nat_bsc_sock_test(0, "lol") - b1 = nat_bsc_sock_test(1, "xyu") - b2 = nat_bsc_sock_test(5, "key") + msc = nat_msc_test(self, ip, port, verbose=True) + b0 = nat_bsc_sock_test(0, "lol", verbose=True, proc=self.proc) + b1 = nat_bsc_sock_test(1, "xyu", verbose=True, proc=self.proc) + b2 = nat_bsc_sock_test(5, "key", verbose=True, proc=self.proc) self.assertEquals("3 BSCs configured", self.vty.command("show nat num-bscs-configured")) self.assertTrue(3 == nat_bsc_num_con(self)) @@ -1237,6 +1237,15 @@ " connected yet: %r %r" % (ip, port)) return conn +def cmd(what): + print '\n> %s' % what + subprocess.call(what, shell=True) + print '' + +def checkxxx(): + cmd('cat /proc/net/tcp'); + cmd('ps xua | grep osmo'); + def ipa_handle_small(x, verbose = False): s = data2str(x.recv(4)) if len(s) != 4*2: @@ -1256,11 +1265,15 @@ if (verbose): print "\tBSC <- NAT: ", s -def ipa_handle_resp(x, tk, verbose = False): +def ipa_handle_resp(x, tk, verbose = False, proc=None): s = data2str(x.recv(38)) if "0023fe040108010701020103010401050101010011" in s: retries = 3 while True: + if proc: + print "\tproc.poll() = %r" % proc.poll() + print "\tproc.pid = %r" % proc.pid + checkxxx() print "\tsending IPA identity(%s) at %s" % (tk, time.strftime("%T")) try: x.send(IPA().id_resp(IPA().identity(name = tk.encode('utf-8')))) @@ -1269,6 +1282,8 @@ break except: print "\tfailed sending IPA identity at", time.strftime("%T") + if proc: + print "\tproc.poll() = %r" % proc.poll() if retries < 1: print "\tgiving up" raise @@ -1281,17 +1296,29 @@ def nat_bsc_num_con(x): return len(x.vty.command("show bsc connections").split('\n')) -def nat_bsc_sock_test(nr, tk, verbose = False): +def nat_bsc_sock_test(nr, tk, verbose = False, proc=None): bsc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) bsc.bind(('127.0.0.1', 0)) bsc.connect(('127.0.0.1', 5000)) if (verbose): print "BSC%d " %nr print "\tconnected to %s:%d" % bsc.getpeername() + if proc: + print "\tproc.poll() = %r" % proc.poll() + print "\tproc.pid = %r" % proc.pid + checkxxx() ipa_handle_small(bsc, verbose) - ipa_handle_resp(bsc, tk, verbose) + checkxxx() + ipa_handle_resp(bsc, tk, verbose, proc=proc) + if proc: + print "\tproc.poll() = %r" % proc.poll() + checkxxx() bsc.recv(27) # MGCP msg + if proc: + print "\tproc.poll() = %r" % proc.poll() + checkxxx() ipa_handle_small(bsc, verbose) + checkxxx() return bsc def add_bsc_test(suite, workdir): -- To view, visit https://gerrit.osmocom.org/1741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4251a24eb7a57a354aa76de711547c3e76ebb846 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Jenkins Builder