path: root/tests/ctrl_test_runner.py
AgeCommit message (Collapse)AuthorFilesLines
2018-06-10remove traces of osmo-bsc_nat in python test (osmoappdesc/test_runner)Harald Welte1-78/+0
Change-Id: I9127ddb7b29eb82defd3a8afac9c1dbfd424fb72
2018-03-07implement support for 3-digit MNC with leading zerosNeels Hofmeyr1-11/+11
Add 3-digit flags and use the new RAI and LAI API from libosmocore throughout the code base to be able to handle an MNC < 100 that has three digits (leading zeros). The changes to abis_test and gsm0408_test show that this code now handles 3-digit MNC correctly, by not dropping the leading zero as 0xf in the encoded PLMN. Re-implement CTRL commands 'mcc', 'mnc' and 'mcc-mnc-apply' to preserve the presence of the third digit of the MNC. Always reply with all leading zeros. Adjust the expected results in ctrl_test_runner.py, to show that it works. In VTY and CTRL, the parsing of MCC and MNC is inherently made stricter by use of osmo_{mcc,mnc}_from_str() -- they will no longer allow surplus characters and detect errno returned by strtol() (in contrast to atoi()). Depends: Id2240f7f518494c9df6c8bda52c0d5092f90f221 (libosmocore), Ib7176b1d65a03b76f41f94bc9d3293a8a07d24c6 (libosmocore), I020a4f11791c61742a3d795f782805f7b7e8733e (libosmocore) Change-Id: I8e722103344186fde118b26d8353db95a4581daa
2018-03-05ctrl_test_runner: add tests for 3-digit MNCNeels Hofmeyr1-0/+38
Expand MCC-MNC test cases: show that the CTRL interface currently does not preserve the third digit of the MNC if it is zero. These will be fixed by I8e722103344186fde118b26d8353db95a4581daa Change-Id: I5b097dbb6329f284e3b4914a744d5c3ad628f715
2017-12-19Remove unneeded .py scriptsMax1-5/+1
The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not BSC-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1
2017-11-24tests: Fix selection of python versionPau Espin Pedrol1-1/+1
According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb
2017-08-27Implement IuCS (large refactoring and addition)Neels Hofmeyr1-68/+0
osmo-nitb becomes osmo-msc add DIUCS debug log constant add iucs.[hc] add msc vty, remove nitb vty add libiudummy, to avoid linking Iu deps in tests Use new msc_tx_dtap() instead of gsm0808_submit_dtap() libmgcp: add mgcpgw client API bridge calls via mgcpgw Enable MSC specific CTRL commands, bsc_base_ctrl_cmds_install() still needs to be split up. Change-Id: I5b5b6a9678b458affa86800afb1ec726e66eed88
2017-08-27Use libvlr in libmsc (large refactoring)Harald Welte1-43/+3
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of trial-and-error development collapsed in one patch. This may be split in smaller commits if reviewers prefer that. If we can keep it as one, we have saved ourselves the additional separation work. SMS: The SQL based lookup of SMS for attached subscribers no longer works since the SQL database no longer has the subscriber data. Replace with a round-robin on the SMS recipient MSISDNs paired with a VLR subscriber RAM lookup whether the subscriber is currently attached. If there are many SMS for not-attached subscribers in the SMS database, this will become inefficient: a DB hit returns a pending SMS, the RAM lookup will reveal that the subscriber is not attached, after which the DB is hit for the next SMS. It would become more efficient e.g. by having an MSISDN based hash list for the VLR subscribers and by marking non-attached SMS recipients in the SMS database so that they can be excluded with the SQL query already. There is a sanity limit to do at most 100 db hits per attempt to find a pending SMS. So if there are more than 100 stored SMS waiting for their recipients to actually attach to the MSC, it may take more than one SMS queue trigger to deliver SMS for subscribers that are actually attached. This is not very beautiful, but is merely intended to carry us over to a time when we have a proper separate SMSC entity. Introduce gsm_subscriber_connection ref-counting in libmsc. Remove/Disable VTY and CTRL commands to create subscribers, which is now a task of the OsmoHLR. Adjust the python tests accordingly. Remove VTY cmd subscriber-keep-in-ram. Use OSMO_GSUP_PORT = 4222 instead of 2222. See I4222e21686c823985be8ff1f16b1182be8ad6175. So far use the LAC from conn->bts, will be replaced by conn->lac in Id3705236350d5f69e447046b0a764bbabc3d493c. Related: OS#1592 OS#1974 Change-Id: I639544a6cdda77a3aafc4e3446a55393f60e4050
2017-08-27move openbsc/* to repos rootNeels Hofmeyr1-0/+683
This is the first step in creating this repository from the legacy openbsc.git. Like all other Osmocom repositories, keep the autoconf and automake files in the repository root. openbsc.git has been the sole exception, which ends now. Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7