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
Review at https://gerrit.osmocom.org/3922
vty tests: drop testBSCreload
We are having continued problems with the testBSCreload reliability on the
jenkins builds. The trouble the test makes outweighs its benefit, so drop it.
We may want to add this test to be built on a build that is not critical for
Gerrit patch verification, but in the lack of a mechanism to enable/disable
this single test, it is easiest to revert this patch manually for such a build.
Change-Id: Ib042cd24857cc58a4297d666a8a525e05bd4c917
---
M openbsc/tests/vty_test_runner.py
1 file changed, 0 insertions(+), 78 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/22/3922/1
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 92775d5..181e5ee 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -779,61 +779,6 @@
def vty_app(self):
return (4244, "src/osmo-bsc_nat/osmo-bsc_nat", "OsmoBSCNAT", "nat")
- def testBSCreload(self):
- # Use different port for the mock msc to avoid clashing with
- # the osmo-bsc_nat itself
- ip = "127.0.0.1"
- port = 5522
- self.vty.enable()
- bscs1 = self.vty.command("show bscs-config")
- nat_bsc_reload(self)
- bscs2 = self.vty.command("show bscs-config")
- # check that multiple calls to bscs-config-file give the same result
- self.assertEquals(bscs1, bscs2)
-
- # add new bsc
- self.vty.command("configure terminal")
- self.vty.command("nat")
- self.vty.command("bsc 5")
- self.vty.command("token key")
- self.vty.command("location_area_code 666")
- self.vty.command("end")
-
- # update bsc token
- self.vty.command("configure terminal")
- self.vty.command("nat")
- self.vty.command("bsc 1")
- self.vty.command("token xyu")
- self.vty.command("end")
-
- nat_msc_ip(self, ip, port)
- msc_socket, msc = nat_msc_test(self, ip, port, verbose=True)
- try:
- 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))
- self.assertEquals("MSC is connected: 1", self.vty.command("show msc connection"))
-
- nat_bsc_reload(self)
- bscs2 = self.vty.command("show bscs-config")
- # check that the reset to initial config succeeded
- self.assertEquals(bscs1, bscs2)
-
- self.assertEquals("2 BSCs configured", self.vty.command("show nat num-bscs-configured"))
- self.assertTrue(1 == nat_bsc_num_con(self))
- rem = self.vty.command("show bsc connections").split(' ')
- # remaining connection is for BSC0
- self.assertEquals('0', rem[2])
- # remaining connection is authorized
- self.assertEquals('1', rem[4])
- self.assertEquals("MSC is connected: 1", self.vty.command("show msc connection"))
- finally:
- msc.close()
- msc_socket.close()
-
def testVtyTree(self):
self.vty.enable()
self.assertTrue(self.vty.verify('configure terminal', ['']))
@@ -1310,29 +1255,6 @@
else:
if (verbose):
print "\tBSC <- NAT: ", s
-
-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, 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
- ipa_handle_small(bsc, verbose)
- ipa_handle_resp(bsc, tk, verbose, proc=proc)
- if proc:
- print "\tproc.poll() = %r" % proc.poll()
- bsc.recv(27) # MGCP msg
- if proc:
- print "\tproc.poll() = %r" % proc.poll()
- ipa_handle_small(bsc, verbose)
- return bsc
def add_bsc_test(suite, workdir):
if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc/osmo-bsc")):
--
To view, visit https://gerrit.osmocom.org/3922
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib042cd24857cc58a4297d666a8a525e05bd4c917
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>