osmo-gsm-tester[master]: Handle termination signals to exit gracefully and prevent re...
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2684 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I039e4d1908a04bf606b101ddc6a186ba67e6178e Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-gsm-tester[report]: Handle termination signals to exit gracefully and prevent re...
Patch Set 2: see https://gerrit.osmocom.org/2684 -- To view, visit https://gerrit.osmocom.org/2670 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I039e4d1908a04bf606b101ddc6a186ba67e6178e Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: report Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: neels Gerrit-HasComments: No
osmo-gsm-tester[master]: ofono_client: Discover modem path from imsi
Patch Set 3: > The main issue is that it's a chicken-egg problem. I think it is sufficient to store the modem path with those modems that are currently reserved. * get a listing of modem paths from ofono; * read the state file and see if any of those paths are currently reserved; * check only those paths that do not appear in the state. If modems are re-connected, those paths may change on the fly, so we shouldn't have too long state about the modem paths. If we re-connect a modem bank during a test run, that test run will probably fail. As soon as it frees its modem paths, the state about IMSI<->ofono-path is cleared and things are refreshed autmagically. -- To view, visit https://gerrit.osmocom.org/2676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9f4de81abc18e8db0c15df965e4811b6513e1b1 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-gsm-tester[master]: ofono_client: Discover modem path from imsi
Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/2676/2/src/osmo_gsm_tester/ofono_client.py File src/osmo_gsm_tester/ofono_client.py: Line 70: def _wait(condition, condition_args, condition_kwargs, timeout, timestep): > I'm duplicating it to avoid the problem to call through test.wait() (->suit what is the problem you're solving? That test.wait is not populated in the beginning? I do not want to duplicate this code. Let's have one central poll() that does all polling. If there are no processes that need polling, then that list is empty and we don't poll any. If there are, *any* busy loop should poll them, also this one. So let's fix my bad structuring by moving the poll guts up one level out of suite.py. Have a central poll / wait mechanism and let test.wait and suite.poll and so on call that, instead of everything else call suite.poll. (we may need to discuss the details) My intention was that nothing really needs wait() or poll() except test scripts, but the DBus interaction thwarts that plan. -- To view, visit https://gerrit.osmocom.org/2676 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9f4de81abc18e8db0c15df965e4811b6513e1b1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
osmo-gsm-tester[master]: Verify that BTS successfully connects to NITB
Patch Set 1: Code-Review-1 (9 comments) https://gerrit.osmocom.org/#/c/2692/1/example/defaults.conf File example/defaults.conf: Line 13: cell_identity: 0 i.e. for now all BTS have a cell_identity == 0? Main Q: How do you intend to populate the cell_identity? (BTW same goes for the arfcn below --> OS#2230 https://osmocom.org/issues/2230 and possibly other values; so we could agree to resolve this later, but would be nice to resolve it now if we can without too much effort) a) We could require each BTS configured in the resources config to be given a manual cell identity. That could be the easiest solution, I think I would go there for now. (and would be good to change the arfcn to that, too) b) We could give each BTS a cell identity according to the [index] in the nitb's list of BTSes (...see other comment). c) We could give each new BTS an ascending cell identity much like the phone numbers for modems. Then we are sure that for each run we're using otherwise unknown cell identities. In none of the above cases do we want this in defaults.conf. We never want all cells to have the same id. (And we never want all to use the same arfcn, either, which is my fault / missing implementation.) https://gerrit.osmocom.org/#/c/2692/1/selftest/template_test/osmo-nitb.cfg.tmpl File selftest/template_test/osmo-nitb.cfg.tmpl: Line 62: cell_identity ${bts.cell_identity} here we could use loop.index *if* we wanted the NITB's [index] https://gerrit.osmocom.org/#/c/2692/1/src/osmo_gsm_tester/bts_sysmo.py File src/osmo_gsm_tester/bts_sysmo.py: Line 40: self._conf_for_ntib = None typo: 'nitb'. Note that I am renaming 'nitb' to 'bsc' in most places (to accomodate separate BSC+MSC processes, and because we're talking about the BSC side of the NITB anyway). That code is still on a branch until tested properly. Line 135: self._conf_for_ntib = config.get_defaults('nitb_bts') > I think it may be a good idea to do all the overlay stuff inside configure( configure() is intended for the configuration to run the BTS (osmo-bts-sysmo.cfg) -- but conf_for_nitb() is passed over to the OsmoNitb to end up in osmo-nitb.cfg / osmo-bsc.cfg. So these are called at distinct times and should be independent: we call configure() when we start the BTS. But we call conf_for_nitb() when we start the NITB, which is before that. (btw, this will be conf_for_bsc() soon) I guess I should add code doc to indicate this difference. Line 139: return self._conf_for_ntib ntib: at least you're consistent ;) Line 145: return int(self.conf_for_nitb()['cell_identity']) Let's not store the for_nitb config in the BTS, this would duplicate values / break scoping. If there are values that the OsmoBts instance must know, it should be part of the 'bts' config (and copied into the for_nitb conf); conf_for_nitb() should be called exactly once for when the NITB generates its config file. * if we derive the BTS cell identity from the [index] of the nitb's list, then the NITB could figure out which index the given BTS is at and use that. So it would not need to store in the BTS struct. Arguably that's not very beautiful code but would work. * if we deal out new cell ids incrementally (like phone numbers), then we should store it in the 'bts' resource (like we store the MSISDN in the 'modem' resource). Above overlay(conf_for_nitb, self.conf) would then put the individual cell ID into the struct communicated to the NITB. Later on we fetch the cell id from self.conf, not conf_for_nitb. * if we have manual cell ids, then same: cell id in BTS conf, just without the automatic cell id generation. (I guess I would go for this first and in a second step add incremental cell id creation, i.e. just create a low-prio 'Feature' issue for it. And have a check in the nitb that warns if the user gave two BTS the same cell id maybe.) https://gerrit.osmocom.org/#/c/2692/1/src/osmo_gsm_tester/osmo_nitb.py File src/osmo_gsm_tester/osmo_nitb.py: Line 155 correct but unrelated. rather submit in a separate patch. Line 196: ctrl.do_get(OsmoNitbCtrl.BTS_CELL_IDENTITY_VAR % i) hmm, what if the number of connected BTS changes between count_bts_connected() and this? This CTRL back-and-forth looks rather unholy, looks like grown spaghetti. I think we may need a tailored race-less CTRL command, to provide all info we need in a single call (i.e. fix the BSC side so this code can be simpler + safer). Line 219: (drop some blank lines) -- To view, visit https://gerrit.osmocom.org/2692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1bbf9ac2b05d95a113ed4ad5e93093431496d44e Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
osmo-gsm-tester[master]: rename resource nitb_iface to eth_iface
Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/2681/2/src/osmo_gsm_tester/osmo_nitb.py File src/osmo_gsm_tester/osmo_nitb.py: Line 29: eth_iface = None The rename to eth_iface makes sense on the resource level, but the NITB and other programs should be agnostic of whether it is a public eth interface address or a loopback interface address. So this should have a more general name. Also it should probably reflect that it's the addr the NITB wants to bind on: bind_addr? Also see addr(); maybe make them bind_addr() and self._bind_addr? -- To view, visit https://gerrit.osmocom.org/2681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I829903d7b2111ab5ee106bce52d6121204a5a401 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
osmo-gsm-tester[master]: suite.py: Fix typo in variable name used during exception
Patch Set 1: Code-Review+2 would be good to have a regression test for this, but will touch this code soon (improving the output that reports resource details on error) and will see about it then -- To view, visit https://gerrit.osmocom.org/2698 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I44a30f51c23e6a57ccae3483c806c0ed25d2ecf9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-gsm-tester[master]: rename resource nitb_iface to eth_iface
Patch Set 2: Each program will have one network address. We are not going to add a single one for each separate protocol now. If we really need to, we can decide to separate individual things (like BTS<->BSC separate from BSC<->MSC) but I don't see a need at this point. IMHO 'public' can be misunderstood as 'not loopback'. We will name it either bind_addr or local_addr (matching the names we use in the VTY config). Thinkable to have separate ctrl_bind_addr or abis_bind_addr or what have you; now only the one; and I doubt that we ever need to separate these at all. -- To view, visit https://gerrit.osmocom.org/2681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I829903d7b2111ab5ee106bce52d6121204a5a401 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-gsm-manuals[master]: apply rename of resource nitb_iface to eth_iface
Patch Set 1: Code-Review-1 pending https://gerrit.osmocom.org/2681 -- To view, visit https://gerrit.osmocom.org/2678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icbbb7d921e7340739883650f778d5a7341840875 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[PATCH] osmo-hlr[master]: install hlr.sql in prefix/doc/osmo-hlr/
Review at https://gerrit.osmocom.org/2700 install hlr.sql in prefix/doc/osmo-hlr/ In particular I need this to start a fresh osmo-hlr instance on the osmo-gsm-tester. Might also come in handy during packaging? Change-Id: I08e48375814ab93691892299d34909c6d0bf12a2 --- M debian/osmo-hlr.install M sql/Makefile.am 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/00/2700/1 diff --git a/debian/osmo-hlr.install b/debian/osmo-hlr.install index 028b9b3..114df0b 100644 --- a/debian/osmo-hlr.install +++ b/debian/osmo-hlr.install @@ -1 +1,2 @@ /usr/bin/osmo-hlr +/usr/share/doc/osmo-hlr/hlr.sql diff --git a/sql/Makefile.am b/sql/Makefile.am index 059a571..ab44e2a 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -2,3 +2,6 @@ hlr_data.sql \ hlr.sql \ $(NULL) + +docsdir = $(datadir)/doc/osmo-hlr +docs_DATA = $(srcdir)/hlr.sql -- To view, visit https://gerrit.osmocom.org/2700 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08e48375814ab93691892299d34909c6d0bf12a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: remove bts_ocpthy.py
Review at https://gerrit.osmocom.org/2703 remove bts_ocpthy.py We're not currently paying attention to the octphy in osmo-gsm-tester. So instead of maintaining dead code, remove the bts_octphy.py; we can re-add when the octphy is implemented properly. Change-Id: Ia5d5750d440ae7019634b51fa1efe7bbb2a1d1e2 --- D src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/resource.py D src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl 3 files changed, 4 insertions(+), 148 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/03/2703/1 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py deleted file mode 100644 index f5eb8f7..000 --- a/src/osmo_gsm_tester/bts_octphy.py +++ /dev/null @@ -1,98 +0,0 @@ -# osmo_gsm_tester: specifics for running an osmo-bts-octphy -# -# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH -# -# Author: Neels Hofmeyr -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -import os -from . import log, config, util, template, process - -class OsmoBtsOctphy(log.Origin): -suite_run = None -nitb = None -run_dir = None -inst = None -env = None - -BIN_BTS_OCTPHY = 'osmo-bts-octphy' -CONF_BTS_OCTPHY = 'osmo-bts-octphy.cfg' - -def __init__(self, suite_run, conf): -self.suite_run = suite_run -self.conf = conf -self.set_name(OsmoBtsOctphy.BIN_BTS_OCTPHY) -self.set_log_category(log.C_RUN) -self.env = {} - -def start(self): -if self.nitb is None: -raise RuntimeError('BTS needs to be added to a NITB before it can be started') -self.suite_run.poll() - -self.log('Starting to connect to', self.nitb) -self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) -self.configure() - -self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst(OsmoBtsOctphy.BIN_BTS_OCTPHY))) -lib = self.inst.child('lib') -if not os.path.isdir(lib): -raise RuntimeError('No lib/ in %r' % self.inst) -self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } - -self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', -'-c', os.path.abspath(self.config_file), -'-i', self.nitb.addr()) -self.suite_run.poll() - -def launch_process(self, binary_name, *args): -binary = os.path.abspath(self.inst.child('bin', binary_name)) -run_dir = self.run_dir.new_dir(binary_name) -if not os.path.isfile(binary): -raise RuntimeError('Binary missing: %r' % binary) -proc = process.Process(binary_name, run_dir, - (binary,) + args, - env=self.env) -self.suite_run.remember_to_stop(proc) -proc.launch() - -def configure(self): -if self.nitb is None: -raise RuntimeError('BTS needs to be added to a NITB before it can be configured') -self.config_file = self.run_dir.new_file(OsmoBtsOctphy.CONF_BTS_OCTPHY) -self.dbg(config_file=self.config_file) - -values = dict(osmo_bts_octphy=config.get_defaults('osmo_bts_octphy')) -config.overlay(values, self.suite_run.config()) -config.overlay(values, dict(osmo_bts_octphy=dict(oml_remote_ip=self.nitb.addr( -config.overlay(values, dict(osmo_bts_octphy=self.conf)) -self.dbg(conf=values) - -with open(self.config_file, 'w') as f: -r = template.render(OsmoBtsOctphy.CONF_BTS_OCTPHY, values) -self.dbg(r) -f.write(r) - -def conf_for_nitb(self): -values = config.get_defaults('nitb_bts') -config.overlay(values, config.get_defaults('osmo_bts_octphy')) -config.overlay(values, self.conf) -self.dbg(conf=values) -return values - -def set_nitb(self, nitb): -self.nitb = nitb - -# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 2a64772..e660066 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo
[PATCH] osmo-gsm-tester[master]: osmo_nitb.py: remove unused imports
Review at https://gerrit.osmocom.org/2702 osmo_nitb.py: remove unused imports Change-Id: I55c118c6b277a2c8cddc251e3d36571b12504266 --- M src/osmo_gsm_tester/osmo_nitb.py 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/02/2702/1 diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 13dfe27..1285bd5 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -18,9 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import os -import random import re -import socket from . import log, util, config, template, process, osmo_ctrl, pcap_recorder -- To view, visit https://gerrit.osmocom.org/2702 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55c118c6b277a2c8cddc251e3d36571b12504266 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: contrib/jenkins: don't package /share/doc/libosmocore
Review at https://gerrit.osmocom.org/2701 contrib/jenkins: don't package /share/doc/libosmocore Change-Id: Ibd2674c3f65f820a72d77c40a9e9df3e094bb41d --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-bts-trx.sh M contrib/jenkins-build-osmo-nitb.sh 3 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/01/2701/1 diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index f321b8c..9b28bbe 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -64,6 +64,10 @@ make install done +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix_real/share/doc/libosmocore" + # build the archive that is going to be copied to the tester and then to the BTS rm "$base"/*.tgz "$base"/*.md5 || true cd "$prefix_real" diff --git a/contrib/jenkins-build-osmo-bts-trx.sh b/contrib/jenkins-build-osmo-bts-trx.sh index 652913f..b408852 100755 --- a/contrib/jenkins-build-osmo-bts-trx.sh +++ b/contrib/jenkins-build-osmo-bts-trx.sh @@ -59,6 +59,10 @@ make install done +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix/share/doc/libosmocore" + # build the archive that is going to be copied to the tester rm "$base"/*.tgz "$base"/*.md5 || true cd "$prefix" diff --git a/contrib/jenkins-build-osmo-nitb.sh b/contrib/jenkins-build-osmo-nitb.sh index 6a2420b..e4e4e32 100755 --- a/contrib/jenkins-build-osmo-nitb.sh +++ b/contrib/jenkins-build-osmo-nitb.sh @@ -59,6 +59,10 @@ make install done +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix/share/doc/libosmocore" + # build the archive that is going to be copied to the tester rm "$base"/*.tgz "$base"/*.md5 || true cd "$prefix" -- To view, visit https://gerrit.osmocom.org/2701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd2674c3f65f820a72d77c40a9e9df3e094bb41d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
osmo-gsm-tester[master]: rename resource nitb_iface to eth_iface
Patch Set 2: (1 comment) > IMHO 'public' can be misunderstood as 'not loopback'. Of course this is exactly what you meant, sorry :P > We will name it either bind_addr or local_addr (matching the names > we use in the VTY config). This is about the member names for classes. The global resource type is now going to be called 'ip_address' with possibly a type modifier being added later to distinguish public from loopback. https://gerrit.osmocom.org/#/c/2681/2/src/osmo_gsm_tester/resource.py File src/osmo_gsm_tester/resource.py: Line 44: R_NITB_IFACE = 'eth_iface' > missing change here. (NITB). You may want to run grep with CAPS enabled. ah, thanks! -- To view, visit https://gerrit.osmocom.org/2681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I829903d7b2111ab5ee106bce52d6121204a5a401 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
[PATCH] osmo-gsm-tester[master]: resources.conf: remove unused example BTS
Review at https://gerrit.osmocom.org/2704 resources.conf: remove unused example BTS Change-Id: I370789a4dc048cf71c1951f2eb70bfec261583a2 --- M example/resources.conf 1 file changed, 0 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/2704/1 diff --git a/example/resources.conf b/example/resources.conf index cd0216e..4cc06d0 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -12,28 +12,11 @@ addr: 10.42.42.114 band: GSM-1800 -- label: octBTS 3000 - type: osmo-bts-octphy - ipa_unit_id: 5 - addr: 10.42.42.115 - band: GSM-1800 - trx_list: - - hw_addr: 00:0c:90:32:b5:8a -net_device: eth0.2342 - - label: Ettus B210 type: osmo-bts-trx ipa_unit_id: 6 addr: 10.42.42.116 band: GSM-1800 - -- label: nanoBTS 1900 - type: nanobts - ipa_unit_id: 1902 - addr: 10.42.42.190 - band: GSM-1900 - trx_list: - - hw_addr: 00:02:95:00:41:b3 arfcn: - arfcn: 512 -- To view, visit https://gerrit.osmocom.org/2704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I370789a4dc048cf71c1951f2eb70bfec261583a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: debug: config logging before templates: use pprint and an al...
Review at https://gerrit.osmocom.org/2707 debug: config logging before templates: use pprint and an all-caps label Change-Id: I0e1c1d3ce8163d5b40c17b7d0fb0847a068ced76 --- M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_nitb.py 3 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/07/2707/1 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 07f7d6e..70ac511 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -18,6 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import os +import pprint from . import log, config, util, template, process class OsmoBtsTrx(log.Origin): @@ -93,7 +94,8 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, dict(osmo_bts_trx=dict(oml_remote_ip=self.nitb.addr( config.overlay(values, dict(osmo_bts_trx=self.conf)) -self.dbg(conf=values) + +self.dbg('OSMO-BTS-TRX CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: r = template.render(OsmoBtsTrx.CONF_BTS_TRX, values) diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 771d303..e445838 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -18,6 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import os +import pprint from . import log, config, util, template, process class SysmoBts(log.Origin): @@ -120,7 +121,8 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, { 'osmo_bts_sysmo': { 'oml_remote_ip': self.nitb.addr() } }) config.overlay(values, { 'osmo_bts_sysmo': self.conf }) -self.dbg(conf=values) + +self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: r = template.render(SysmoBts.BTS_SYSMO_CFG, values) diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 1285bd5..58b28ab 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -19,6 +19,7 @@ import os import re +import pprint from . import log, util, config, template, process, osmo_ctrl, pcap_recorder @@ -76,7 +77,7 @@ bts_list.append(bts.conf_for_nitb()) config.overlay(values, dict(nitb=dict(net=dict(bts_list=bts_list -self.dbg(conf=values) +self.dbg('NITB CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: r = template.render('osmo-nitb.cfg', values) -- To view, visit https://gerrit.osmocom.org/2707 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e1c1d3ce8163d5b40c17b7d0fb0847a068ced76 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: nitb config: set: logging color 1, category 1
Review at https://gerrit.osmocom.org/2706 nitb config: set: logging color 1, category 1 Change-Id: Icd9022f5732caac65d16fc49f2ed7833199523de --- M selftest/template_test.ok M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/2706/1 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 9ae8e62..449bae0 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -5,8 +5,8 @@ ! log stderr logging filter all 1 - logging color 0 - logging print category 0 + logging color 1 + logging print category 1 logging print extended-timestamp 1 logging level all debug ! diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index d7ab472..0db7a26 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -3,8 +3,8 @@ ! log stderr logging filter all 1 - logging color 0 - logging print category 0 + logging color 1 + logging print category 1 logging print extended-timestamp 1 logging level all debug ! -- To view, visit https://gerrit.osmocom.org/2706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd9022f5732caac65d16fc49f2ed7833199523de Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: resource error logging that is easier to understand
Review at https://gerrit.osmocom.org/2705 resource error logging that is easier to understand Log what a suite requested, what it has reserved and the complete resource state. Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15 --- M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py 2 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/05/2705/1 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index e660066..ebc9457 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -463,8 +463,9 @@ available = available_dict.get(kind) self.dbg(available=len(available)) if not available: -raise NoResourceExn('No unused resource found: %r%s' % +raise NoResourceExn('When trying to reserve %r nr %d: No unused resource found%s' % (kind, + self.count(kind) + 1, (' matching %r' % specifics) if specifics else '') ) pick = available[0] @@ -496,5 +497,13 @@ self.resources_pool.free(self.origin, self.reserved) self.reserved = None +def counts(self): +counts = {} +for key in self.reserved.keys(): +counts[key] = self.count(key) +return counts + +def count(self, key): +return len(self.reserved.get(key) or []) # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0664897..ca73840 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,6 +22,7 @@ import time import copy import traceback +import pprint from . import config, log, template, util, resource, schema, ofono_client, osmo_nitb from . import test @@ -130,7 +131,8 @@ ftype = type(e).__name__ fmsg = repr(e) + '\n' + traceback.format_exc().rstrip() if isinstance(e, resource.NoResourceExn): -fmsg += '\n' + 'Current resource state:\n' + repr(suite_run.reserved_resources) +fmsg += suite_run.resource_status_str() + self.set_fail(ftype, fmsg, False) finally: @@ -337,6 +339,13 @@ self.log('prompt entered:', repr(entered)) return entered +def resource_status_str(self): +return '\n'.join(('', +'SUITE RUN: %s' % self.origin_id(), +'ASKED FOR:', pprint.pformat(self._resource_requirements), +'RESERVED COUNT:', pprint.pformat(self.reserved_resources.counts()), +'RESOURCES STATE:', repr(self.reserved_resources))) + loaded_suite_definitions = {} def load(suite_name): -- To view, visit https://gerrit.osmocom.org/2705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: rename resource nitb_iface to ip_address
gsm_tester/suite.py index ca73840..5ef62b5 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -264,13 +264,13 @@ for process in self._processes: process.terminate() -def nitb_iface(self): -return self.reserved_resources.get(resource.R_NITB_IFACE) +def ip_address(self): +return self.reserved_resources.get(resource.R_IP_ADDRESS) -def nitb(self, nitb_iface=None): -if nitb_iface is None: -nitb_iface = self.nitb_iface() -return osmo_nitb.OsmoNitb(self, nitb_iface) +def nitb(self, ip_address=None): +if ip_address is None: +ip_address = self.ip_address() +return osmo_nitb.OsmoNitb(self, ip_address) def bts(self): return bts_obj(self, self.reserved_resources.get(resource.R_BTS)) diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 0db7a26..9339545 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -10,11 +10,11 @@ ! line vty no login - bind ${nitb_iface.addr} + bind ${ip_address.addr} ! e1_input e1_line 0 driver ipa - ipa bind ${nitb_iface.addr} + ipa bind ${ip_address.addr} network network country code ${nitb.net.mcc} mobile network code ${nitb.net.mnc} @@ -75,11 +75,11 @@ % endfor %endfor smpp - local-tcp-ip ${nitb_iface.addr} 2775 + local-tcp-ip ${ip_address.addr} 2775 system-id test policy closed esme test password test default-route ctrl - bind ${nitb_iface.addr} + bind ${ip_address.addr} diff --git a/suites/debug/suite.conf b/suites/debug/suite.conf index 04959b8..adfc161 100644 --- a/suites/debug/suite.conf +++ b/suites/debug/suite.conf @@ -1,5 +1,5 @@ resources: - nitb_iface: + ip_address: - times: 1 bts: - times: 1 diff --git a/suites/sms/suite.conf b/suites/sms/suite.conf index 4a03379..376f6cd 100644 --- a/suites/sms/suite.conf +++ b/suites/sms/suite.conf @@ -1,5 +1,5 @@ resources: - nitb_iface: + ip_address: - times: 1 bts: - times: 1 -- To view, visit https://gerrit.osmocom.org/2712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ad583ae7a33f7a7bb56fe78a125f73c56a0e860 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: default-suites.conf: run aoip
Review at https://gerrit.osmocom.org/2721 default-suites.conf: run aoip Change-Id: I0f7d6feec5062c2aaf07eb9a7f543a4a84cb1ff7 --- M example/default-suites.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/21/2721/1 diff --git a/example/default-suites.conf b/example/default-suites.conf index 601076a..3d43764 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -1 +1 @@ -- sms:sysmo +- aoip_sms:sysmo -- To view, visit https://gerrit.osmocom.org/2721 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f7d6feec5062c2aaf07eb9a7f543a4a84cb1ff7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: rename more items from nitb to bsc
('LD_LIBRARY_PATH=%s' % remote_lib, remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.nitb.addr()), + '-i', self.bsc.addr()), remote_cwd=remote_run_dir) def _process_remote(self, name, popen_args, remote_cwd=None): @@ -109,8 +109,8 @@ proc.raise_exn('Exited in error') def configure(self): -if self.nitb is None: -raise RuntimeError('BTS needs to be added to a NITB before it can be configured') +if self.bsc is None: +raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') self.remote_addr = self.conf.get('addr') @@ -119,7 +119,7 @@ values = { 'osmo_bts_sysmo': config.get_defaults('osmo_bts_sysmo') } config.overlay(values, self.suite_run.config()) -config.overlay(values, { 'osmo_bts_sysmo': { 'oml_remote_ip': self.nitb.addr() } }) +config.overlay(values, { 'osmo_bts_sysmo': { 'oml_remote_ip': self.bsc.addr() } }) config.overlay(values, { 'osmo_bts_sysmo': self.conf }) self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values)) @@ -129,14 +129,14 @@ self.dbg(r) f.write(r) -def conf_for_nitb(self): -values = config.get_defaults('nitb_bts') +def conf_for_bsc(self): +values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_sysmo')) config.overlay(values, self.conf) self.dbg(conf=values) return values -def set_nitb(self, nitb): -self.nitb = nitb +def set_bsc(self, bsc): +self.bsc = bsc # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 07415d3..5fd6476 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -74,7 +74,7 @@ bts_list = [] for bts in self.bts: -bts_list.append(bts.conf_for_nitb()) +bts_list.append(bts.conf_for_bsc()) config.overlay(values, dict(nitb=dict(net=dict(bts_list=bts_list self.dbg('NITB CONFIG:\n' + pprint.pformat(values)) @@ -89,7 +89,7 @@ def bts_add(self, bts): self.bts.append(bts) -bts.set_nitb(self) +bts.set_bsc(self) def subscriber_add(self, modem, msisdn=None): if msisdn is None: -- To view, visit https://gerrit.osmocom.org/2713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a0343b9243b166d4053cc44f523543f1245d772 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP
Review at https://gerrit.osmocom.org/2719 MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP Change-Id: I5842e8f1cba8e8e6bedfc08540efcafe207159cb --- M example/defaults.conf A src/osmo_gsm_tester/osmo_bsc.py A src/osmo_gsm_tester/osmo_hlr.py A src/osmo_gsm_tester/osmo_mgcpgw.py A src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-hlr.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-mgcpgw.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl 10 files changed, 636 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/19/2719/1 diff --git a/example/defaults.conf b/example/defaults.conf index b1e26f0..95bd172 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -2,8 +2,26 @@ net: mcc: 901 mnc: 70 -short_name: osmo-gsm-tester -long_name: osmo-gsm-tester +short_name: osmo-gsm-tester-nitb +long_name: osmo-gsm-tester-nitb +auth_policy: closed +encryption: a5 0 + +bsc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc +auth_policy: closed +encryption: a5 0 + +msc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc auth_policy: closed encryption: a5 0 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py new file mode 100644 index 000..87f10c4 --- /dev/null +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -0,0 +1,102 @@ +# osmo_gsm_tester: specifics for running an osmo-bsc +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoBsc(log.Origin): +suite_run = None +eth_iface = None +run_dir = None +config_file = None +process = None +bts = None + +def __init__(self, suite_run, msc, eth_iface): +self.suite_run = suite_run +self.eth_iface = eth_iface +self.set_log_category(log.C_RUN) +self.set_name('osmo-bsc_%s' % eth_iface.get('addr')) +self.bts = [] +self.msc = msc + +def start(self): +self.log('Starting osmo-bsc') +self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) +self.configure() + +# NOTE: While OsmoMSC and OsmoBSC live in the same git repository, the +# osmo-msc build will also provide the OsmoBSC binary. As soon as the +# repositories are separate, there shall be a separate artifact. +inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-msc'))) + +binary = inst.child('bin', 'osmo-bsc') +if not os.path.isfile(binary): +raise RuntimeError('Binary missing: %r' % binary) +lib = inst.child('lib') +if not os.path.isdir(lib): +raise RuntimeError('No lib/ in %r' % inst) + +iface = util.ip_to_iface(self.addr()) +pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) + +env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + +self.dbg(run_dir=self.run_dir, binary=binary, env=env) +self.process = process.Process(self.name(), self.run_dir, + (binary, '-c', +os.path.abspath(self.config_file)), + env=env) +self.suite_run.remember_to_stop(self.process) +self.process.launch() + +def configure(self): +self.config_file = self.run_dir.new_file('osmo-bsc.cfg') +self.dbg(config_file=self.config_file) + +values = dict(bsc=config.get_defaults('bsc')) +config.overlay(values, self.suite_run.config()) +config.overlay(values, dict(bsc=dict(eth_iface=self.eth_iface))) + +bts_list = [] +for bts in self.bts: +bts_list.append(
[PATCH] osmo-gsm-tester[master]: config: nitb template: move ip_address to nitb.ip_address
Review at https://gerrit.osmocom.org/2714 config: nitb template: move ip_address to nitb.ip_address It's the NITB's address, so it should go in the nitb.* scope. Change-Id: I71a5ef153b7156b0644253f5aa8a0c848f42ab3b --- M src/osmo_gsm_tester/osmo_nitb.py M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/14/2714/1 diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 5fd6476..ef55185 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -70,7 +70,7 @@ values = dict(nitb=config.get_defaults('nitb')) config.overlay(values, self.suite_run.config()) -config.overlay(values, dict(ip_address=self.ip_address)) +config.overlay(values, dict(nitb=dict(ip_address=self.ip_address))) bts_list = [] for bts in self.bts: diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 9339545..a47ac02 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -10,11 +10,11 @@ ! line vty no login - bind ${ip_address.addr} + bind ${nitb.ip_address.addr} ! e1_input e1_line 0 driver ipa - ipa bind ${ip_address.addr} + ipa bind ${nitb.ip_address.addr} network network country code ${nitb.net.mcc} mobile network code ${nitb.net.mnc} @@ -75,11 +75,11 @@ % endfor %endfor smpp - local-tcp-ip ${ip_address.addr} 2775 + local-tcp-ip ${nitb.ip_address.addr} 2775 system-id test policy closed esme test password test default-route ctrl - bind ${ip_address.addr} + bind ${nitb.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/2714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71a5ef153b7156b0644253f5aa8a0c848f42ab3b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: MSC+BSC: add separate suites for AoIP: aoip_sms, aoip_debug
Review at https://gerrit.osmocom.org/2720 MSC+BSC: add separate suites for AoIP: aoip_sms, aoip_debug It would be nicer to select the network programs as scenarios, i.e. independently from the specifics of tests that don't care whether a NITB or a MSC+BSC is in place. See OS#2270. For now have a separate script for BSC+MSC+HLR operation to be able to rapidly get the binaries to work. We might even simply drop the NITB style, in which case we don't need to make it configurable. Change-Id: I06d2529822f3e483ce7fffc439edfa57844e01ef --- A suites/aoip_debug/interactive.py A suites/aoip_debug/suite.conf A suites/aoip_sms/mo_mt_sms.py A suites/aoip_sms/suite.conf 4 files changed, 85 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/20/2720/1 diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py new file mode 100755 index 000..4f56d5c --- /dev/null +++ b/suites/aoip_debug/interactive.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +modems = suite.modems(int(prompt('How many modems?'))) + +hlr.start() +msc.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +for m in modems: + hlr.subscriber_add(m) + m.connect(bsc) + +while True: + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered') + cmd = cmd.strip().lower() + + if not cmd: +continue + if 'quit'.startswith(cmd): +break + elif 'wait-registered'.startswith(cmd): +try: + wait(msc.subscriber_attached, *modems) +except Timeout: + print('Timeout while waiting for registration.') + elif 'get-registered'.startswith(cmd): +print(msc.imsi_list_attached()) +print('RESULT: %s' % + ('All modems are registered.' if msc.subscriber_attached(*modems) +else 'Some modem(s) not registered yet.')) + elif 'sms'.startswith(cmd): +for mo in modems: + for mt in modems: +mo.sms_send(mt.msisdn, 'to ' + mt.name()) diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf new file mode 100644 index 000..b984457 --- /dev/null +++ b/suites/aoip_debug/suite.conf @@ -0,0 +1,7 @@ +resources: + eth_iface: + - times: 4 + bts: + - times: 1 + modem: + - times: 4 diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py new file mode 100755 index 000..04d7ef7 --- /dev/null +++ b/suites/aoip_sms/mo_mt_sms.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +ms_mo = suite.modem() +ms_mt = suite.modem() + +hlr.start() +msc.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +hlr.subscriber_add(ms_mo) +hlr.subscriber_add(ms_mt) + +ms_mo.connect(bsc) +ms_mt.connect(bsc) +wait(msc.subscriber_attached, ms_mo, ms_mt) + +sms = ms_mo.sms_send(ms_mt.msisdn) +wait(ms_mt.sms_was_received, sms) diff --git a/suites/aoip_sms/suite.conf b/suites/aoip_sms/suite.conf new file mode 100644 index 000..845de8b --- /dev/null +++ b/suites/aoip_sms/suite.conf @@ -0,0 +1,7 @@ +resources: + eth_iface: + - times: 4 + bts: + - times: 1 + modem: + - times: 2 -- To view, visit https://gerrit.osmocom.org/2720 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06d2529822f3e483ce7fffc439edfa57844e01ef Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: contrib: add jenkins-build-osmo-msc.sh
Review at https://gerrit.osmocom.org/2717 contrib: add jenkins-build-osmo-msc.sh Change-Id: I2d5520cab0ad09f23e3ba49404385af80acf56f6 --- A contrib/jenkins-build-osmo-msc.sh 1 file changed, 82 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/17/2717/1 diff --git a/contrib/jenkins-build-osmo-msc.sh b/contrib/jenkins-build-osmo-msc.sh new file mode 100755 index 000..7e71488 --- /dev/null +++ b/contrib/jenkins-build-osmo-msc.sh @@ -0,0 +1,82 @@ +#!/bin/sh +set -e -x + +base="$PWD" +prefix="$base/inst-osmo-msc" + +rm -f "$base/osmo-msc*.tgz" + +git_url="git://git.osmocom.org" + +have_repo() { + repo="$1" + branch="${2-master}" + + cd "$base" + if [ ! -d "$repo" ]; then + git clone "$git_url/$repo" -b "$branch" "$repo" + fi + cd "$repo" + rm -rf * + git fetch origin + git checkout . + git checkout "$branch" + git reset --hard origin/"$branch" + git rev-parse HEAD + + cd "$base" +} + +build_repo() { + dep="$1" + branch="${2-master}" + + have_repo "$dep" "$branch" + + cd "$dep" + + echo "$(git rev-parse HEAD) $dep" >> "$prefix/osmo-msc_git_hashes.txt" + + config_opts="" + + case "$dep" in + 'openbsc') + config_opts="$config_opts --enable-smpp --enable-osmo-bsc --enable-nat --enable-iu" + cd openbsc/ + ;; + esac + + autoreconf -fi + ./configure --prefix="$prefix" $config_opts + make -j8 || make # libsmpp34 can't build in parallel + make install +} + +rm -rf "$prefix" +mkdir -p "$prefix" + +export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" +export LD_LIBRARY_PATH="$prefix/lib" + +build_repo libosmocore +build_repo libosmo-abis +build_repo libosmo-netif +build_repo openggsn +build_repo libsmpp34 +build_repo libosmo-sccp neels/aoip # TEMPORARY BRANCH +build_repo libasn1c +build_repo osmo-iuh neels/sigtran # TEMPORARY BRANCH +build_repo openbsc aoip + +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix/share/doc/libosmocore" + +# build the archive that is going to be copied to the tester +rm "$base"/*.tgz "$base"/*.md5 || true +cd "$prefix" +this="osmo-msc.build-${BUILD_NUMBER-$(date +%Y-%m-%d_%H_%M_%S)}" +tar="${this}.tgz" +tar czf "$base/$tar" * +cd "$base" +md5sum "$tar" > "${this}.md5" -- To view, visit https://gerrit.osmocom.org/2717 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d5520cab0ad09f23e3ba49404385af80acf56f6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: bts: add remote_addr() function
Review at https://gerrit.osmocom.org/2715 bts: add remote_addr() function To start an MGCPGW, we so far need the BTS address in advance (should get fixed at some point, but so far we do). The sysmoBTS has a fixed IP address configured. The osmo-bts-trx so far always uses 127.0.0.1 (should also be fixed at some point). Both now return this address with the remote_addr() function. This also replaces a SysmoBts.remote_addr member variable (which is not sufficient because it is only populated during configure()). Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b --- M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py 2 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/15/2715/1 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 9533c68..5d60074 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -42,6 +42,10 @@ self.set_log_category(log.C_RUN) self.env = {} +def remote_addr(self): +# FIXME +return '127.0.0.1' + def start(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 5cc304f..2da0396 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -26,7 +26,6 @@ bsc = None run_dir = None inst = None -remote_addr = None remote_inst = None remote_env = None remote_dir = None @@ -64,14 +63,14 @@ self.run_remote('rm-remote-dir', ('test', '!', '-d', SysmoBts.REMOTE_DIR, '||', 'rm', '-rf', SysmoBts.REMOTE_DIR)) self.run_remote('mk-remote-dir', ('mkdir', '-p', SysmoBts.REMOTE_DIR)) self.run_local('scp-inst-to-sysmobts', -('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.remote_addr, str(self.remote_inst +('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.remote_addr(), str(self.remote_inst remote_run_dir = self.remote_dir.child(SysmoBts.BTS_SYSMO_BIN) self.run_remote('mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) remote_config_file = self.remote_dir.child(SysmoBts.BTS_SYSMO_CFG) self.run_local('scp-cfg-to-sysmobts', -('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.remote_addr, remote_config_file))) +('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.remote_addr(), remote_config_file))) self.run_remote('reload-dsp-firmware', ('/bin/sh', '-c', '"cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0"')) @@ -85,7 +84,7 @@ def _process_remote(self, name, popen_args, remote_cwd=None): run_dir = self.run_dir.new_dir(name) -return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr, remote_cwd, +return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, popen_args) def run_remote(self, name, popen_args, remote_cwd=None): @@ -108,11 +107,12 @@ if proc.result != 0: proc.raise_exn('Exited in error') +def remote_addr(self): +return self.conf.get('addr') + def configure(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') - -self.remote_addr = self.conf.get('addr') self.config_file = self.run_dir.new_file(SysmoBts.BTS_SYSMO_CFG) self.dbg(config_file=self.config_file) -- To view, visit https://gerrit.osmocom.org/2715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: contrib: add jenkins-build-osmo-hlr.sh
Review at https://gerrit.osmocom.org/2718 contrib: add jenkins-build-osmo-hlr.sh Change-Id: I07ca99c57eb1c47a3f83673502c8ec638e7e42b2 --- A contrib/jenkins-build-osmo-hlr.sh 1 file changed, 69 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/18/2718/1 diff --git a/contrib/jenkins-build-osmo-hlr.sh b/contrib/jenkins-build-osmo-hlr.sh new file mode 100755 index 000..6fbebab --- /dev/null +++ b/contrib/jenkins-build-osmo-hlr.sh @@ -0,0 +1,69 @@ +#!/bin/sh +set -e -x + +base="$PWD" +prefix="$base/inst-osmo-hlr" + +rm -f "$base/osmo-hlr*.tgz" + +git_url="git://git.osmocom.org" + +have_repo() { + repo="$1" + branch="${2-master}" + + cd "$base" + if [ ! -d "$repo" ]; then + git clone "$git_url/$repo" -b "$branch" "$repo" + fi + cd "$repo" + rm -rf * + git fetch origin + git checkout . + git checkout "$branch" + git reset --hard origin/"$branch" + git rev-parse HEAD + + cd "$base" +} + +build_repo() { + dep="$1" + branch="${2-master}" + + have_repo "$dep" "$branch" + + cd "$dep" + + echo "$(git rev-parse HEAD) $dep" >> "$prefix/osmo-hlr_git_hashes.txt" + + config_opts="" + + autoreconf -fi + ./configure --prefix="$prefix" $config_opts + make -j8 + make install +} + +rm -rf "$prefix" +mkdir -p "$prefix" + +export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" +export LD_LIBRARY_PATH="$prefix/lib" + +build_repo libosmocore +build_repo libosmo-abis +build_repo osmo-hlr + +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix/share/doc/libosmocore" + +# build the archive that is going to be copied to the tester +rm "$base"/*.tgz "$base"/*.md5 || true +cd "$prefix" +this="osmo-hlr.build-${BUILD_NUMBER-$(date +%Y-%m-%d_%H_%M_%S)}" +tar="${this}.tgz" +tar czf "$base/$tar" * +cd "$base" +md5sum "$tar" > "${this}.md5" -- To view, visit https://gerrit.osmocom.org/2718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07ca99c57eb1c47a3f83673502c8ec638e7e42b2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: resources.conf: more IP addresses
Review at https://gerrit.osmocom.org/2716 resources.conf: more IP addresses The upcoming BSC+MSC+HLR+MGCPGW style will need four IP addresses. I found six already configured on the main unit, so adding all of them to our resources.conf. Change-Id: Ie0e0ed9bb7fbd87ebe630c32ef59659117d77ed8 --- M example/resources.conf 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/16/2716/1 diff --git a/example/resources.conf b/example/resources.conf index 8b61248..4bb4dbd 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -4,6 +4,9 @@ - addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 +- addr: 10.42.42.4 +- addr: 10.42.42.5 +- addr: 10.42.42.6 bts: - label: sysmoBTS 1002 -- To view, visit https://gerrit.osmocom.org/2716 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0e0ed9bb7fbd87ebe630c32ef59659117d77ed8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: config: nitb template: move ip_address to nitb.ip_address
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2714 to look at the new patch set (#2). config: nitb template: move ip_address to nitb.ip_address It's the NITB's address, so it should go in the nitb.* scope. Change-Id: I71a5ef153b7156b0644253f5aa8a0c848f42ab3b --- M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/osmo_nitb.py M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 4 files changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/14/2714/2 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 0f896ee..d031c96 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -12,11 +12,11 @@ ! line vty no login - bind val_ip_address_addr + bind val_ip_address ! e1_input e1_line 0 driver ipa - ipa bind val_ip_address_addr + ipa bind val_ip_address network network country code val_mcc mobile network code val_mnc @@ -135,14 +135,14 @@ timeslot 3 phys_chan_config val_phys_chan_config_3 smpp - local-tcp-ip val_ip_address_addr 2775 + local-tcp-ip val_ip_address 2775 system-id test policy closed esme test password test default-route ctrl - bind val_ip_address_addr + bind val_ip_address - Testing: expect to fail on invalid templates dir sucess: setting non-existing templates dir raised RuntimeError diff --git a/selftest/template_test.py b/selftest/template_test.py index b7d987c..45347b6 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -57,8 +57,8 @@ encryption='val_encryption', bts_list=(mock_bts0, mock_bts1) ), -), -ip_address=dict(addr='val_ip_address_addr'), +ip_address=dict(addr='val_ip_address'), +), ) print(template.render('osmo-nitb.cfg', vals)) diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 5fd6476..ef55185 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -70,7 +70,7 @@ values = dict(nitb=config.get_defaults('nitb')) config.overlay(values, self.suite_run.config()) -config.overlay(values, dict(ip_address=self.ip_address)) +config.overlay(values, dict(nitb=dict(ip_address=self.ip_address))) bts_list = [] for bts in self.bts: diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 9339545..a47ac02 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -10,11 +10,11 @@ ! line vty no login - bind ${ip_address.addr} + bind ${nitb.ip_address.addr} ! e1_input e1_line 0 driver ipa - ipa bind ${ip_address.addr} + ipa bind ${nitb.ip_address.addr} network network country code ${nitb.net.mcc} mobile network code ${nitb.net.mnc} @@ -75,11 +75,11 @@ % endfor %endfor smpp - local-tcp-ip ${ip_address.addr} 2775 + local-tcp-ip ${nitb.ip_address.addr} 2775 system-id test policy closed esme test password test default-route ctrl - bind ${ip_address.addr} + bind ${nitb.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/2714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I71a5ef153b7156b0644253f5aa8a0c848f42ab3b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder
[ABANDON] osmo-gsm-tester[master]: rename resource nitb_iface to eth_iface
Neels Hofmeyr has abandoned this change. Change subject: rename resource nitb_iface to eth_iface .. Abandoned I accidentally re-submitted with different change-id. See https://gerrit.osmocom.org/2712 I3ad583ae7a33f7a7bb56fe78a125f73c56a0e860 -- To view, visit https://gerrit.osmocom.org/2681 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I829903d7b2111ab5ee106bce52d6121204a5a401 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[PATCH] osmo-gsm-manuals[master]: apply rename of resource nitb_iface to ip_address
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2678 to look at the new patch set (#2). apply rename of resource nitb_iface to ip_address See osmo-gsm-tester change-id I829903d7b2111ab5ee106bce52d6121204a5a401 Change-Id: Icbbb7d921e7340739883650f778d5a7341840875 --- M OsmoGSMTester/chapters/config.adoc M OsmoGSMTester/chapters/intro.adoc 2 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/78/2678/2 diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index f264284..7c06392 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -75,7 +75,7 @@ These kinds of resource are known: -'nitb_iface':: +'ip_address':: List of IP addresses to run osmo-nitb instances on. The main unit typically has a limited number of such IP addresses configured, which the connected BTS models can see on their network. @@ -138,7 +138,7 @@ currently always comp128v1) Side note: at first sight it might make sense to the reader to rather structure -e.g. the 'nitb_iface' or 'arfcn' configuration as + +e.g. the 'ip_address' or 'arfcn' configuration as + '"arfcn: GSM-1800: [512, 514, ...]"', + but the more verbose format is chosen to stay consistent with the general structure of resource configurations, which the resource allocation algorithm diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 46c5ec6..8a09910 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -96,7 +96,7 @@ subgraph cluster_suite { label = "Suite: sms"; - requires [label="Requirements (suite.conf):\nmodem: times: 2\nbts\nnitb_iface\narfcn"] + requires [label="Requirements (suite.conf):\nmodem: times: 2\nbts\nip_address\narfcn"] subgraph cluster_tests { label = "Test Scripts (py)"; mo_mt_sms @@ -202,7 +202,7 @@ <>. -nitb_iface: +ip_address: - addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 @@ -268,7 +268,7 @@ resources: - nitb_iface: + ip_address: - times: 1 bts: - times: 1 @@ -291,7 +291,7 @@ - type: osmo-bts-sysmo -Which 'nitb_iface' or 'modem' is used in particular doesn't really matter, so +Which 'ip_address' or 'modem' is used in particular doesn't really matter, so it can be left up to the osmo-gsm-tester to pick these automatically. Any number of such scenario configurations can be combined in the form -- To view, visit https://gerrit.osmocom.org/2678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icbbb7d921e7340739883650f778d5a7341840875 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-gsm-tester[master]: osmo_nitb.py: Remove unused var
Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo_nitb.py: Remove unused var .. osmo_nitb.py: Remove unused var Change-Id: Ifb0c274aac9f8fda177992f19146807387485627 --- M src/osmo_gsm_tester/osmo_nitb.py 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 13dfe27..07a3623 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -152,7 +152,6 @@ return True def subscriber_list_active(self): -var = 'subscriber-list-active-v1' aslist_str = "" with self.ctrl() as ctrl: ctrl.do_get(OsmoNitbCtrl.SUBSCR_LIST_ACTIVE_VAR) -- To view, visit https://gerrit.osmocom.org/2699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifb0c274aac9f8fda177992f19146807387485627 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-gsm-tester[master]: osmo_nitb.py: Remove unused var
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifb0c274aac9f8fda177992f19146807387485627 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-ci[master]: Introduce artifacts holding dependencies to speed up builds.
Patch Set 7: (3 comments) some replies... https://gerrit.osmocom.org/#/c/2465/7/scripts/osmo-build.sh File scripts/osmo-build.sh: Line 86:job_name="${JOB_NAME//\//#}" > It replaces '/' with '#' to avoid slashes in the artifact filename. Will ad Ah, this is a bash-ism that I don't know. My personal preference would be to stay with /bin/sh bounds ... fine then. Aren't '#' in file names rather unusual, given that they are comment delimiters? how about underscores, double-underscores or maybe a comma? Line 171: rm -f "$job_store/*" > True, I somehow relied on the assumption that job B, which has been trigger there's also the parallel matrix builds? do they each have a separate artifact store? If they share, builds of the same matrix may GC away artifacts the other has just built, or something in that line. Line 187: generateArtifactHashes "$1" > >> And about the GC problem above: the most waterproof let's try to keep the algorithm completely timing-free, i.e. do not rely on x amount of time having passed. Atomicity should suffice, right? -- To view, visit https://gerrit.osmocom.org/2465 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifee0a2f837d23b19aa5326f810234d5452e47484 Gerrit-PatchSet: 7 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: blobb Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: blobb Gerrit-Reviewer: neels Gerrit-HasComments: Yes
[PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: add rtprio conf, tweak core dump conf
Review at https://gerrit.osmocom.org/2722 OsmoGSMTester: add rtprio conf, tweak core dump conf Change-Id: I284c3bfb15e914f1f6ab00f15874fe5ea6190c5c --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/22/2722/1 diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 2a20ebd..8ace16f 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -325,9 +325,24 @@ osmo-gsm-tester source tree to the main unit: -cp install/osmo-gsm-tester-limits.conf /etc/security/limits.d/ +sudo -s +echo "@osmo-gsm-tester - core unlimited" > /etc/security/limits.d/osmo-gsm-tester_allow-core.conf +Re-login the user to make these changes take effect. + + Allow Realtime Priority + +Certain binaries should be run with real-time priority, like 'osmo-bts-trx'. +Add this permission on the main unit: + + +sudo -s +echo "@osmo-gsm-tester - rtprio 99" > /etc/security/limits.d/osmo-gsm-tester_allow-rtprio.conf + + +Re-login the user to make these changes take effect. + User Permissions On the main unit, create a group for all users that should be allowed to use -- To view, visit https://gerrit.osmocom.org/2722 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I284c3bfb15e914f1f6ab00f15874fe5ea6190c5c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
osmo-gsm-tester[master]: Exit with failure if not enough resources are found
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2723 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9e38435ff71416585a259c823053bd07c670d495 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmo-gsm-tester[master]: Exit with failure if not enough resources are found
Neels Hofmeyr has submitted this change and it was merged. Change subject: Exit with failure if not enough resources are found .. Exit with failure if not enough resources are found Change-Id: I9e38435ff71416585a259c823053bd07c670d495 --- M src/osmo-gsm-tester.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-gsm-tester.py b/src/osmo-gsm-tester.py index 766f356..9b7ae25 100755 --- a/src/osmo-gsm-tester.py +++ b/src/osmo-gsm-tester.py @@ -198,6 +198,7 @@ trials_run.append(current_trial) except Exception: # Do not catch here subclasses of BaseException such as SystemExit, let them finish the program +any_failed = True current_trial.log_exn() sys.stderr.flush() -- To view, visit https://gerrit.osmocom.org/2723 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e38435ff71416585a259c823053bd07c670d495 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-gsm-tester[master]: trial.py: Remove accidental double creation of file
Neels Hofmeyr has submitted this change and it was merged. Change subject: trial.py: Remove accidental double creation of file .. trial.py: Remove accidental double creation of file This file is already created in run_suites(). Creating it in here too makes a new file name()_2.xml created and populated instead of the original name().xml one. Change-Id: Ibec14a1ef5fd029aa37ce666d00236bb872d636e --- M selftest/trial_test.ok M src/osmo_gsm_tester/trial.py 2 files changed, 1 insertion(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/selftest/trial_test.ok b/selftest/trial_test.ok index 7434a10..6ad39a9 100644 --- a/selftest/trial_test.ok +++ b/selftest/trial_test.ok @@ -4,7 +4,7 @@ [TMP]/third - fetch trial dirs in order first -['last_run', 'run.[TIMESTAMP]', 'taken'] +['taken'] second third - no more trial dirs left diff --git a/src/osmo_gsm_tester/trial.py b/src/osmo_gsm_tester/trial.py index 67746f7..3eb0c67 100644 --- a/src/osmo_gsm_tester/trial.py +++ b/src/osmo_gsm_tester/trial.py @@ -63,7 +63,6 @@ self.inst_dir = util.Dir(self.dir.child('inst')) self.bin_tars = [] self.suites = [] -self.junit_path = self.get_run_dir().new_file(self.name()+'.xml') self.status = Trial.UNKNOWN def __repr__(self): -- To view, visit https://gerrit.osmocom.org/2724 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibec14a1ef5fd029aa37ce666d00236bb872d636e Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-gsm-tester[master]: trial.py: Remove accidental double creation of file
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2724 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibec14a1ef5fd029aa37ce666d00236bb872d636e Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[PATCH] osmo-gsm-tester[master]: fix sysmobts build: proper PKG_CONFIG_PATH
Review at https://gerrit.osmocom.org/2728 fix sysmobts build: proper PKG_CONFIG_PATH Change-Id: I94b706d664ba89b2ea999601ba67348973c3639c --- M contrib/jenkins-build-osmo-bts-sysmo.sh 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/28/2728/1 diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index f321b8c..d089eb7 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -44,6 +44,9 @@ prefix_real="$DESTDIR$prefix" mkdir -p "$prefix_real" +# Installation in non-system dir, but keep the PKG_CONFIG_PATH from the SDK: +export PKG_CONFIG_PATH="$prefix_real/lib/pkgconfig:$PKG_CONFIG_PATH" + for dep in $deps; do cd "$base/$dep" rm -rf * -- To view, visit https://gerrit.osmocom.org/2728 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94b706d664ba89b2ea999601ba67348973c3639c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: contrib/jenkins: cosmetic: add some spacing in log output
Review at https://gerrit.osmocom.org/2729 contrib/jenkins: cosmetic: add some spacing in log output Change-Id: Ie7238d8610f2be3e074f366861782e010d814e94 --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-bts-trx.sh M contrib/jenkins-build-osmo-nitb.sh 3 files changed, 30 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/29/2729/1 diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index d089eb7..0b8e5ba 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -34,7 +34,7 @@ . /opt/poky/1.5.4/environment-setup-armv5te-poky-linux-gnueabi # Cross-compilation: all installations need to be put in the sysmo SDK sysroot -export DESTDIR=/opt/poky/1.5.4/sysroots/armv5te-poky-linux-gnueabi +export DESTDIR="/opt/poky/1.5.4/sysroots/armv5te-poky-linux-gnueabi" prefix_base="/usr/local/jenkins-build" prefix_base_real="$DESTDIR$prefix_base" @@ -47,7 +47,15 @@ # Installation in non-system dir, but keep the PKG_CONFIG_PATH from the SDK: export PKG_CONFIG_PATH="$prefix_real/lib/pkgconfig:$PKG_CONFIG_PATH" +env + for dep in $deps; do + set +x; echo " + +== $dep + +"; set -x + cd "$base/$dep" rm -rf * git checkout . @@ -62,8 +70,11 @@ 'osmo-bts') config_opts="--enable-sysmocom-bts --with-openbsc=$base/openbsc/openbsc/include" ;; esac + set +x; echo; echo; set -x ./configure --prefix="$prefix" $CONFIGURE_FLAGS $config_opts + set +x; echo; echo; set -x make -j8 + set +x; echo; echo; set -x make install done diff --git a/contrib/jenkins-build-osmo-bts-trx.sh b/contrib/jenkins-build-osmo-bts-trx.sh index 652913f..301d4a0 100755 --- a/contrib/jenkins-build-osmo-bts-trx.sh +++ b/contrib/jenkins-build-osmo-bts-trx.sh @@ -38,6 +38,12 @@ export LD_LIBRARY_PATH="$prefix/lib" for dep in $deps; do + set +x; echo " + +== $dep + +"; set -x + have_repo "$dep" cd "$dep" rm -rf * @@ -54,8 +60,11 @@ 'osmo-trx') config_opts="--without-sse" ;; esac + set +x; echo; echo; set -x ./configure --prefix="$prefix" $config_opts + set +x; echo; echo; set -x make -j8 + set +x; echo; echo; set -x make install done diff --git a/contrib/jenkins-build-osmo-nitb.sh b/contrib/jenkins-build-osmo-nitb.sh index 6a2420b..af1815c 100755 --- a/contrib/jenkins-build-osmo-nitb.sh +++ b/contrib/jenkins-build-osmo-nitb.sh @@ -37,6 +37,12 @@ export LD_LIBRARY_PATH="$prefix/lib" for dep in $deps; do + set +x; echo " + +== $dep + +"; set -x + have_repo "$dep" cd "$dep" rm -rf * @@ -54,8 +60,11 @@ esac autoreconf -fi + set +x; echo; echo; set -x ./configure --prefix="$prefix" $config_opts + set +x; echo; echo; set -x make -j8 || make # libsmpp34 can't build in parallel + set +x; echo; echo; set -x make install done -- To view, visit https://gerrit.osmocom.org/2729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7238d8610f2be3e074f366861782e010d814e94 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
osmo-gsm-tester[master]: fix: contrib/jenkins sysmobts build: proper PKG_CONFIG_PATH
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2728 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94b706d664ba89b2ea999601ba67348973c3639c Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[PATCH] osmo-gsm-tester[master]: fix: contrib/jenkins sysmobts build: proper PKG_CONFIG_PATH
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2728 to look at the new patch set (#2). fix: contrib/jenkins sysmobts build: proper PKG_CONFIG_PATH Change-Id: I94b706d664ba89b2ea999601ba67348973c3639c --- M contrib/jenkins-build-osmo-bts-sysmo.sh 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/28/2728/2 diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index f321b8c..d089eb7 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -44,6 +44,9 @@ prefix_real="$DESTDIR$prefix" mkdir -p "$prefix_real" +# Installation in non-system dir, but keep the PKG_CONFIG_PATH from the SDK: +export PKG_CONFIG_PATH="$prefix_real/lib/pkgconfig:$PKG_CONFIG_PATH" + for dep in $deps; do cd "$base/$dep" rm -rf * -- To view, visit https://gerrit.osmocom.org/2728 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I94b706d664ba89b2ea999601ba67348973c3639c Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-gsm-tester[master]: fix: contrib/jenkins sysmobts build: proper PKG_CONFIG_PATH
Neels Hofmeyr has submitted this change and it was merged. Change subject: fix: contrib/jenkins sysmobts build: proper PKG_CONFIG_PATH .. fix: contrib/jenkins sysmobts build: proper PKG_CONFIG_PATH Change-Id: I94b706d664ba89b2ea999601ba67348973c3639c --- M contrib/jenkins-build-osmo-bts-sysmo.sh 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index f321b8c..d089eb7 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -44,6 +44,9 @@ prefix_real="$DESTDIR$prefix" mkdir -p "$prefix_real" +# Installation in non-system dir, but keep the PKG_CONFIG_PATH from the SDK: +export PKG_CONFIG_PATH="$prefix_real/lib/pkgconfig:$PKG_CONFIG_PATH" + for dep in $deps; do cd "$base/$dep" rm -rf * -- To view, visit https://gerrit.osmocom.org/2728 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94b706d664ba89b2ea999601ba67348973c3639c Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: fix osmo-bts-trx: add config: 'osmotrx tx-attenuation oml'
Review at https://gerrit.osmocom.org/2730 fix osmo-bts-trx: add config: 'osmotrx tx-attenuation oml' Before this, the network opened up by osmo-bts-trx would be invisible through the attenuation of the osmo-gsm-tester hardware, because tx-attenuation would apparently default to 50, meaning maximum attenuation. Change-Id: I1c026b5691033127eef766d82566c39cc070e14a --- M src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/30/2730/1 diff --git a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl index aaee223..628aefa 100644 --- a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl @@ -15,6 +15,7 @@ phy 0 instance 0 osmotrx rx-gain 25 + osmotrx tx-attenuation oml bts 0 band ${osmo_bts_trx.band} ipa unit-id ${osmo_bts_trx.ipa_unit_id} 0 -- To view, visit https://gerrit.osmocom.org/2730 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c026b5691033127eef766d82566c39cc070e14a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: contrib/jenkins: cosmetic: add some spacing in log output
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2729 to look at the new patch set (#2). contrib/jenkins: cosmetic: add some spacing in log output Change-Id: Ie7238d8610f2be3e074f366861782e010d814e94 --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-bts-trx.sh M contrib/jenkins-build-osmo-nitb.sh 3 files changed, 30 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/29/2729/2 diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index d089eb7..0b8e5ba 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -34,7 +34,7 @@ . /opt/poky/1.5.4/environment-setup-armv5te-poky-linux-gnueabi # Cross-compilation: all installations need to be put in the sysmo SDK sysroot -export DESTDIR=/opt/poky/1.5.4/sysroots/armv5te-poky-linux-gnueabi +export DESTDIR="/opt/poky/1.5.4/sysroots/armv5te-poky-linux-gnueabi" prefix_base="/usr/local/jenkins-build" prefix_base_real="$DESTDIR$prefix_base" @@ -47,7 +47,15 @@ # Installation in non-system dir, but keep the PKG_CONFIG_PATH from the SDK: export PKG_CONFIG_PATH="$prefix_real/lib/pkgconfig:$PKG_CONFIG_PATH" +env + for dep in $deps; do + set +x; echo " + +== $dep + +"; set -x + cd "$base/$dep" rm -rf * git checkout . @@ -62,8 +70,11 @@ 'osmo-bts') config_opts="--enable-sysmocom-bts --with-openbsc=$base/openbsc/openbsc/include" ;; esac + set +x; echo; echo; set -x ./configure --prefix="$prefix" $CONFIGURE_FLAGS $config_opts + set +x; echo; echo; set -x make -j8 + set +x; echo; echo; set -x make install done diff --git a/contrib/jenkins-build-osmo-bts-trx.sh b/contrib/jenkins-build-osmo-bts-trx.sh index 652913f..301d4a0 100755 --- a/contrib/jenkins-build-osmo-bts-trx.sh +++ b/contrib/jenkins-build-osmo-bts-trx.sh @@ -38,6 +38,12 @@ export LD_LIBRARY_PATH="$prefix/lib" for dep in $deps; do + set +x; echo " + +== $dep + +"; set -x + have_repo "$dep" cd "$dep" rm -rf * @@ -54,8 +60,11 @@ 'osmo-trx') config_opts="--without-sse" ;; esac + set +x; echo; echo; set -x ./configure --prefix="$prefix" $config_opts + set +x; echo; echo; set -x make -j8 + set +x; echo; echo; set -x make install done diff --git a/contrib/jenkins-build-osmo-nitb.sh b/contrib/jenkins-build-osmo-nitb.sh index 6a2420b..af1815c 100755 --- a/contrib/jenkins-build-osmo-nitb.sh +++ b/contrib/jenkins-build-osmo-nitb.sh @@ -37,6 +37,12 @@ export LD_LIBRARY_PATH="$prefix/lib" for dep in $deps; do + set +x; echo " + +== $dep + +"; set -x + have_repo "$dep" cd "$dep" rm -rf * @@ -54,8 +60,11 @@ esac autoreconf -fi + set +x; echo; echo; set -x ./configure --prefix="$prefix" $config_opts + set +x; echo; echo; set -x make -j8 || make # libsmpp34 can't build in parallel + set +x; echo; echo; set -x make install done -- To view, visit https://gerrit.osmocom.org/2729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie7238d8610f2be3e074f366861782e010d814e94 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder
[PATCH] osmo-gsm-tester[master]: log: change 'log_all_origins' from bool to a list of levels ...
Review at https://gerrit.osmocom.org/2731 log: change 'log_all_origins' from bool to a list of levels to apply to Change-Id: I0277782652548fa321f767da79b207d70678fad1 --- M src/osmo-gsm-tester.py M src/osmo_gsm_tester/log.py M src/osmo_gsm_tester/trial.py 3 files changed, 9 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/31/2731/1 diff --git a/src/osmo-gsm-tester.py b/src/osmo-gsm-tester.py index 9b7ae25..53a1dab 100755 --- a/src/osmo-gsm-tester.py +++ b/src/osmo-gsm-tester.py @@ -129,7 +129,7 @@ print('tests:', repr(args.test)) # create a default log to stdout -log.LogTarget().style(all_origins=False, src=False) +log.LogTarget().style(all_origins_on_levels=(log.L_ERR, log.L_TRACEBACK), src=False) if args.log_level: log.set_all_levels(log.LEVEL_STRS.get(args.log_level)) diff --git a/src/osmo_gsm_tester/log.py b/src/osmo_gsm_tester/log.py index 1c069e7..3af7bbe 100644 --- a/src/osmo_gsm_tester/log.py +++ b/src/osmo_gsm_tester/log.py @@ -61,7 +61,7 @@ do_log_category = None do_log_level = None do_log_origin = None -do_log_all_origins = None +do_log_all_origins_on_levels = None do_log_traceback = None do_log_src = None origin_width = None @@ -87,7 +87,7 @@ def remove(self): LogTarget.all_targets.remove(self) -def style(self, time=True, time_fmt=DATEFMT, category=True, level=True, origin=True, origin_width=32, src=True, trace=False, all_origins=True): +def style(self, time=True, time_fmt=DATEFMT, category=True, level=True, origin=True, origin_width=32, src=True, trace=False, all_origins_on_levels=(L_ERR, L_LOG, L_DBG, L_TRACEBACK)): ''' set all logging format aspects, to defaults if not passed: time: log timestamps; @@ -98,6 +98,7 @@ origin_width: fill up the origin string with whitespace to this witdh; src: log the source file and line number the log comes from; trace: on exceptions, log the full stack trace; +all_origins_on_levels: pass a tuple of logging levels that should have a full trace of origins ''' self.log_time_fmt = time_fmt self.do_log_time = bool(time) @@ -106,14 +107,14 @@ self.do_log_category = bool(category) self.do_log_level = bool(level) self.do_log_origin = bool(origin) -self.do_log_all_origins = bool(all_origins) self.origin_width = int(origin_width) self.origin_fmt = '{:>%ds}' % self.origin_width self.do_log_src = src self.do_log_traceback = trace +self.do_log_all_origins_on_levels = tuple(all_origins_on_levels or []) return self -def style_change(self, time=None, time_fmt=None, category=None, level=None, origin=None, origin_width=None, src=None, trace=None, all_origins=None): +def style_change(self, time=None, time_fmt=None, category=None, level=None, origin=None, origin_width=None, src=None, trace=None, all_origins_on_levels=None): 'modify only the given aspects of the logging format' self.style( time=(time if time is not None else self.do_log_time), @@ -124,7 +125,7 @@ origin_width=(origin_width if origin_width is not None else self.origin_width), src=(src if src is not None else self.do_log_src), trace=(trace if trace is not None else self.do_log_traceback), -all_origins=(all_origins if all_origins is not None else self.do_log_all_origins), +all_origins_on_levels=(all_origins_on_levels if all_origins_on_levels is not None else self.do_log_all_origins_on_levels), ) return self @@ -190,7 +191,7 @@ log_line = [compose_message(messages, named_items)] -if deeper_origins and self.do_log_all_origins: +if deeper_origins and (level in self.do_log_all_origins_on_levels): log_line.append(' [%s]' % deeper_origins) if self.do_log_src and src: diff --git a/src/osmo_gsm_tester/trial.py b/src/osmo_gsm_tester/trial.py index 3eb0c67..fba473f 100644 --- a/src/osmo_gsm_tester/trial.py +++ b/src/osmo_gsm_tester/trial.py @@ -77,7 +77,7 @@ .set_all_levels(log.L_DBG) .style_change(trace=True), log.FileLogTarget(run_dir.new_child(FILE_LOG_BRIEF)) - .style_change(src=False, all_origins=False) + .style_change(src=False, all_origins_on_levels=(log.L_ERR, log.L_TRACEBACK)) ] self.log('Trial start') self.log('Detailed log at', detailed_log) -- To view, visit https://gerrit.osmocom.org/2731 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0277782652548fa321f767da79b207d70678fad1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
osmo-gsm-tester[master]: ofono_client: Discover modem path from imsi
Patch Set 1: (1 comment) so far just a hint on the KeyError problem. In general I'm not following why this patch is so complex; need to take a look later and discuss with you... https://gerrit.osmocom.org/#/c/2696/1/src/osmo_gsm_tester/ofono_client.py File src/osmo_gsm_tester/ofono_client.py: Line 112: event_loop.wait(log_obj, modem_has_val_in_property, dbus_obj, I_MODEM, 'Interfaces', I_SIM) after news from OS#2233, it seems you need to add here: --- a/src/osmo_gsm_tester/ofono_client.py +++ b/src/osmo_gsm_tester/ofono_client.py @@ -110,6 +110,8 @@ def build_imsi_modem_map(log_obj, reserved): log_obj.dbg('modem %s has no sim feature, skipping' % modem_path) if has_sim_feature: event_loop.wait(log_obj, modem_has_val_in_property, dbus_obj, I_MODEM, 'Interfaces', I_SIM) +# refresh the DBus object to re-evaluate what interfaces are available +dbus_obj = systembus_get(modem_path) sim_prop = dbus_obj[I_SIM].GetProperties() imsi = sim_prop.get('SubscriberIdentity') if imsi: -- To view, visit https://gerrit.osmocom.org/2696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I602604d25f51b24d87877bc8ac798525b7be61dd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes
[PATCH] osmo-gsm-tester[master]: event_loop: Create a global event loop to poll and wait for ...
import subprocess import signal -from . import log, test +from . import log, test, event_loop from .util import Dir class Process(log.Origin): @@ -206,7 +206,7 @@ return self.result is not None def wait(self, timeout=300): -test.wait(self.terminated, timeout=timeout) +event_loop.wait(self, self.terminated, timeout=timeout) class RemoteProcess(Process): diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0664897..d55ee92 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,7 +22,7 @@ import time import copy import traceback -from . import config, log, template, util, resource, schema, ofono_client, osmo_nitb +from . import config, log, template, util, resource, schema, ofono_client, osmo_nitb, event_loop from . import test class Timeout(Exception): @@ -114,7 +114,7 @@ with self: self.status = Test.UNKNOWN self.start_timestamp = time.time() -test.setup(suite_run, self, ofono_client, sys.modules[__name__]) +test.setup(suite_run, self, ofono_client, sys.modules[__name__], event_loop) self.log('START') with self.redirect_stdout(): util.run_python_file('%s.%s' % (self.suite.name(), self.name()), @@ -225,6 +225,7 @@ self.log('Suite run start') try: self.mark_start() +event_loop.register_poll_func(self.poll) if not self.reserved_resources: self.reserve_resources() for test in self.definition.tests: @@ -243,6 +244,7 @@ # base exception is raised. Make sure to stop processes in this # finally section. Resources are automatically freed with 'atexit'. self.stop_processes() +event_loop.unregister_poll_func(self.poll) self.duration = time.time() - self.start_timestamp if self.test_failed_ctr: self.status = SuiteRun.FAIL @@ -287,32 +289,7 @@ self.log('using MSISDN', msisdn) return msisdn -def _wait(self, condition, condition_args, condition_kwargs, timeout, timestep): -if not timeout or timeout < 0: -raise RuntimeError('wait() *must* time out at some point. timeout=%r' % timeout) -if timestep < 0.1: -timestep = 0.1 - -started = time.time() -while True: -self.poll() -if condition(*condition_args, **condition_kwargs): -return True -waited = time.time() - started -if waited > timeout: -return False -time.sleep(timestep) - -def wait(self, condition, *condition_args, timeout=300, timestep=1, **condition_kwargs): -if not self._wait(condition, condition_args, condition_kwargs, timeout, timestep): -raise Timeout('Timeout expired') - -def sleep(self, seconds): -assert seconds > 0. -self._wait(lambda: False, [], {}, timeout=seconds, timestep=min(seconds, 1)) - def poll(self): -ofono_client.poll() if self._processes: for process in self._processes: if process.terminated(): diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/test.py index f584c92..e7ee232 100644 --- a/src/osmo_gsm_tester/test.py +++ b/src/osmo_gsm_tester/test.py @@ -28,14 +28,15 @@ dbg = None err = None wait = None +wait_no_raise = None sleep = None poll = None prompt = None Timeout = None Failure = None -def setup(suite_run, _test, ofono_client, suite_module): -global trial, suite, test, resources, log, dbg, err, wait, sleep, poll, prompt, Failure, Timeout +def setup(suite_run, _test, ofono_client, suite_module, event_module): +global trial, suite, test, resources, log, dbg, err, wait, wait_no_raise, sleep, poll, prompt, Failure, Timeout trial = suite_run.trial suite = suite_run test = _test @@ -43,9 +44,10 @@ log = test.log dbg = test.dbg err = test.err -wait = suite_run.wait -sleep = suite_run.sleep -poll = suite_run.poll +wait = lambda *args, **kwargs: event_module.wait(suite_run, *args, **kwargs) +wait_no_raise = lambda *args, **kwargs: event_module.wait_no_raise(suite_run, *args, **kwargs) +sleep = lambda *args, **kwargs: event_module.sleep(suite_run, *args, **kwargs) +poll = event_module.poll prompt = suite_run.prompt Failure = suite_module.Failure Timeout = suite_module.Timeout -- To view, visit https://gerrit.osmocom.org/2695 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iaa78bae0f053496377609b24a11ebaef3fd77598 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: fix: refresh dbus object when interfaces have changed
-if not self.has_interface(I_NETREG): -self.log('No %r interface, hoping that the modem connects by itself' % I_NETREG) -else: -self.log('Use of %r interface not implemented yet, hoping that the modem connects by itself' % I_NETREG) +event_loop.wait(self, self.dbus.has_interface, I_NETREG, I_SMS, timeout=10) def sms_send(self, to_msisdn, *tokens): +# shim: if the caller passed a modem object instead of an MSISDN string if hasattr(to_msisdn, 'msisdn'): to_msisdn = to_msisdn.msisdn +# and maybe we can tickle some more info out of it? + if hasattr(to_msisdn, 'name'): +tokens.append('to ' + to_msisdn.name()) sms = Sms(self.msisdn, to_msisdn, 'from ' + self.name(), *tokens) self.log('sending sms to MSISDN', to_msisdn, sms=sms) -if not self.has_interface(I_SMS): +if not self.dbus.has_interface(I_SMS): raise RuntimeError('Modem cannot send SMS, interface not active: %r' % I_SMS) -mm = self.dbus_obj()[I_SMS] +mm = self.dbus.interface(I_SMS) mm.SendMessage(to_msisdn, str(sms)) return sms -- To view, visit https://gerrit.osmocom.org/2733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia36b881c25976d7e69dbb587317dd139169ce3d9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
osmo-gsm-tester[master]: fix: refresh dbus object when interfaces have changed
Patch Set 1: Code-Review-1 (2 comments) argh some WIP code crept itself in here https://gerrit.osmocom.org/#/c/2733/1/src/osmo_gsm_tester/bts_sysmo.py File src/osmo_gsm_tester/bts_sysmo.py: Line 63: #self.run_remote('rm-remote-dir', ('test', '!', '-d', SysmoBts.REMOTE_DIR, '||', 'rm', '-rf', SysmoBts.REMOTE_DIR)) wip https://gerrit.osmocom.org/#/c/2733/1/src/osmo_gsm_tester/ofono_client.py File src/osmo_gsm_tester/ofono_client.py: Line 214: self.dbg(name, '==', is_val, ', is', val, '->', is_val is not None and is_val == val) wip -- To view, visit https://gerrit.osmocom.org/2733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia36b881c25976d7e69dbb587317dd139169ce3d9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes
osmo-gsm-tester[master]: ofono_client: Discover modem path from imsi
Patch Set 1: Code-Review-1 I'm starting to get why this needs to be complicated... :/ The modem path becomes a dynamic property of the modem resource, yet it is the single ofono handle that *defines* which resource is reserved. And we must only query unreserved modems' properties. I hate to say it, but it seems that it might not be worth it to add this amount of code just to not have to 'systemctl restart ofono'. At this moment it seems to me we should rather rely on the modem paths staying the same. I'll think about this some more though. -- To view, visit https://gerrit.osmocom.org/2696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I602604d25f51b24d87877bc8ac798525b7be61dd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-gsm-tester[master]: bts: add remote_addr() function
Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/2715/2/src/osmo_gsm_tester/bts_osmotrx.py File src/osmo_gsm_tester/bts_osmotrx.py: Line 47: return '127.0.0.1' > You can just do as in sysmobts, conf.get('addr') then set it to 127.0.0.1 the point is that this address should be reserved from the ip_address resource pool. ATM it is implicitly ending up to be this address, and it is not configured anywhere (i.e. does not appear in the osmo-bts-trx.cfg file). Adding it to the default config would only add an unused/misleading item. Adding the configuration properly isn't a lot of work, only that's not related to this patch and should happen separately. For the time being I need some address here. -- To view, visit https://gerrit.osmocom.org/2715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
osmo-gsm-tester[master]: MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP
Patch Set 2: (7 comments) thanks for the excellent review! https://gerrit.osmocom.org/#/c/2719/2/example/defaults.conf File example/defaults.conf: Line 14: short_name: osmo-gsm-tester-msc > Shall both msc and bsc have a short_name and long_name? I'm not sure at all :P -- I haven't configured osmo-bsc at all before, and am completely oblivious about which parts should go to the BSC and which to the MSC config... so far I'm just duplicating, hopefully to shrink up later. https://gerrit.osmocom.org/#/c/2719/2/src/osmo_gsm_tester/osmo_bsc.py File src/osmo_gsm_tester/osmo_bsc.py: Line 25: class OsmoBsc(log.Origin): > Now that we have the BTS talking with the same API to both the OsmoNitb and yes. Technically, the same goes for the BTS code. So far I went with 'Polymorphism is highly overrated' and kept each implementation on its own. I am not a fan of duplicating code at all, so unifying some bits is probably a good idea. My excuse so far is I wanted to see what it ends up to be and then identify the common bits. Line 35: self.eth_iface = eth_iface > So the conclusion finally was to leave it as eth_iface? I thought we conclu wait a minute, I changed it to ip_address!?? I'll fix, thx https://gerrit.osmocom.org/#/c/2719/2/src/osmo_gsm_tester/osmo_hlr.py File src/osmo_gsm_tester/osmo_hlr.py: Line 84: self.dbg(conf=values) > You may want to add: 'HLR CONFIG:\n' + whoa, I thought I had, thx Line 107: self.run_local(name, ('/bin/sh', '-c', 'sqlite3 %r < %r' % (self.db_file, sql_file))) > You need to add sqlite3 to the dependecies in the README file. thx https://gerrit.osmocom.org/#/c/2719/2/src/osmo_gsm_tester/osmo_msc.py File src/osmo_gsm_tester/osmo_msc.py: Line 115: var = 'subscriber-list-active-v1' > This line can be removed the mixup of copying code before applying patches :) https://gerrit.osmocom.org/#/c/2719/2/src/osmo_gsm_tester/templates/osmo-hlr.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-hlr.cfg.tmpl: Line 8 > There's no specific hlr section? now that I think of it, this should contain the ctrl and vty bind addresses! But nope, nothing to be configured for the HLR yet. -- To view, visit https://gerrit.osmocom.org/2719 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5842e8f1cba8e8e6bedfc08540efcafe207159cb Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
[PATCH] osmo-gsm-tester[master]: default-suites.conf: run aoip
Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2721 to look at the new patch set (#3). default-suites.conf: run aoip Change-Id: I0f7d6feec5062c2aaf07eb9a7f543a4a84cb1ff7 --- M example/default-suites.conf 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/21/2721/3 diff --git a/example/default-suites.conf b/example/default-suites.conf index 601076a..e6ebcc1 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -1 +1,2 @@ - sms:sysmo +- aoip_sms:sysmo -- To view, visit https://gerrit.osmocom.org/2721 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0f7d6feec5062c2aaf07eb9a7f543a4a84cb1ff7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol
[PATCH] osmo-gsm-tester[master]: MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP
Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2719 to look at the new patch set (#3). MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP Change-Id: I5842e8f1cba8e8e6bedfc08540efcafe207159cb --- M doc/README.txt M example/defaults.conf A src/osmo_gsm_tester/osmo_bsc.py A src/osmo_gsm_tester/osmo_hlr.py A src/osmo_gsm_tester/osmo_mgcpgw.py A src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-hlr.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-mgcpgw.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl 11 files changed, 641 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/19/2719/3 diff --git a/doc/README.txt b/doc/README.txt index 80bbad8..c00cd3e 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -17,6 +17,7 @@ apt-get install \ dbus \ tcpdump \ + sqlite3 \ python3 \ python3-yaml \ python3-mako \ diff --git a/example/defaults.conf b/example/defaults.conf index b1e26f0..95bd172 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -2,8 +2,26 @@ net: mcc: 901 mnc: 70 -short_name: osmo-gsm-tester -long_name: osmo-gsm-tester +short_name: osmo-gsm-tester-nitb +long_name: osmo-gsm-tester-nitb +auth_policy: closed +encryption: a5 0 + +bsc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc +auth_policy: closed +encryption: a5 0 + +msc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc auth_policy: closed encryption: a5 0 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py new file mode 100644 index 000..d7f9f87 --- /dev/null +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -0,0 +1,102 @@ +# osmo_gsm_tester: specifics for running an osmo-bsc +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoBsc(log.Origin): +suite_run = None +ip_address = None +run_dir = None +config_file = None +process = None +bts = None + +def __init__(self, suite_run, msc, ip_address): +self.suite_run = suite_run +self.ip_address = ip_address +self.set_log_category(log.C_RUN) +self.set_name('osmo-bsc_%s' % ip_address.get('addr')) +self.bts = [] +self.msc = msc + +def start(self): +self.log('Starting osmo-bsc') +self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) +self.configure() + +# NOTE: While OsmoMSC and OsmoBSC live in the same git repository, the +# osmo-msc build will also provide the OsmoBSC binary. As soon as the +# repositories are separate, there shall be a separate artifact. +inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-msc'))) + +binary = inst.child('bin', 'osmo-bsc') +if not os.path.isfile(binary): +raise RuntimeError('Binary missing: %r' % binary) +lib = inst.child('lib') +if not os.path.isdir(lib): +raise RuntimeError('No lib/ in %r' % inst) + +iface = util.ip_to_iface(self.addr()) +pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) + +env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + +self.dbg(run_dir=self.run_dir, binary=binary, env=env) +self.process = process.Process(self.name(), self.run_dir, + (binary, '-c', +os.path.abspath(self.config_file)), + env=env) +self.suite_run.remember_to_stop(self.process) +self.process.launch() + +def configure(self): +self.config_file
[PATCH] osmo-gsm-tester[master]: fix: refresh dbus object when interfaces have changed
) -self.dbus_obj()[iface].SetProperty(name, Variant('b', val)) - -event_loop.wait(self, self.property_is, name, bool_val) - -def property_is(self, name, val): -is_val = self.properties().get(name) -self.dbg(name, '==', is_val) -return is_val is not None and is_val == val - -def set_powered(self, on=True): -self._dbus_set_bool('Powered', on) - -def set_online(self, on=True): -self._dbus_set_bool('Online', on) - -def dbus_obj(self): -if self._dbus_obj is not None: -return self._dbus_obj -self._dbus_obj = systembus_get(self.path) -dbus_connect(self._dbus_obj.PropertyChanged, self._on_property_change) -self._on_interfaces_change(self.properties().get('Interfaces')) -return self._dbus_obj - -def properties(self, iface=I_MODEM): -return self.dbus_obj()[iface].GetProperties() - -def _on_property_change(self, name, value): -if name == 'Interfaces': -self._on_interfaces_change(value) - -def _on_interfaces_change(self, interfaces_now): -now = set(interfaces_now) -additions = now - self._interfaces -removals = self._interfaces - now -self._interfaces = now -for iface in removals: -self._on_interface_disabled(iface) -for iface in additions: -self._on_interface_enabled(iface) - -def _disconnect(self, interface_name): -subscriptions = self._connected_signals.pop(interface_name, []) -if subscriptions: -self.dbg('Disconnecting', len(subscriptions), 'signals from', interface_name) -for subscription in subscriptions: -subscription.disconnect() - -def _on_interface_enabled(self, interface_name): -self.dbg('Interface enabled:', interface_name) - -all_wanted_conns = { -I_SMS: ( ('IncomingMessage', self._on_incoming_message), ), -} - -want = all_wanted_conns.get(interface_name) -if not want: -return - -# sanity -self._disconnect(interface_name) - -self.dbg('Connecting', len(want), 'signals to', interface_name) -for signal, cb in want: -dbus_iface = getattr(self.dbus_obj()[interface_name], signal) -self._connected_signals.add(interface_name, dbus_connect(dbus_iface, cb)) - -def _on_interface_disabled(self, interface_name): -self.dbg('Interface disabled:', interface_name) -self._disconnect(interface_name) - -def has_interface(self, name): -return name in self._interfaces - def connect(self, nitb): 'set the modem up to connect to MCC+MNC from NITB config' self.log('connect to', nitb) -prepowered = self.properties().get('Powered') -if prepowered is not None and prepowered: +if self.is_powered(): +self.dbg('is powered') self.set_online(False) self.set_powered(False) +event_loop.wait(self, lambda: not self.dbus.has_interface(I_NETREG, I_SMS), timeout=10) self.set_powered() self.set_online() -if not self.has_interface(I_NETREG): -self.log('No %r interface, hoping that the modem connects by itself' % I_NETREG) -else: -self.log('Use of %r interface not implemented yet, hoping that the modem connects by itself' % I_NETREG) +event_loop.wait(self, self.dbus.has_interface, I_NETREG, I_SMS, timeout=10) def sms_send(self, to_msisdn, *tokens): +# shim: if the caller passed a modem object instead of an MSISDN string if hasattr(to_msisdn, 'msisdn'): to_msisdn = to_msisdn.msisdn +# and maybe we can tickle some more info out of it? +if hasattr(to_msisdn, 'name'): +tokens.append('to ' + to_msisdn.name()) sms = Sms(self.msisdn, to_msisdn, 'from ' + self.name(), *tokens) self.log('sending sms to MSISDN', to_msisdn, sms=sms) -if not self.has_interface(I_SMS): +if not self.dbus.has_interface(I_SMS): raise RuntimeError('Modem cannot send SMS, interface not active: %r' % I_SMS) -mm = self.dbus_obj()[I_SMS] +mm = self.dbus.interface(I_SMS) mm.SendMessage(to_msisdn, str(sms)) return sms -- To view, visit https://gerrit.osmocom.org/2733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia36b881c25976d7e69dbb587317dd139169ce3d9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: fix: refresh dbus object when interfaces have changed
) -self.dbus_obj()[iface].SetProperty(name, Variant('b', val)) - -event_loop.wait(self, self.property_is, name, bool_val) - -def property_is(self, name, val): -is_val = self.properties().get(name) -self.dbg(name, '==', is_val) -return is_val is not None and is_val == val - -def set_powered(self, on=True): -self._dbus_set_bool('Powered', on) - -def set_online(self, on=True): -self._dbus_set_bool('Online', on) - -def dbus_obj(self): -if self._dbus_obj is not None: -return self._dbus_obj -self._dbus_obj = systembus_get(self.path) -dbus_connect(self._dbus_obj.PropertyChanged, self._on_property_change) -self._on_interfaces_change(self.properties().get('Interfaces')) -return self._dbus_obj - -def properties(self, iface=I_MODEM): -return self.dbus_obj()[iface].GetProperties() - -def _on_property_change(self, name, value): -if name == 'Interfaces': -self._on_interfaces_change(value) - -def _on_interfaces_change(self, interfaces_now): -now = set(interfaces_now) -additions = now - self._interfaces -removals = self._interfaces - now -self._interfaces = now -for iface in removals: -self._on_interface_disabled(iface) -for iface in additions: -self._on_interface_enabled(iface) - -def _disconnect(self, interface_name): -subscriptions = self._connected_signals.pop(interface_name, []) -if subscriptions: -self.dbg('Disconnecting', len(subscriptions), 'signals from', interface_name) -for subscription in subscriptions: -subscription.disconnect() - -def _on_interface_enabled(self, interface_name): -self.dbg('Interface enabled:', interface_name) - -all_wanted_conns = { -I_SMS: ( ('IncomingMessage', self._on_incoming_message), ), -} - -want = all_wanted_conns.get(interface_name) -if not want: -return - -# sanity -self._disconnect(interface_name) - -self.dbg('Connecting', len(want), 'signals to', interface_name) -for signal, cb in want: -dbus_iface = getattr(self.dbus_obj()[interface_name], signal) -self._connected_signals.add(interface_name, dbus_connect(dbus_iface, cb)) - -def _on_interface_disabled(self, interface_name): -self.dbg('Interface disabled:', interface_name) -self._disconnect(interface_name) - -def has_interface(self, name): -return name in self._interfaces - def connect(self, nitb): 'set the modem up to connect to MCC+MNC from NITB config' self.log('connect to', nitb) -prepowered = self.properties().get('Powered') -if prepowered is not None and prepowered: +if self.is_powered(): +self.dbg('is powered') self.set_online(False) self.set_powered(False) +event_loop.wait(self, lambda: not self.dbus.has_interface(I_NETREG, I_SMS), timeout=10) self.set_powered() self.set_online() -if not self.has_interface(I_NETREG): -self.log('No %r interface, hoping that the modem connects by itself' % I_NETREG) -else: -self.log('Use of %r interface not implemented yet, hoping that the modem connects by itself' % I_NETREG) +event_loop.wait(self, self.dbus.has_interface, I_NETREG, I_SMS, timeout=10) def sms_send(self, to_msisdn, *tokens): if hasattr(to_msisdn, 'msisdn'): to_msisdn = to_msisdn.msisdn sms = Sms(self.msisdn, to_msisdn, 'from ' + self.name(), *tokens) self.log('sending sms to MSISDN', to_msisdn, sms=sms) -if not self.has_interface(I_SMS): +if not self.dbus.has_interface(I_SMS): raise RuntimeError('Modem cannot send SMS, interface not active: %r' % I_SMS) -mm = self.dbus_obj()[I_SMS] +mm = self.dbus.interface(I_SMS) mm.SendMessage(to_msisdn, str(sms)) return sms -- To view, visit https://gerrit.osmocom.org/2733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia36b881c25976d7e69dbb587317dd139169ce3d9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: cosmetic: comment and SMS token tweak
Review at https://gerrit.osmocom.org/2734 cosmetic: comment and SMS token tweak Change-Id: I66b8f30303e21ad781d16f3aa9fe30067d6a0e20 --- M src/osmo_gsm_tester/ofono_client.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/34/2734/1 diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/ofono_client.py index ee93a6e..4239b68 100644 --- a/src/osmo_gsm_tester/ofono_client.py +++ b/src/osmo_gsm_tester/ofono_client.py @@ -295,8 +295,12 @@ event_loop.wait(self, self.dbus.has_interface, I_NETREG, I_SMS, timeout=10) def sms_send(self, to_msisdn, *tokens): +# shim: if the caller passed a modem object instead of an MSISDN string if hasattr(to_msisdn, 'msisdn'): to_msisdn = to_msisdn.msisdn +# and maybe we can tickle some more info out of it? +if hasattr(to_msisdn, 'name'): +tokens.append('to ' + to_msisdn.name()) sms = Sms(self.msisdn, to_msisdn, 'from ' + self.name(), *tokens) self.log('sending sms to MSISDN', to_msisdn, sms=sms) if not self.dbus.has_interface(I_SMS): -- To view, visit https://gerrit.osmocom.org/2734 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66b8f30303e21ad781d16f3aa9fe30067d6a0e20 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: MSC+BSC: add separate suites for AoIP: aoip_sms, aoip_debug
Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2720 to look at the new patch set (#4). MSC+BSC: add separate suites for AoIP: aoip_sms, aoip_debug It would be nicer to select the network programs as scenarios, i.e. independently from the specifics of tests that don't care whether a NITB or a MSC+BSC is in place. See OS#2270. For now have a separate script for BSC+MSC+HLR operation to be able to rapidly get the binaries to work. We might even simply drop the NITB style, in which case we don't need to make it configurable. Change-Id: I06d2529822f3e483ce7fffc439edfa57844e01ef --- A suites/aoip_debug/interactive.py A suites/aoip_debug/suite.conf A suites/aoip_sms/mo_mt_sms.py A suites/aoip_sms/suite.conf 4 files changed, 86 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/20/2720/4 diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py new file mode 100755 index 000..4f56d5c --- /dev/null +++ b/suites/aoip_debug/interactive.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +modems = suite.modems(int(prompt('How many modems?'))) + +hlr.start() +msc.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +for m in modems: + hlr.subscriber_add(m) + m.connect(bsc) + +while True: + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered') + cmd = cmd.strip().lower() + + if not cmd: +continue + if 'quit'.startswith(cmd): +break + elif 'wait-registered'.startswith(cmd): +try: + wait(msc.subscriber_attached, *modems) +except Timeout: + print('Timeout while waiting for registration.') + elif 'get-registered'.startswith(cmd): +print(msc.imsi_list_attached()) +print('RESULT: %s' % + ('All modems are registered.' if msc.subscriber_attached(*modems) +else 'Some modem(s) not registered yet.')) + elif 'sms'.startswith(cmd): +for mo in modems: + for mt in modems: +mo.sms_send(mt.msisdn, 'to ' + mt.name()) diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf new file mode 100644 index 000..48c76b6 --- /dev/null +++ b/suites/aoip_debug/suite.conf @@ -0,0 +1,7 @@ +resources: + ip_address: + - times: 4 + bts: + - times: 1 + modem: + - times: 4 diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py new file mode 100755 index 000..96e1caf --- /dev/null +++ b/suites/aoip_sms/mo_mt_sms.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +ms_mo = suite.modem() +ms_mt = suite.modem() + +hlr.start() +msc.start() +mgcpgw.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +hlr.subscriber_add(ms_mo) +hlr.subscriber_add(ms_mt) + +ms_mo.connect(bsc) +ms_mt.connect(bsc) +wait(msc.subscriber_attached, ms_mo, ms_mt) + +sms = ms_mo.sms_send(ms_mt.msisdn) +wait(ms_mt.sms_was_received, sms) diff --git a/suites/aoip_sms/suite.conf b/suites/aoip_sms/suite.conf new file mode 100644 index 000..c6cbd88 --- /dev/null +++ b/suites/aoip_sms/suite.conf @@ -0,0 +1,7 @@ +resources: + ip_address: + - times: 4 + bts: + - times: 1 + modem: + - times: 2 -- To view, visit https://gerrit.osmocom.org/2720 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I06d2529822f3e483ce7fffc439edfa57844e01ef Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol
[PATCH] osmo-gsm-tester[master]: MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP
Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2719 to look at the new patch set (#4). MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP Change-Id: I5842e8f1cba8e8e6bedfc08540efcafe207159cb --- M doc/README.txt M example/defaults.conf A src/osmo_gsm_tester/osmo_bsc.py A src/osmo_gsm_tester/osmo_hlr.py A src/osmo_gsm_tester/osmo_mgcpgw.py A src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-hlr.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-mgcpgw.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl 11 files changed, 642 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/19/2719/4 diff --git a/doc/README.txt b/doc/README.txt index 80bbad8..c00cd3e 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -17,6 +17,7 @@ apt-get install \ dbus \ tcpdump \ + sqlite3 \ python3 \ python3-yaml \ python3-mako \ diff --git a/example/defaults.conf b/example/defaults.conf index b1e26f0..95bd172 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -2,8 +2,26 @@ net: mcc: 901 mnc: 70 -short_name: osmo-gsm-tester -long_name: osmo-gsm-tester +short_name: osmo-gsm-tester-nitb +long_name: osmo-gsm-tester-nitb +auth_policy: closed +encryption: a5 0 + +bsc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc +auth_policy: closed +encryption: a5 0 + +msc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc auth_policy: closed encryption: a5 0 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py new file mode 100644 index 000..d7f9f87 --- /dev/null +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -0,0 +1,102 @@ +# osmo_gsm_tester: specifics for running an osmo-bsc +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoBsc(log.Origin): +suite_run = None +ip_address = None +run_dir = None +config_file = None +process = None +bts = None + +def __init__(self, suite_run, msc, ip_address): +self.suite_run = suite_run +self.ip_address = ip_address +self.set_log_category(log.C_RUN) +self.set_name('osmo-bsc_%s' % ip_address.get('addr')) +self.bts = [] +self.msc = msc + +def start(self): +self.log('Starting osmo-bsc') +self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) +self.configure() + +# NOTE: While OsmoMSC and OsmoBSC live in the same git repository, the +# osmo-msc build will also provide the OsmoBSC binary. As soon as the +# repositories are separate, there shall be a separate artifact. +inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-msc'))) + +binary = inst.child('bin', 'osmo-bsc') +if not os.path.isfile(binary): +raise RuntimeError('Binary missing: %r' % binary) +lib = inst.child('lib') +if not os.path.isdir(lib): +raise RuntimeError('No lib/ in %r' % inst) + +iface = util.ip_to_iface(self.addr()) +pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) + +env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + +self.dbg(run_dir=self.run_dir, binary=binary, env=env) +self.process = process.Process(self.name(), self.run_dir, + (binary, '-c', +os.path.abspath(self.config_file)), + env=env) +self.suite_run.remember_to_stop(self.process) +self.process.launch() + +def configure(self): +self.config_file
osmo-gsm-tester[master]: default-suites.conf: run aoip
Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/2721/2/example/default-suites.conf File example/default-suites.conf: Line 1: - aoip_sms:sysmo > I'd rather run both, this way we also know if something was broken in one o ah yes, that was just the branch status -- To view, visit https://gerrit.osmocom.org/2721 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f7d6feec5062c2aaf07eb9a7f543a4a84cb1ff7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
[PATCH] osmo-gsm-tester[master]: bts: add remote_addr() function
Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2715 to look at the new patch set (#4). bts: add remote_addr() function To start an MGCPGW, we so far need the BTS address in advance (should get fixed at some point, but so far we do). The sysmoBTS has a fixed IP address configured. The osmo-bts-trx so far always uses 127.0.0.1, which is not configured but implicit due to lack of config (should also be fixed at some point). Both now return their address with the remote_addr() function. For osmo-bts-trx, just return the implicit address until there is a config item for it. This also replaces a SysmoBts.remote_addr member variable (which is not sufficient because it is only populated during configure()). Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b --- M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py 2 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/15/2715/4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 9533c68..5d60074 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -42,6 +42,10 @@ self.set_log_category(log.C_RUN) self.env = {} +def remote_addr(self): +# FIXME +return '127.0.0.1' + def start(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 5cc304f..2da0396 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -26,7 +26,6 @@ bsc = None run_dir = None inst = None -remote_addr = None remote_inst = None remote_env = None remote_dir = None @@ -64,14 +63,14 @@ self.run_remote('rm-remote-dir', ('test', '!', '-d', SysmoBts.REMOTE_DIR, '||', 'rm', '-rf', SysmoBts.REMOTE_DIR)) self.run_remote('mk-remote-dir', ('mkdir', '-p', SysmoBts.REMOTE_DIR)) self.run_local('scp-inst-to-sysmobts', -('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.remote_addr, str(self.remote_inst +('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.remote_addr(), str(self.remote_inst remote_run_dir = self.remote_dir.child(SysmoBts.BTS_SYSMO_BIN) self.run_remote('mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) remote_config_file = self.remote_dir.child(SysmoBts.BTS_SYSMO_CFG) self.run_local('scp-cfg-to-sysmobts', -('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.remote_addr, remote_config_file))) +('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.remote_addr(), remote_config_file))) self.run_remote('reload-dsp-firmware', ('/bin/sh', '-c', '"cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0"')) @@ -85,7 +84,7 @@ def _process_remote(self, name, popen_args, remote_cwd=None): run_dir = self.run_dir.new_dir(name) -return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr, remote_cwd, +return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, popen_args) def run_remote(self, name, popen_args, remote_cwd=None): @@ -108,11 +107,12 @@ if proc.result != 0: proc.raise_exn('Exited in error') +def remote_addr(self): +return self.conf.get('addr') + def configure(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') - -self.remote_addr = self.conf.get('addr') self.config_file = self.run_dir.new_file(SysmoBts.BTS_SYSMO_CFG) self.dbg(config_file=self.config_file) -- To view, visit https://gerrit.osmocom.org/2715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[PATCH] osmo-gsm-tester[master]: log: change 'log_all_origins' from bool to a list of levels ...
.osmocom.org/2731 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0277782652548fa321f767da79b207d70678fad1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder
osmo-gsm-tester[master]: contrib/jenkins: don't package /share/doc/libosmocore
Patch Set 2: > --disable-doc I wish, but it does not exist AFAICT. Let's add that and then drop this again. -- To view, visit https://gerrit.osmocom.org/2701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd2674c3f65f820a72d77c40a9e9df3e094bb41d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-gsm-tester[master]: contrib/jenkins: don't package /share/doc/libosmocore
Patch Set 2: (but for now let's apply this patch to not have to copy N times the amount of data as artifacts around) -- To view, visit https://gerrit.osmocom.org/2701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd2674c3f65f820a72d77c40a9e9df3e094bb41d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] osmo-gsm-tester[master]: contrib/jenkins: don't package /share/doc/libosmocore
Neels Hofmeyr has submitted this change and it was merged. Change subject: contrib/jenkins: don't package /share/doc/libosmocore .. contrib/jenkins: don't package /share/doc/libosmocore Change-Id: Ibd2674c3f65f820a72d77c40a9e9df3e094bb41d --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-bts-trx.sh M contrib/jenkins-build-osmo-nitb.sh 3 files changed, 12 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index d089eb7..3fb5c0b 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -67,6 +67,10 @@ make install done +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix_real/share/doc/libosmocore" + # build the archive that is going to be copied to the tester and then to the BTS rm "$base"/*.tgz "$base"/*.md5 || true cd "$prefix_real" diff --git a/contrib/jenkins-build-osmo-bts-trx.sh b/contrib/jenkins-build-osmo-bts-trx.sh index 652913f..b408852 100755 --- a/contrib/jenkins-build-osmo-bts-trx.sh +++ b/contrib/jenkins-build-osmo-bts-trx.sh @@ -59,6 +59,10 @@ make install done +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix/share/doc/libosmocore" + # build the archive that is going to be copied to the tester rm "$base"/*.tgz "$base"/*.md5 || true cd "$prefix" diff --git a/contrib/jenkins-build-osmo-nitb.sh b/contrib/jenkins-build-osmo-nitb.sh index 6a2420b..e4e4e32 100755 --- a/contrib/jenkins-build-osmo-nitb.sh +++ b/contrib/jenkins-build-osmo-nitb.sh @@ -59,6 +59,10 @@ make install done +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix/share/doc/libosmocore" + # build the archive that is going to be copied to the tester rm "$base"/*.tgz "$base"/*.md5 || true cd "$prefix" -- To view, visit https://gerrit.osmocom.org/2701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd2674c3f65f820a72d77c40a9e9df3e094bb41d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: osmo_nitb.py: remove unused imports
Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo_nitb.py: remove unused imports .. osmo_nitb.py: remove unused imports Change-Id: I55c118c6b277a2c8cddc251e3d36571b12504266 --- M src/osmo_gsm_tester/osmo_nitb.py 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 07a3623..2515354 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -18,9 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import os -import random import re -import socket from . import log, util, config, template, process, osmo_ctrl, pcap_recorder -- To view, visit https://gerrit.osmocom.org/2702 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55c118c6b277a2c8cddc251e3d36571b12504266 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
osmo-gsm-tester[master]: contrib/jenkins: don't package /share/doc/libosmocore
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd2674c3f65f820a72d77c40a9e9df3e094bb41d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] osmo-gsm-tester[master]: resources.conf: remove unused example BTS
Neels Hofmeyr has submitted this change and it was merged. Change subject: resources.conf: remove unused example BTS .. resources.conf: remove unused example BTS Change-Id: I370789a4dc048cf71c1951f2eb70bfec261583a2 --- M example/resources.conf 1 file changed, 0 insertions(+), 17 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index cd0216e..4cc06d0 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -12,28 +12,11 @@ addr: 10.42.42.114 band: GSM-1800 -- label: octBTS 3000 - type: osmo-bts-octphy - ipa_unit_id: 5 - addr: 10.42.42.115 - band: GSM-1800 - trx_list: - - hw_addr: 00:0c:90:32:b5:8a -net_device: eth0.2342 - - label: Ettus B210 type: osmo-bts-trx ipa_unit_id: 6 addr: 10.42.42.116 band: GSM-1800 - -- label: nanoBTS 1900 - type: nanobts - ipa_unit_id: 1902 - addr: 10.42.42.190 - band: GSM-1900 - trx_list: - - hw_addr: 00:02:95:00:41:b3 arfcn: - arfcn: 512 -- To view, visit https://gerrit.osmocom.org/2704 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I370789a4dc048cf71c1951f2eb70bfec261583a2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: remove bts_ocpthy.py
Neels Hofmeyr has submitted this change and it was merged. Change subject: remove bts_ocpthy.py .. remove bts_ocpthy.py We're not currently paying attention to the octphy in osmo-gsm-tester. So instead of maintaining dead code, remove the bts_octphy.py; we can re-add when the octphy is implemented properly. Change-Id: Ia5d5750d440ae7019634b51fa1efe7bbb2a1d1e2 --- D src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/resource.py D src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl 3 files changed, 4 insertions(+), 148 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py deleted file mode 100644 index f5eb8f7..000 --- a/src/osmo_gsm_tester/bts_octphy.py +++ /dev/null @@ -1,98 +0,0 @@ -# osmo_gsm_tester: specifics for running an osmo-bts-octphy -# -# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH -# -# Author: Neels Hofmeyr -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -import os -from . import log, config, util, template, process - -class OsmoBtsOctphy(log.Origin): -suite_run = None -nitb = None -run_dir = None -inst = None -env = None - -BIN_BTS_OCTPHY = 'osmo-bts-octphy' -CONF_BTS_OCTPHY = 'osmo-bts-octphy.cfg' - -def __init__(self, suite_run, conf): -self.suite_run = suite_run -self.conf = conf -self.set_name(OsmoBtsOctphy.BIN_BTS_OCTPHY) -self.set_log_category(log.C_RUN) -self.env = {} - -def start(self): -if self.nitb is None: -raise RuntimeError('BTS needs to be added to a NITB before it can be started') -self.suite_run.poll() - -self.log('Starting to connect to', self.nitb) -self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) -self.configure() - -self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst(OsmoBtsOctphy.BIN_BTS_OCTPHY))) -lib = self.inst.child('lib') -if not os.path.isdir(lib): -raise RuntimeError('No lib/ in %r' % self.inst) -self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } - -self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', -'-c', os.path.abspath(self.config_file), -'-i', self.nitb.addr()) -self.suite_run.poll() - -def launch_process(self, binary_name, *args): -binary = os.path.abspath(self.inst.child('bin', binary_name)) -run_dir = self.run_dir.new_dir(binary_name) -if not os.path.isfile(binary): -raise RuntimeError('Binary missing: %r' % binary) -proc = process.Process(binary_name, run_dir, - (binary,) + args, - env=self.env) -self.suite_run.remember_to_stop(proc) -proc.launch() - -def configure(self): -if self.nitb is None: -raise RuntimeError('BTS needs to be added to a NITB before it can be configured') -self.config_file = self.run_dir.new_file(OsmoBtsOctphy.CONF_BTS_OCTPHY) -self.dbg(config_file=self.config_file) - -values = dict(osmo_bts_octphy=config.get_defaults('osmo_bts_octphy')) -config.overlay(values, self.suite_run.config()) -config.overlay(values, dict(osmo_bts_octphy=dict(oml_remote_ip=self.nitb.addr( -config.overlay(values, dict(osmo_bts_octphy=self.conf)) -self.dbg(conf=values) - -with open(self.config_file, 'w') as f: -r = template.render(OsmoBtsOctphy.CONF_BTS_OCTPHY, values) -self.dbg(r) -f.write(r) - -def conf_for_nitb(self): -values = config.get_defaults('nitb_bts') -config.overlay(values, config.get_defaults('osmo_bts_octphy')) -config.overlay(values, self.conf) -self.dbg(conf=values) -return values - -def set_nitb(self, nitb): -self.nitb = nitb - -# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resour
osmo-gsm-tester[master]: resource error logging that is easier to understand
Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/2705/1/src/osmo_gsm_tester/resource.py File src/osmo_gsm_tester/resource.py: Line 500: def counts(self): > Do we need this? doesn't seem to be used, but OK with keeping it if it can I thought I was using it somewhere... https://gerrit.osmocom.org/#/c/2705/2/src/osmo_gsm_tester/suite.py File src/osmo_gsm_tester/suite.py: Line 346: 'RESERVED COUNT:', pprint.pformat(self.reserved_resources.counts()), ah yes, using it here. -- To view, visit https://gerrit.osmocom.org/2705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
osmo-gsm-tester[master]: nitb config: set: logging color 1, category 1
Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/2706/2/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl: Line 6: logging color 1 does it? -- To view, visit https://gerrit.osmocom.org/2706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icd9022f5732caac65d16fc49f2ed7833199523de Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
osmo-gsm-tester[master]: nitb config: set: logging color 1, category 1
Patch Set 2: ah, you meant the one in template_test/ ... it appears that this file is not used and orphaned? maybe that needs a separate fix. -- To view, visit https://gerrit.osmocom.org/2706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icd9022f5732caac65d16fc49f2ed7833199523de Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-gsm-tester[master]: rename resource nitb_iface to ip_address
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/2712/1//COMMIT_MSG Commit Message: Line 20: type: loopback > Do we really need the type? Cannot we just infer it is a loopback addr by a the question is if we want to reserve a loopback address, how do we indicate that. (But we really don't need to discuss it in a patch review, this commit log is merely trying to illustrate what possibilites should remain open, but I worded it too much like a definition of what will come.) -- To view, visit https://gerrit.osmocom.org/2712 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3ad583ae7a33f7a7bb56fe78a125f73c56a0e860 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
[PATCH] osmo-gsm-tester[master]: default suites: enable osmo-bts-trx
Review at https://gerrit.osmocom.org/2735 default suites: enable osmo-bts-trx Change-Id: I5dce732ed21f34988aa014add4d2d611dd0c44fc --- M example/default-suites.conf 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/35/2735/1 diff --git a/example/default-suites.conf b/example/default-suites.conf index 601076a..de242df 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -1 +1,2 @@ - sms:sysmo +- sms:trx -- To view, visit https://gerrit.osmocom.org/2735 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5dce732ed21f34988aa014add4d2d611dd0c44fc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
osmo-gsm-manuals[master]: OsmoGSMTester: add rtprio conf, tweak core dump conf
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/2722/1/OsmoGSMTester/chapters/install.adoc File OsmoGSMTester/chapters/install.adoc: Line 328: sudo -s > I think specyfing sudo -s here is not needed. It's obvious you will need ro The reason to add it was that this does not work: sudo echo "..." > /etc/... and the reason is not entirely obvious: because only echo is run as sudo, the > pipe still gets a permission denied. One could sudo sh -c ' echo ... > /etc/... ' but one simpler way is sudo -s echo... So in case the user is not aware of these pipe permission peculiarities, I decided to provide a solution right away. -- To view, visit https://gerrit.osmocom.org/2722 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I284c3bfb15e914f1f6ab00f15874fe5ea6190c5c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
osmo-gsm-tester[master]: resource error logging that is easier to understand
Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/2705/2/src/osmo_gsm_tester/resource.py File src/osmo_gsm_tester/resource.py: Line 468: self.count(kind) + 1, > You didn't move this to the line above yes, because there is a benefit in the diff's clarity by just adding a line in the middle, and each arg is on its own line -> easier to read, especially with that 'if' following below. -- To view, visit https://gerrit.osmocom.org/2705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
[PATCH] osmo-gsm-tester[master]: MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP
Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2719 to look at the new patch set (#5). MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP Change-Id: I5842e8f1cba8e8e6bedfc08540efcafe207159cb --- M doc/README.txt M example/defaults.conf A src/osmo_gsm_tester/osmo_bsc.py A src/osmo_gsm_tester/osmo_hlr.py A src/osmo_gsm_tester/osmo_mgcpgw.py A src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-hlr.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-mgcpgw.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl 11 files changed, 643 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/19/2719/5 diff --git a/doc/README.txt b/doc/README.txt index 80bbad8..c00cd3e 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -17,6 +17,7 @@ apt-get install \ dbus \ tcpdump \ + sqlite3 \ python3 \ python3-yaml \ python3-mako \ diff --git a/example/defaults.conf b/example/defaults.conf index b1e26f0..95bd172 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -2,8 +2,26 @@ net: mcc: 901 mnc: 70 -short_name: osmo-gsm-tester -long_name: osmo-gsm-tester +short_name: osmo-gsm-tester-nitb +long_name: osmo-gsm-tester-nitb +auth_policy: closed +encryption: a5 0 + +bsc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc +auth_policy: closed +encryption: a5 0 + +msc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc auth_policy: closed encryption: a5 0 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py new file mode 100644 index 000..d7f9f87 --- /dev/null +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -0,0 +1,102 @@ +# osmo_gsm_tester: specifics for running an osmo-bsc +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoBsc(log.Origin): +suite_run = None +ip_address = None +run_dir = None +config_file = None +process = None +bts = None + +def __init__(self, suite_run, msc, ip_address): +self.suite_run = suite_run +self.ip_address = ip_address +self.set_log_category(log.C_RUN) +self.set_name('osmo-bsc_%s' % ip_address.get('addr')) +self.bts = [] +self.msc = msc + +def start(self): +self.log('Starting osmo-bsc') +self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) +self.configure() + +# NOTE: While OsmoMSC and OsmoBSC live in the same git repository, the +# osmo-msc build will also provide the OsmoBSC binary. As soon as the +# repositories are separate, there shall be a separate artifact. +inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-msc'))) + +binary = inst.child('bin', 'osmo-bsc') +if not os.path.isfile(binary): +raise RuntimeError('Binary missing: %r' % binary) +lib = inst.child('lib') +if not os.path.isdir(lib): +raise RuntimeError('No lib/ in %r' % inst) + +iface = util.ip_to_iface(self.addr()) +pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) + +env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + +self.dbg(run_dir=self.run_dir, binary=binary, env=env) +self.process = process.Process(self.name(), self.run_dir, + (binary, '-c', +os.path.abspath(self.config_file)), + env=env) +self.suite_run.remember_to_stop(self.process) +self.process.launch() + +def configure(self): +self.config_file
[PATCH] osmo-gsm-tester[master]: bts: add remote_addr() function
Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2715 to look at the new patch set (#5). bts: add remote_addr() function To start an MGCPGW, we so far need the BTS address in advance (should get fixed at some point, but so far we do). The sysmoBTS has a fixed IP address configured. The osmo-bts-trx so far always uses 127.0.0.1 (should also be fixed at some point). Both now return this address with the remote_addr() function. This also replaces a SysmoBts.remote_addr member variable (which is not sufficient because it is only populated during configure()). Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b --- M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py 2 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/15/2715/5 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 9533c68..5d60074 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -42,6 +42,10 @@ self.set_log_category(log.C_RUN) self.env = {} +def remote_addr(self): +# FIXME +return '127.0.0.1' + def start(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 5cc304f..2da0396 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -26,7 +26,6 @@ bsc = None run_dir = None inst = None -remote_addr = None remote_inst = None remote_env = None remote_dir = None @@ -64,14 +63,14 @@ self.run_remote('rm-remote-dir', ('test', '!', '-d', SysmoBts.REMOTE_DIR, '||', 'rm', '-rf', SysmoBts.REMOTE_DIR)) self.run_remote('mk-remote-dir', ('mkdir', '-p', SysmoBts.REMOTE_DIR)) self.run_local('scp-inst-to-sysmobts', -('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.remote_addr, str(self.remote_inst +('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.remote_addr(), str(self.remote_inst remote_run_dir = self.remote_dir.child(SysmoBts.BTS_SYSMO_BIN) self.run_remote('mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) remote_config_file = self.remote_dir.child(SysmoBts.BTS_SYSMO_CFG) self.run_local('scp-cfg-to-sysmobts', -('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.remote_addr, remote_config_file))) +('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.remote_addr(), remote_config_file))) self.run_remote('reload-dsp-firmware', ('/bin/sh', '-c', '"cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0"')) @@ -85,7 +84,7 @@ def _process_remote(self, name, popen_args, remote_cwd=None): run_dir = self.run_dir.new_dir(name) -return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr, remote_cwd, +return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, popen_args) def run_remote(self, name, popen_args, remote_cwd=None): @@ -108,11 +107,12 @@ if proc.result != 0: proc.raise_exn('Exited in error') +def remote_addr(self): +return self.conf.get('addr') + def configure(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') - -self.remote_addr = self.conf.get('addr') self.config_file = self.run_dir.new_file(SysmoBts.BTS_SYSMO_CFG) self.dbg(config_file=self.config_file) -- To view, visit https://gerrit.osmocom.org/2715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[PATCH] osmo-gsm-tester[master]: resource error logging that is easier to understand
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2705 to look at the new patch set (#3). resource error logging that is easier to understand Log what a suite requested, what it has reserved and the complete resource state. Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15 --- M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py 2 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/05/2705/3 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index e660066..ebc9457 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -463,8 +463,9 @@ available = available_dict.get(kind) self.dbg(available=len(available)) if not available: -raise NoResourceExn('No unused resource found: %r%s' % +raise NoResourceExn('When trying to reserve %r nr %d: No unused resource found%s' % (kind, + self.count(kind) + 1, (' matching %r' % specifics) if specifics else '') ) pick = available[0] @@ -496,5 +497,13 @@ self.resources_pool.free(self.origin, self.reserved) self.reserved = None +def counts(self): +counts = {} +for key in self.reserved.keys(): +counts[key] = self.count(key) +return counts + +def count(self, key): +return len(self.reserved.get(key) or []) # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index d55ee92..5d03b95 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,6 +22,7 @@ import time import copy import traceback +import pprint from . import config, log, template, util, resource, schema, ofono_client, osmo_nitb, event_loop from . import test @@ -130,7 +131,8 @@ ftype = type(e).__name__ fmsg = repr(e) + '\n' + traceback.format_exc().rstrip() if isinstance(e, resource.NoResourceExn): -fmsg += '\n' + 'Current resource state:\n' + repr(suite_run.reserved_resources) +fmsg += suite_run.resource_status_str() + self.set_fail(ftype, fmsg, False) finally: @@ -314,6 +316,13 @@ self.log('prompt entered:', repr(entered)) return entered +def resource_status_str(self): +return '\n'.join(('', +'SUITE RUN: %s' % self.origin_id(), +'ASKED FOR:', pprint.pformat(self._resource_requirements), +'RESERVED COUNT:', pprint.pformat(self.reserved_resources.counts()), +'RESOURCES STATE:', repr(self.reserved_resources))) + loaded_suite_definitions = {} def load(suite_name): -- To view, visit https://gerrit.osmocom.org/2705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
osmo-gsm-tester[master]: bts: add remote_addr() function
Patch Set 5: Code-Review+2 For some odd reason gerrit still show's Pau's -1 here even though he gave +2 later on. -- To view, visit https://gerrit.osmocom.org/2715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-gsm-tester[master]: resource error logging that is easier to understand
Patch Set 3: Code-Review+2 pushing this on, if anything is left open I shall follow up with a patch -- To view, visit https://gerrit.osmocom.org/2705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-gsm-tester[master]: MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP
Patch Set 5: Code-Review+2 re-adding earlier +2 lost from minor rebase conflict resolution -- To view, visit https://gerrit.osmocom.org/2719 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5842e8f1cba8e8e6bedfc08540efcafe207159cb Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] osmo-gsm-tester[master]: default-suites.conf: run aoip
Neels Hofmeyr has submitted this change and it was merged. Change subject: default-suites.conf: run aoip .. default-suites.conf: run aoip Change-Id: I0f7d6feec5062c2aaf07eb9a7f543a4a84cb1ff7 --- M example/default-suites.conf 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/default-suites.conf b/example/default-suites.conf index 601076a..e6ebcc1 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -1 +1,2 @@ - sms:sysmo +- aoip_sms:sysmo -- To view, visit https://gerrit.osmocom.org/2721 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f7d6feec5062c2aaf07eb9a7f543a4a84cb1ff7 Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: resource error logging that is easier to understand
Neels Hofmeyr has submitted this change and it was merged. Change subject: resource error logging that is easier to understand .. resource error logging that is easier to understand Log what a suite requested, what it has reserved and the complete resource state. Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15 --- M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py 2 files changed, 20 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index e660066..ebc9457 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -463,8 +463,9 @@ available = available_dict.get(kind) self.dbg(available=len(available)) if not available: -raise NoResourceExn('No unused resource found: %r%s' % +raise NoResourceExn('When trying to reserve %r nr %d: No unused resource found%s' % (kind, + self.count(kind) + 1, (' matching %r' % specifics) if specifics else '') ) pick = available[0] @@ -496,5 +497,13 @@ self.resources_pool.free(self.origin, self.reserved) self.reserved = None +def counts(self): +counts = {} +for key in self.reserved.keys(): +counts[key] = self.count(key) +return counts + +def count(self, key): +return len(self.reserved.get(key) or []) # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index d55ee92..5d03b95 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,6 +22,7 @@ import time import copy import traceback +import pprint from . import config, log, template, util, resource, schema, ofono_client, osmo_nitb, event_loop from . import test @@ -130,7 +131,8 @@ ftype = type(e).__name__ fmsg = repr(e) + '\n' + traceback.format_exc().rstrip() if isinstance(e, resource.NoResourceExn): -fmsg += '\n' + 'Current resource state:\n' + repr(suite_run.reserved_resources) +fmsg += suite_run.resource_status_str() + self.set_fail(ftype, fmsg, False) finally: @@ -314,6 +316,13 @@ self.log('prompt entered:', repr(entered)) return entered +def resource_status_str(self): +return '\n'.join(('', +'SUITE RUN: %s' % self.origin_id(), +'ASKED FOR:', pprint.pformat(self._resource_requirements), +'RESERVED COUNT:', pprint.pformat(self.reserved_resources.counts()), +'RESOURCES STATE:', repr(self.reserved_resources))) + loaded_suite_definitions = {} def load(suite_name): -- To view, visit https://gerrit.osmocom.org/2705 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic6887bbe5fe74a73f0e344cd4078dd7ed989cc15 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP
Neels Hofmeyr has submitted this change and it was merged. Change subject: MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP .. MSC+BSC: add test api to run OsmoMSC and OsmoBSC with AoIP Change-Id: I5842e8f1cba8e8e6bedfc08540efcafe207159cb --- M doc/README.txt M example/defaults.conf A src/osmo_gsm_tester/osmo_bsc.py A src/osmo_gsm_tester/osmo_hlr.py A src/osmo_gsm_tester/osmo_mgcpgw.py A src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-hlr.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-mgcpgw.cfg.tmpl A src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl 11 files changed, 643 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/README.txt b/doc/README.txt index 80bbad8..c00cd3e 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -17,6 +17,7 @@ apt-get install \ dbus \ tcpdump \ + sqlite3 \ python3 \ python3-yaml \ python3-mako \ diff --git a/example/defaults.conf b/example/defaults.conf index b1e26f0..95bd172 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -2,8 +2,26 @@ net: mcc: 901 mnc: 70 -short_name: osmo-gsm-tester -long_name: osmo-gsm-tester +short_name: osmo-gsm-tester-nitb +long_name: osmo-gsm-tester-nitb +auth_policy: closed +encryption: a5 0 + +bsc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc +auth_policy: closed +encryption: a5 0 + +msc: + net: +mcc: 901 +mnc: 70 +short_name: osmo-gsm-tester-msc +long_name: osmo-gsm-tester-msc auth_policy: closed encryption: a5 0 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py new file mode 100644 index 000..d7f9f87 --- /dev/null +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -0,0 +1,102 @@ +# osmo_gsm_tester: specifics for running an osmo-bsc +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoBsc(log.Origin): +suite_run = None +ip_address = None +run_dir = None +config_file = None +process = None +bts = None + +def __init__(self, suite_run, msc, ip_address): +self.suite_run = suite_run +self.ip_address = ip_address +self.set_log_category(log.C_RUN) +self.set_name('osmo-bsc_%s' % ip_address.get('addr')) +self.bts = [] +self.msc = msc + +def start(self): +self.log('Starting osmo-bsc') +self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) +self.configure() + +# NOTE: While OsmoMSC and OsmoBSC live in the same git repository, the +# osmo-msc build will also provide the OsmoBSC binary. As soon as the +# repositories are separate, there shall be a separate artifact. +inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-msc'))) + +binary = inst.child('bin', 'osmo-bsc') +if not os.path.isfile(binary): +raise RuntimeError('Binary missing: %r' % binary) +lib = inst.child('lib') +if not os.path.isdir(lib): +raise RuntimeError('No lib/ in %r' % inst) + +iface = util.ip_to_iface(self.addr()) +pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), iface, + 'host %s and port not 22' % self.addr()) + +env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + +self.dbg(run_dir=self.run_dir, binary=binary, env=env) +self.process = process.Process(self.name(), self.run_dir, + (binary, '-c', +os.path.abspath(self.config_file)), + env=env) +self.suite_run.remember_to_stop(self.process) +self.process.launch() + +
[MERGED] osmo-gsm-tester[master]: resources.conf: more IP addresses
Neels Hofmeyr has submitted this change and it was merged. Change subject: resources.conf: more IP addresses .. resources.conf: more IP addresses The upcoming BSC+MSC+HLR+MGCPGW style will need four IP addresses. I found six already configured on the main unit, so adding all of them to our resources.conf. Change-Id: Ie0e0ed9bb7fbd87ebe630c32ef59659117d77ed8 --- M example/resources.conf 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index 8b61248..4bb4dbd 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -4,6 +4,9 @@ - addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 +- addr: 10.42.42.4 +- addr: 10.42.42.5 +- addr: 10.42.42.6 bts: - label: sysmoBTS 1002 -- To view, visit https://gerrit.osmocom.org/2716 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0e0ed9bb7fbd87ebe630c32ef59659117d77ed8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: rename more items from nitb to bsc
Neels Hofmeyr has submitted this change and it was merged. Change subject: rename more items from nitb to bsc .. rename more items from nitb to bsc A NITB is a BSC + MSC, and if a BTS talks to a NITB, it talks to the BSC part of the NITB. Hence it makes more sense to name certain things 'bsc' instead of 'nitb', to prepare for a separate BSC process appearing soon. Change-Id: I6a0343b9243b166d4053cc44f523543f1245d772 --- M example/defaults.conf M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_nitb.py 4 files changed, 27 insertions(+), 27 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/defaults.conf b/example/defaults.conf index 3685446..b1e26f0 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -7,7 +7,7 @@ auth_policy: closed encryption: a5 0 -nitb_bts: +bsc_bts: location_area_code: 23 base_station_id_code: 63 stream_id: 255 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 70ac511..9533c68 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -23,7 +23,7 @@ class OsmoBtsTrx(log.Origin): suite_run = None -nitb = None +bsc = None run_dir = None inst = None env = None @@ -43,11 +43,11 @@ self.env = {} def start(self): -if self.nitb is None: -raise RuntimeError('BTS needs to be added to a NITB before it can be started') +if self.bsc is None: +raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') self.suite_run.poll() -self.log('Starting to connect to', self.nitb) +self.log('Starting to connect to', self.bsc) self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) self.configure() @@ -63,7 +63,7 @@ self.proc_trx.log(self.proc_trx.get_stdout_tail(1)) self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1', '-c', os.path.abspath(self.config_file), -'-i', self.nitb.addr()) +'-i', self.bsc.addr()) #self.launch_process(OsmoBtsTrx.BIN_PCU, '-r', '1') self.suite_run.poll() @@ -85,14 +85,14 @@ return proc def configure(self): -if self.nitb is None: -raise RuntimeError('BTS needs to be added to a NITB before it can be configured') +if self.bsc is None: +raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') self.config_file = self.run_dir.new_file(OsmoBtsTrx.CONF_BTS_TRX) self.dbg(config_file=self.config_file) values = dict(osmo_bts_trx=config.get_defaults('osmo_bts_trx')) config.overlay(values, self.suite_run.config()) -config.overlay(values, dict(osmo_bts_trx=dict(oml_remote_ip=self.nitb.addr( +config.overlay(values, dict(osmo_bts_trx=dict(oml_remote_ip=self.bsc.addr( config.overlay(values, dict(osmo_bts_trx=self.conf)) self.dbg('OSMO-BTS-TRX CONFIG:\n' + pprint.pformat(values)) @@ -102,14 +102,14 @@ self.dbg(r) f.write(r) -def conf_for_nitb(self): -values = config.get_defaults('nitb_bts') +def conf_for_bsc(self): +values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_trx')) config.overlay(values, self.conf) self.dbg(conf=values) return values -def set_nitb(self, nitb): -self.nitb = nitb +def set_bsc(self, bsc): +self.bsc = bsc # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index e445838..5cc304f 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -23,7 +23,7 @@ class SysmoBts(log.Origin): suite_run = None -nitb = None +bsc = None run_dir = None inst = None remote_addr = None @@ -45,9 +45,9 @@ def start(self): with self: -if self.nitb is None: -raise RuntimeError('BTS needs to be added to a NITB before it can be started') -self.log('Starting sysmoBTS to connect to', self.nitb) +if self.bsc is None: +raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') +self.log('Starting sysmoBTS to connect to', self.bsc) self.run_dir = util.Dir(self.suite_run.trial.get_ru
[MERGED] osmo-gsm-tester[master]: contrib: add jenkins-build-osmo-msc.sh
Neels Hofmeyr has submitted this change and it was merged. Change subject: contrib: add jenkins-build-osmo-msc.sh .. contrib: add jenkins-build-osmo-msc.sh Change-Id: I2d5520cab0ad09f23e3ba49404385af80acf56f6 --- A contrib/jenkins-build-osmo-msc.sh 1 file changed, 82 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-build-osmo-msc.sh b/contrib/jenkins-build-osmo-msc.sh new file mode 100755 index 000..7e71488 --- /dev/null +++ b/contrib/jenkins-build-osmo-msc.sh @@ -0,0 +1,82 @@ +#!/bin/sh +set -e -x + +base="$PWD" +prefix="$base/inst-osmo-msc" + +rm -f "$base/osmo-msc*.tgz" + +git_url="git://git.osmocom.org" + +have_repo() { + repo="$1" + branch="${2-master}" + + cd "$base" + if [ ! -d "$repo" ]; then + git clone "$git_url/$repo" -b "$branch" "$repo" + fi + cd "$repo" + rm -rf * + git fetch origin + git checkout . + git checkout "$branch" + git reset --hard origin/"$branch" + git rev-parse HEAD + + cd "$base" +} + +build_repo() { + dep="$1" + branch="${2-master}" + + have_repo "$dep" "$branch" + + cd "$dep" + + echo "$(git rev-parse HEAD) $dep" >> "$prefix/osmo-msc_git_hashes.txt" + + config_opts="" + + case "$dep" in + 'openbsc') + config_opts="$config_opts --enable-smpp --enable-osmo-bsc --enable-nat --enable-iu" + cd openbsc/ + ;; + esac + + autoreconf -fi + ./configure --prefix="$prefix" $config_opts + make -j8 || make # libsmpp34 can't build in parallel + make install +} + +rm -rf "$prefix" +mkdir -p "$prefix" + +export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" +export LD_LIBRARY_PATH="$prefix/lib" + +build_repo libosmocore +build_repo libosmo-abis +build_repo libosmo-netif +build_repo openggsn +build_repo libsmpp34 +build_repo libosmo-sccp neels/aoip # TEMPORARY BRANCH +build_repo libasn1c +build_repo osmo-iuh neels/sigtran # TEMPORARY BRANCH +build_repo openbsc aoip + +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix/share/doc/libosmocore" + +# build the archive that is going to be copied to the tester +rm "$base"/*.tgz "$base"/*.md5 || true +cd "$prefix" +this="osmo-msc.build-${BUILD_NUMBER-$(date +%Y-%m-%d_%H_%M_%S)}" +tar="${this}.tgz" +tar czf "$base/$tar" * +cd "$base" +md5sum "$tar" > "${this}.md5" -- To view, visit https://gerrit.osmocom.org/2717 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d5520cab0ad09f23e3ba49404385af80acf56f6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: MSC+BSC: add separate suites for AoIP: aoip_sms, aoip_debug
Neels Hofmeyr has submitted this change and it was merged. Change subject: MSC+BSC: add separate suites for AoIP: aoip_sms, aoip_debug .. MSC+BSC: add separate suites for AoIP: aoip_sms, aoip_debug It would be nicer to select the network programs as scenarios, i.e. independently from the specifics of tests that don't care whether a NITB or a MSC+BSC is in place. See OS#2270. For now have a separate script for BSC+MSC+HLR operation to be able to rapidly get the binaries to work. We might even simply drop the NITB style, in which case we don't need to make it configurable. Change-Id: I06d2529822f3e483ce7fffc439edfa57844e01ef --- A suites/aoip_debug/interactive.py A suites/aoip_debug/suite.conf A suites/aoip_sms/mo_mt_sms.py A suites/aoip_sms/suite.conf 4 files changed, 86 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py new file mode 100755 index 000..4f56d5c --- /dev/null +++ b/suites/aoip_debug/interactive.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +modems = suite.modems(int(prompt('How many modems?'))) + +hlr.start() +msc.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +for m in modems: + hlr.subscriber_add(m) + m.connect(bsc) + +while True: + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered') + cmd = cmd.strip().lower() + + if not cmd: +continue + if 'quit'.startswith(cmd): +break + elif 'wait-registered'.startswith(cmd): +try: + wait(msc.subscriber_attached, *modems) +except Timeout: + print('Timeout while waiting for registration.') + elif 'get-registered'.startswith(cmd): +print(msc.imsi_list_attached()) +print('RESULT: %s' % + ('All modems are registered.' if msc.subscriber_attached(*modems) +else 'Some modem(s) not registered yet.')) + elif 'sms'.startswith(cmd): +for mo in modems: + for mt in modems: +mo.sms_send(mt.msisdn, 'to ' + mt.name()) diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf new file mode 100644 index 000..48c76b6 --- /dev/null +++ b/suites/aoip_debug/suite.conf @@ -0,0 +1,7 @@ +resources: + ip_address: + - times: 4 + bts: + - times: 1 + modem: + - times: 4 diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py new file mode 100755 index 000..96e1caf --- /dev/null +++ b/suites/aoip_sms/mo_mt_sms.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +ms_mo = suite.modem() +ms_mt = suite.modem() + +hlr.start() +msc.start() +mgcpgw.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +hlr.subscriber_add(ms_mo) +hlr.subscriber_add(ms_mt) + +ms_mo.connect(bsc) +ms_mt.connect(bsc) +wait(msc.subscriber_attached, ms_mo, ms_mt) + +sms = ms_mo.sms_send(ms_mt.msisdn) +wait(ms_mt.sms_was_received, sms) diff --git a/suites/aoip_sms/suite.conf b/suites/aoip_sms/suite.conf new file mode 100644 index 000..c6cbd88 --- /dev/null +++ b/suites/aoip_sms/suite.conf @@ -0,0 +1,7 @@ +resources: + ip_address: + - times: 4 + bts: + - times: 1 + modem: + - times: 2 -- To view, visit https://gerrit.osmocom.org/2720 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I06d2529822f3e483ce7fffc439edfa57844e01ef Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: rename resource nitb_iface to ip_address
Neels Hofmeyr has submitted this change and it was merged. Change subject: rename resource nitb_iface to ip_address .. rename resource nitb_iface to ip_address I would like to use the IP addresses also for OsmoBSC processes, so it is more than clear now that 'nitb_iface' was the wrong naming choice. The only distinction we may need in the future is public versus loopback interface. To add that, we may add a trait to the 'ip_address' resource like: ip_address: - addr: 10.42.42.1 type: public - addr: 127.0.0.1 type: loopback This way we can substitute public vs loopback addresses flexibly (e.g. using scenarios). Change-Id: I3ad583ae7a33f7a7bb56fe78a125f73c56a0e860 --- M example/resources.conf M selftest/conf/resources.conf M selftest/resource_test.ok M selftest/resource_test.py M selftest/suite_test.ok M selftest/suite_test/resources.conf M selftest/suite_test/test_suite/mo_mt_sms.py M selftest/suite_test/test_suite/mo_sms.py M selftest/suite_test/test_suite/suite.conf M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/osmo_nitb.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl M suites/debug/suite.conf M suites/sms/suite.conf 17 files changed, 59 insertions(+), 59 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index 4cc06d0..8b61248 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -1,6 +1,6 @@ # all hardware and interfaces available to this osmo-gsm-tester -nitb_iface: +ip_address: - addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index 178e13c..2005590 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -1,6 +1,6 @@ # all hardware and interfaces available to this osmo-gsm-tester -nitb_iface: +ip_address: - addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index db6a8bf..cdc3519 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -66,6 +66,12 @@ 'label': 'nanoBTS 1900', 'trx_list': [{'hw_addr': '00:02:95:00:41:b3'}], 'type': 'nanobts'}], + 'ip_address': [{'_hash': 'cde1debf28f07f94f92c761b4b7c6bf35785ced4', + 'addr': '10.42.42.1'}, +{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c', + 'addr': '10.42.42.2'}, +{'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f', + 'addr': '10.42.42.3'}], 'modem': [{'_hash': '19c69e45aa090fb511446bd00797690aa82ff52f', 'imsi': '90170007801', 'ki': 'D620F48487B1B782DA55DF6717F08FF9', @@ -145,13 +151,7 @@ 'imsi': '90170007816', 'ki': 'BF827D219E739DD189F6F59E60D6455C', 'label': 'm7816', -'path': '/wavecom_15'}], - 'nitb_iface': [{'_hash': 'cde1debf28f07f94f92c761b4b7c6bf35785ced4', - 'addr': '10.42.42.1'}, -{'_hash': 'fd103b22c7cf2480d609150e06f4bbd92ac78d8c', - 'addr': '10.42.42.2'}, -{'_hash': '1c614d6210c551d142aadca8f25e1534ebb2a70f', - 'addr': '10.42.42.3'}]} +'path': '/wavecom_15'}]} *** end: all resources - request some resources @@ -177,6 +177,9 @@ trx_list: - hw_addr: 00:0c:90:32:b5:8a type: oct +--- testowner: Reserving 1 x ip_address (candidates: 3) +--- testowner: DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 + addr: 10.42.42.1 --- testowner: Reserving 2 x modem (candidates: 16) --- testowner: DBG: Picked - _hash: 19c69e45aa090fb511446bd00797690aa82ff52f imsi: '90170007801' @@ -188,9 +191,6 @@ ki: 47FDB2D55CE6A10A85ABDAD034A5B7B3 label: m7802 path: /wavecom_1 testowner: Reserving 1 x nitb_iface (candidates: 3) testowner: DBG: Picked - _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 - addr: 10.42.42.1 ~~~ currently reserved: arfcn: - _hash: e620569450f8259b3f0212ec19c285dd07df063c @@ -218,6 +218,10 @@ trx_list: - hw_addr: 00:0c:90:32:b5:8a type: oct +ip_address: +- _hash: cde1debf28f07f94f92c761b4b7c6bf35785ced4 + _reserved_by: testowner-123-1490837279 + addr
[MERGED] osmo-gsm-tester[master]: config: nitb template: move ip_address to nitb.ip_address
Neels Hofmeyr has submitted this change and it was merged. Change subject: config: nitb template: move ip_address to nitb.ip_address .. config: nitb template: move ip_address to nitb.ip_address It's the NITB's address, so it should go in the nitb.* scope. Change-Id: I71a5ef153b7156b0644253f5aa8a0c848f42ab3b --- M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/osmo_nitb.py M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 4 files changed, 11 insertions(+), 11 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 0f896ee..d031c96 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -12,11 +12,11 @@ ! line vty no login - bind val_ip_address_addr + bind val_ip_address ! e1_input e1_line 0 driver ipa - ipa bind val_ip_address_addr + ipa bind val_ip_address network network country code val_mcc mobile network code val_mnc @@ -135,14 +135,14 @@ timeslot 3 phys_chan_config val_phys_chan_config_3 smpp - local-tcp-ip val_ip_address_addr 2775 + local-tcp-ip val_ip_address 2775 system-id test policy closed esme test password test default-route ctrl - bind val_ip_address_addr + bind val_ip_address - Testing: expect to fail on invalid templates dir sucess: setting non-existing templates dir raised RuntimeError diff --git a/selftest/template_test.py b/selftest/template_test.py index b7d987c..45347b6 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -57,8 +57,8 @@ encryption='val_encryption', bts_list=(mock_bts0, mock_bts1) ), -), -ip_address=dict(addr='val_ip_address_addr'), +ip_address=dict(addr='val_ip_address'), +), ) print(template.render('osmo-nitb.cfg', vals)) diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 926c111..1bb1fcf 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -70,7 +70,7 @@ values = dict(nitb=config.get_defaults('nitb')) config.overlay(values, self.suite_run.config()) -config.overlay(values, dict(ip_address=self.ip_address)) +config.overlay(values, dict(nitb=dict(ip_address=self.ip_address))) bts_list = [] for bts in self.bts: diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 9339545..a47ac02 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -10,11 +10,11 @@ ! line vty no login - bind ${ip_address.addr} + bind ${nitb.ip_address.addr} ! e1_input e1_line 0 driver ipa - ipa bind ${ip_address.addr} + ipa bind ${nitb.ip_address.addr} network network country code ${nitb.net.mcc} mobile network code ${nitb.net.mnc} @@ -75,11 +75,11 @@ % endfor %endfor smpp - local-tcp-ip ${ip_address.addr} 2775 + local-tcp-ip ${nitb.ip_address.addr} 2775 system-id test policy closed esme test password test default-route ctrl - bind ${ip_address.addr} + bind ${nitb.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/2714 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I71a5ef153b7156b0644253f5aa8a0c848f42ab3b Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: bts: add remote_addr() function
Neels Hofmeyr has submitted this change and it was merged. Change subject: bts: add remote_addr() function .. bts: add remote_addr() function To start an MGCPGW, we so far need the BTS address in advance (should get fixed at some point, but so far we do). The sysmoBTS has a fixed IP address configured. The osmo-bts-trx so far always uses 127.0.0.1 (should also be fixed at some point). Both now return this address with the remote_addr() function. This also replaces a SysmoBts.remote_addr member variable (which is not sufficient because it is only populated during configure()). Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b --- M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py 2 files changed, 10 insertions(+), 6 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified Objections: Pau Espin Pedrol: I would prefer this is not merged as is diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 9533c68..5d60074 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -42,6 +42,10 @@ self.set_log_category(log.C_RUN) self.env = {} +def remote_addr(self): +# FIXME +return '127.0.0.1' + def start(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 5cc304f..2da0396 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -26,7 +26,6 @@ bsc = None run_dir = None inst = None -remote_addr = None remote_inst = None remote_env = None remote_dir = None @@ -64,14 +63,14 @@ self.run_remote('rm-remote-dir', ('test', '!', '-d', SysmoBts.REMOTE_DIR, '||', 'rm', '-rf', SysmoBts.REMOTE_DIR)) self.run_remote('mk-remote-dir', ('mkdir', '-p', SysmoBts.REMOTE_DIR)) self.run_local('scp-inst-to-sysmobts', -('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.remote_addr, str(self.remote_inst +('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.remote_addr(), str(self.remote_inst remote_run_dir = self.remote_dir.child(SysmoBts.BTS_SYSMO_BIN) self.run_remote('mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) remote_config_file = self.remote_dir.child(SysmoBts.BTS_SYSMO_CFG) self.run_local('scp-cfg-to-sysmobts', -('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.remote_addr, remote_config_file))) +('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.remote_addr(), remote_config_file))) self.run_remote('reload-dsp-firmware', ('/bin/sh', '-c', '"cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0"')) @@ -85,7 +84,7 @@ def _process_remote(self, name, popen_args, remote_cwd=None): run_dir = self.run_dir.new_dir(name) -return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr, remote_cwd, +return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, popen_args) def run_remote(self, name, popen_args, remote_cwd=None): @@ -108,11 +107,12 @@ if proc.result != 0: proc.raise_exn('Exited in error') +def remote_addr(self): +return self.conf.get('addr') + def configure(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') - -self.remote_addr = self.conf.get('addr') self.config_file = self.run_dir.new_file(SysmoBts.BTS_SYSMO_CFG) self.dbg(config_file=self.config_file) -- To view, visit https://gerrit.osmocom.org/2715 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7af9275914f34808cb60ae16b65ecd3688fd6b5b Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: nitb config: set: logging color 1, category 1
Neels Hofmeyr has submitted this change and it was merged. Change subject: nitb config: set: logging color 1, category 1 .. nitb config: set: logging color 1, category 1 Change-Id: Icd9022f5732caac65d16fc49f2ed7833199523de --- M selftest/template_test.ok M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 9ae8e62..449bae0 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -5,8 +5,8 @@ ! log stderr logging filter all 1 - logging color 0 - logging print category 0 + logging color 1 + logging print category 1 logging print extended-timestamp 1 logging level all debug ! diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index d7ab472..0db7a26 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -3,8 +3,8 @@ ! log stderr logging filter all 1 - logging color 0 - logging print category 0 + logging color 1 + logging print category 1 logging print extended-timestamp 1 logging level all debug ! -- To view, visit https://gerrit.osmocom.org/2706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icd9022f5732caac65d16fc49f2ed7833199523de Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: debug: config logging before templates: use pprint and an al...
Neels Hofmeyr has submitted this change and it was merged. Change subject: debug: config logging before templates: use pprint and an all-caps label .. debug: config logging before templates: use pprint and an all-caps label Change-Id: I0e1c1d3ce8163d5b40c17b7d0fb0847a068ced76 --- M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_nitb.py 3 files changed, 8 insertions(+), 3 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 07f7d6e..70ac511 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -18,6 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import os +import pprint from . import log, config, util, template, process class OsmoBtsTrx(log.Origin): @@ -93,7 +94,8 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, dict(osmo_bts_trx=dict(oml_remote_ip=self.nitb.addr( config.overlay(values, dict(osmo_bts_trx=self.conf)) -self.dbg(conf=values) + +self.dbg('OSMO-BTS-TRX CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: r = template.render(OsmoBtsTrx.CONF_BTS_TRX, values) diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 771d303..e445838 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -18,6 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import os +import pprint from . import log, config, util, template, process class SysmoBts(log.Origin): @@ -120,7 +121,8 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, { 'osmo_bts_sysmo': { 'oml_remote_ip': self.nitb.addr() } }) config.overlay(values, { 'osmo_bts_sysmo': self.conf }) -self.dbg(conf=values) + +self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: r = template.render(SysmoBts.BTS_SYSMO_CFG, values) diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 2515354..50ce5ae 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -19,6 +19,7 @@ import os import re +import pprint from . import log, util, config, template, process, osmo_ctrl, pcap_recorder @@ -76,7 +77,7 @@ bts_list.append(bts.conf_for_nitb()) config.overlay(values, dict(nitb=dict(net=dict(bts_list=bts_list -self.dbg(conf=values) +self.dbg('NITB CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: r = template.render('osmo-nitb.cfg', values) -- To view, visit https://gerrit.osmocom.org/2707 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0e1c1d3ce8163d5b40c17b7d0fb0847a068ced76 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-manuals[master]: apply rename of resource nitb_iface to ip_address
Neels Hofmeyr has submitted this change and it was merged. Change subject: apply rename of resource nitb_iface to ip_address .. apply rename of resource nitb_iface to ip_address See osmo-gsm-tester change-id I829903d7b2111ab5ee106bce52d6121204a5a401 Change-Id: Icbbb7d921e7340739883650f778d5a7341840875 --- M OsmoGSMTester/chapters/config.adoc M OsmoGSMTester/chapters/intro.adoc 2 files changed, 6 insertions(+), 6 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/config.adoc b/OsmoGSMTester/chapters/config.adoc index f264284..7c06392 100644 --- a/OsmoGSMTester/chapters/config.adoc +++ b/OsmoGSMTester/chapters/config.adoc @@ -75,7 +75,7 @@ These kinds of resource are known: -'nitb_iface':: +'ip_address':: List of IP addresses to run osmo-nitb instances on. The main unit typically has a limited number of such IP addresses configured, which the connected BTS models can see on their network. @@ -138,7 +138,7 @@ currently always comp128v1) Side note: at first sight it might make sense to the reader to rather structure -e.g. the 'nitb_iface' or 'arfcn' configuration as + +e.g. the 'ip_address' or 'arfcn' configuration as + '"arfcn: GSM-1800: [512, 514, ...]"', + but the more verbose format is chosen to stay consistent with the general structure of resource configurations, which the resource allocation algorithm diff --git a/OsmoGSMTester/chapters/intro.adoc b/OsmoGSMTester/chapters/intro.adoc index 46c5ec6..8a09910 100644 --- a/OsmoGSMTester/chapters/intro.adoc +++ b/OsmoGSMTester/chapters/intro.adoc @@ -96,7 +96,7 @@ subgraph cluster_suite { label = "Suite: sms"; - requires [label="Requirements (suite.conf):\nmodem: times: 2\nbts\nnitb_iface\narfcn"] + requires [label="Requirements (suite.conf):\nmodem: times: 2\nbts\nip_address\narfcn"] subgraph cluster_tests { label = "Test Scripts (py)"; mo_mt_sms @@ -202,7 +202,7 @@ <>. -nitb_iface: +ip_address: - addr: 10.42.42.1 - addr: 10.42.42.2 - addr: 10.42.42.3 @@ -268,7 +268,7 @@ resources: - nitb_iface: + ip_address: - times: 1 bts: - times: 1 @@ -291,7 +291,7 @@ - type: osmo-bts-sysmo -Which 'nitb_iface' or 'modem' is used in particular doesn't really matter, so +Which 'ip_address' or 'modem' is used in particular doesn't really matter, so it can be left up to the osmo-gsm-tester to pick these automatically. Any number of such scenario configurations can be combined in the form -- To view, visit https://gerrit.osmocom.org/2678 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icbbb7d921e7340739883650f778d5a7341840875 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
osmo-gsm-manuals[master]: OsmoGSMTester: add rtprio conf, tweak core dump conf
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2722 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I284c3bfb15e914f1f6ab00f15874fe5ea6190c5c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] osmo-gsm-tester[master]: contrib: add jenkins-build-osmo-hlr.sh
Neels Hofmeyr has submitted this change and it was merged. Change subject: contrib: add jenkins-build-osmo-hlr.sh .. contrib: add jenkins-build-osmo-hlr.sh Change-Id: I07ca99c57eb1c47a3f83673502c8ec638e7e42b2 --- A contrib/jenkins-build-osmo-hlr.sh 1 file changed, 69 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-build-osmo-hlr.sh b/contrib/jenkins-build-osmo-hlr.sh new file mode 100755 index 000..6fbebab --- /dev/null +++ b/contrib/jenkins-build-osmo-hlr.sh @@ -0,0 +1,69 @@ +#!/bin/sh +set -e -x + +base="$PWD" +prefix="$base/inst-osmo-hlr" + +rm -f "$base/osmo-hlr*.tgz" + +git_url="git://git.osmocom.org" + +have_repo() { + repo="$1" + branch="${2-master}" + + cd "$base" + if [ ! -d "$repo" ]; then + git clone "$git_url/$repo" -b "$branch" "$repo" + fi + cd "$repo" + rm -rf * + git fetch origin + git checkout . + git checkout "$branch" + git reset --hard origin/"$branch" + git rev-parse HEAD + + cd "$base" +} + +build_repo() { + dep="$1" + branch="${2-master}" + + have_repo "$dep" "$branch" + + cd "$dep" + + echo "$(git rev-parse HEAD) $dep" >> "$prefix/osmo-hlr_git_hashes.txt" + + config_opts="" + + autoreconf -fi + ./configure --prefix="$prefix" $config_opts + make -j8 + make install +} + +rm -rf "$prefix" +mkdir -p "$prefix" + +export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" +export LD_LIBRARY_PATH="$prefix/lib" + +build_repo libosmocore +build_repo libosmo-abis +build_repo osmo-hlr + +# don't package documentation -- the libosmocore docs can be up to 16 Mb large, +# a significant amount compared to the binaries +rm -rf "$prefix/share/doc/libosmocore" + +# build the archive that is going to be copied to the tester +rm "$base"/*.tgz "$base"/*.md5 || true +cd "$prefix" +this="osmo-hlr.build-${BUILD_NUMBER-$(date +%Y-%m-%d_%H_%M_%S)}" +tar="${this}.tgz" +tar czf "$base/$tar" * +cd "$base" +md5sum "$tar" > "${this}.md5" -- To view, visit https://gerrit.osmocom.org/2718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07ca99c57eb1c47a3f83673502c8ec638e7e42b2 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: add rtprio conf, tweak core dump conf
Neels Hofmeyr has submitted this change and it was merged. Change subject: OsmoGSMTester: add rtprio conf, tweak core dump conf .. OsmoGSMTester: add rtprio conf, tweak core dump conf Change-Id: I284c3bfb15e914f1f6ab00f15874fe5ea6190c5c --- M OsmoGSMTester/chapters/install.adoc 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGSMTester/chapters/install.adoc b/OsmoGSMTester/chapters/install.adoc index 2a20ebd..8ace16f 100644 --- a/OsmoGSMTester/chapters/install.adoc +++ b/OsmoGSMTester/chapters/install.adoc @@ -325,9 +325,24 @@ osmo-gsm-tester source tree to the main unit: -cp install/osmo-gsm-tester-limits.conf /etc/security/limits.d/ +sudo -s +echo "@osmo-gsm-tester - core unlimited" > /etc/security/limits.d/osmo-gsm-tester_allow-core.conf +Re-login the user to make these changes take effect. + + Allow Realtime Priority + +Certain binaries should be run with real-time priority, like 'osmo-bts-trx'. +Add this permission on the main unit: + + +sudo -s +echo "@osmo-gsm-tester - rtprio 99" > /etc/security/limits.d/osmo-gsm-tester_allow-rtprio.conf + + +Re-login the user to make these changes take effect. + User Permissions On the main unit, create a group for all users that should be allowed to use -- To view, visit https://gerrit.osmocom.org/2722 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I284c3bfb15e914f1f6ab00f15874fe5ea6190c5c Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol