path: root/openbsc/tests/ctrl_test_runner.py
AgeCommit message (Collapse)AuthorFilesLines
2017-08-27move openbsc/* to repos rootNeels Hofmeyr1-683/+0
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
2017-05-08Use ipa.py for ctrl testsMax1-16/+8
Remove duplicated code and make sure that python code is actively used as part of test harness Change-Id: I676390abe2f179df6004cdd33d0eaaf60e18df03
2017-03-20python tests: allow running from separate build dirNeels Hofmeyr1-1/+2
The VTY tests assume that $top_builddir == $top_srcdir. Use the script's location from sys.path[0] to find the correct locations of example configs even when building in another directory. Change-Id: I2731f361e3b72d0980968e6cf83594ea450db7c2
2017-02-28ctrl_test_runner: speed up more than 10 fold by sleeping lessNeels Hofmeyr1-3/+13
Similar to a recent patch in osmo-python-tests for VTY based tests, but this is for the Ctrl tests. The TestCtrlBase tests gave a constant sleep(2) grace period for the process to startup. This causes tests to take minutes for no reason at all. Add code to TestCtrlBase to try and connect right away, retrying up to three seconds in .1 second intervals. This flies through most tests without any sleep() at all. Change-Id: I06569767153838bd9cd3edac001df5f6c567874c
2017-02-25python tests: remove process 'Launch' message, now at osmoutilNeels Hofmeyr1-1/+0
Change-Id: Id8eb70ddfdc1d0d9f90aa5343a4ea522042c34ee
2017-01-25CTRL: remove boilerplateMax1-4/+4
Use CTRL_CMD_DEFINE_RO(), CTRL_CMD_DEFINE_WO() and CTRL_CMD_DEFINE_WO_NOVRF() where appropriate to get rid of boilerplate code. Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b
2016-12-02Move timezone settings up to network levelNeels Hofmeyr1-15/+15
Time zone used to be configurable per-BTS. In the upcoming MSC-split, no BTS structures will be available on the MSC level. To simplify, drop the ability to manage several time zones in a core network and place the time zone config on the network VTY level, i.e. in gsm_network. If we are going to re-add fine grained time zone settings, it should probably be tied to the LAC. Adjust time zone VTY config code (to be moved to libcommon-cs in subsequent commit). Adjust time zone Ctrl Interface code. Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8
2016-07-24fix ctrl test: dyn TS: use new GSM_PCHAN_TCH_F_TCH_H_PDCHNeels Hofmeyr1-1/+4
Add GSM_PCHAN_TCH_F_TCH_H_PDCH in gsm_pchant_names and gsm_pchant_descs: the VTY and CTRL can now handle the new pchan type. Adjust the CTRL iface test to expect the new PCHAN type in the output. Fixes make check with --enable-external-tests after libosmocore commit fd80f5a04239c2ab7b561401476dd89f2861748b that adds GSM_PCHAN_TCH_F_TCH_H_PDCH. Change-Id: I4ad9c972d7f76f7e20cf74d6fc3d1928b644a4f8
2016-04-07ctrl: Extend ctrl command to optionally handle alg+kiHolger Hans Peter Freyther1-0/+27
Extend the existing ctrl command to be able to specify the algorithm and Ki. In contrast to the VTY no size check is done. Together with the VTY this code only supports a small part of what is supported by libosmocore. The algorithm and ki are considered optional but if a valid algorithm other than "none" is passed, a KI must be passed as well. Extend the test coverage by passing the potential values. It is not verified that the KI/algorithm is stored.
2015-04-05nat: Add a ctrl command to add to an existing ACC listHolger Hans Peter Freyther1-0/+12
We want to have a program add entries to the allow list this can be done using: $ bsc_control.py -d localhost -p 4250 -s net.0.add.allow.access-list.NAME "^IMSI$"
2015-02-10ctrl: Implement a global result for rf_lockedopenbsc/0.14.0Holger Hans Peter Freyther1-0/+10
Create a one stop command to give a statement for the entire network. This can be used to check the policy and the state of the entire network.
2015-02-10ctrl: Add a command to check how many bts are configuredHolger Hans Peter Freyther1-0/+6
This can be used to query how many bts are configured to check if all of them are locked or not.
2015-01-31bsc/nitb: Allow to set the GPRS mode through the ctrl commandHolger Hans Peter Freyther1-0/+19
Create a control command to read and modify the gprs mode. Use the get_string_value to indicate if the value was found or not. This is useful for the ctrl interface where I didn't want to replicate "none", "gprs" and "egprs". Share code to verify that a BTS supports the mode. Related: SYS#591
2015-01-31ctrl/bsc: Fix copy and paste error and update textHolger Hans Peter Freyther1-1/+1
30f1f376383df3ae8d85e96542bf14d174c25d89 introduced new channel combinations but had a copy and paste error in the description. The jenkins system didn't run the external tests so this issue and others were not noticed until now. Fix the copy and paste and update the test result.
2014-12-09nat: Fix copy and paste in the test codeHolger Hans Peter Freyther1-2/+2
The test didn't test that the access-list has been properly removed. Fix the test to only remove the list once and verify that it is gone.
2014-12-05ctrl: Allow to query if the OML link is connected or notHolger Hans Peter Freyther1-0/+11
Related: SYS#798
2014-12-05ctrl: Add command to get the current load of a BTSHolger Hans Peter Freyther1-0/+10
Add a command and test to see the current channel load and available channels per BTS. Related: SYS#798
2014-11-21bsc: Add ctrl command to set the TRX ARFCNHolger Hans Peter Freyther1-0/+20
2014-11-21bsc: Allow to generate new system information onlineHolger Hans Peter Freyther1-0/+10
Increase the bcch_change_mark and generate a new copy of the system information. Make the method public, add a small test case. Manually verified using the FakeBTS. I don't know if the MS will re-read these SIs. Related: SYS#739
2014-11-21bsc: Allow to set the call-identityHolger Hans Peter Freyther1-0/+20
Allow to set the cell-identity through the control interface and add a small test for it. Related: SYS#739
2014-11-21bsc: Allow to apply configuration for an individual BTSHolger Hans Peter Freyther1-0/+9
This will drop a specific IP based BTS. It will lead to a re-connect of the BTS and the new settings will be applied then. Fixes: SYS#737
2014-11-10bts: Allow to set the LAC through the CTRL interfaceHolger Hans Peter Freyther1-0/+20
Allow to set the LAC of the BTS through the CTRL interface. The change will not be effective immediately. Fixes: SYS#738
2014-04-24ctrl: Extend the testcase for using '09' as numbers on the interfaceHolger Hans Peter Freyther1-0/+43
Verify that '0X' numbers are parsed correctly from the wire interface.
2014-03-23sgsn/ctrl: Add ctrl interface, implement listing subscribersHolger Hans Peter Freyther1-0/+23
Add the control interface with no hierachy right now and implement the first command to list IMSI + Context Address of active sessions. sgsn_cmd_handle could share more code with bsc variant. Fixes: SYS#264, SYS#265
2014-03-23nitb/ctrl: Implement a command to list all active subscribersHolger Hans Peter Freyther1-0/+7
This is only useful for small networks. List the IMSI and MSISDN of all active subscribers. Fixes: SYS#266
2014-03-23nitb/ctrl: Implement creating and deleting subscribersHolger Hans Peter Freyther1-1/+9
Sadly there is no proper foreign key relationship on the tables that related to the Subscriber. This means we can't use a DELETE with Cascade and need to delete everything by hand. To make things worse maybe the SMS/Paging code is still using the subscriber making the operation more dangerous. I had added NULL checks for sender_id/receiver_id at 30C3 so we should not crash in this situation. Fixes: SYS#274
2014-03-23nitb/ctrl: Add command to add/modify a subscriber to the databaseHolger Hans Peter Freyther1-0/+32
The test has been manually verified. Executing the select for the subscribers showed: sqlite> select * from Subscriber; 1|2014-03-23 12:12:46|2014-03-23 12:19:09|2620345||445567|1||0| This created a subscriber with the right IMSI, MSISDN and has it authorized. Fixes: SYS#275
2014-03-23nitb/ctrl: Add ctrl command to set the TRX max_power_reductionHolger Hans Peter Freyther1-0/+20
In case the BTS is connected the new attribute should be set through OML. This is left as a todo item. Addresses: SYS#267
2014-03-06nat: Add CTRL command test case for the new control commandsHolger Hans Peter Freyther1-2/+48
2014-03-04libbsc: Add command to set MNC/MCC and apply it if something changedHolger Hans Peter Freyther1-1/+45
Change the splitting of the ctrl_test_runner.py. Make sure that we get one element and all the rest.
2013-10-01bsc: Add control command to set timezoneJacob Erlbeck1-0/+38
This adds a per BTS control command 'timezone' which expects a value of the format '<hours>,<mins>,<dst>' or 'off' to set the value of bts->tz. It has the same functionality like the existing VTY command 'timezone' in network/bts. Sponsored-by: On-Waves ehf Ticket: OW#978
2013-09-16ctrl: Set a generic reply when it hasn'n been setJacob Erlbeck1-0/+4
When verification failed and the reply string was not updated, the message "Someone forgot to fill in the reply." was shown instead of the default "Value failed verification." message. This patch changes the default reply handling in ctrl_cmd_handle() by setting the reply to NULL initially and then checking it at the end. If it hasn't been set, a generic message is assigned and an error is logged.
2013-09-16ctrl: Add test script for the BSC control interfaceJacob Erlbeck1-0/+239
This script is similar to vty_test_runner.py but tests the control interface instead. It currently tests some error cases, BTS status queries, and setting/clearing rf_locked.