aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2014-08-09sysmobts: Add a unit test that checks of the behaviorHolger Hans Peter Freyther2-3/+78
We need to build a lot more code to be able to test these two new routines. I didn't want to move the code to a utils file as the check is called from a hot path. Add accessors to the inlined variant to be used by the unit test. While writing the unit tests I noticed that a re-transmission of the ciphering command would lead to an attempt to enable ciphering again. I am not sure that this MphConfig is idempotent.
2014-07-31sysmobts: Add testcase for ETSI/12.21 messageHolger Hans Peter Freyther2-0/+18
2014-07-31sysmobts: Extend the testcase for a Osmo message as wellHolger Hans Peter Freyther1-16/+36
2014-07-31sysmobts: Verify the structure of IPA and OML messagesHolger Hans Peter Freyther3-1/+79
Extend the router to verify that the message received is properly encoded. The code can deal with the basic structure of ETSI OML and vendor specific messages for ip.access and the osmocom project.
2014-07-31tests: Move the "pcu_direct" symbol into the stubs to be sharedHolger Hans Peter Freyther4-3/+1
2014-07-30sysmobts: Make it possible to slowly ramp up the output powerHolger Hans Peter Freyther2-1/+5
For systems with a bigger PA enabling the full output power at once might draw more current than a power supply can provide. This code will step up the output power in smaller steps to avoid this situation.
2014-05-22common: Ignore "si.valid" outside of _MAX_SYSINFO_TYPEHolger Hans Peter Freyther5-1/+74
Limit the range from 0 to (_MAX_SYSINFO_TYPE - 1) instead of 0 to 31. This way we will never access the lchan->si.buf[] out of bounds. This is only a theoretical issue though as the code filling the lchan->si.buf for the SACCH will not have valid >= _MAX_SYSINFO_TYPE. Add a small regression test to check we still schedule all SIs. Fixes: CID 1040765
2014-03-26oml: Indicate the kind of object passed as the void*Holger Hans Peter Freyther1-1/+1
These routines do not pass the gsm_abis_mo and parsing the FOM header of the msg does not seem to be a good idea either. Pass in the OML object so that the model code can determine what the void pointer is.
2014-03-10handover: Add generic handling for handoverAndreas Eversberg1-0/+2
The BTS layer needs to inform the handover code when an access burst has been received. In turn the handover layer will ask the bts to modify the channel, it will schedule the physical information inform the BSC with the HANDOVER DETECTION and waits for the BTS layer to inform it about the first received frame to stop a timer.
2014-03-10agch: Merge IMM.ASS.REJ if possible when enqueueingJacob Erlbeck1-2/+2
This patch implements merging of IMMEDIATE ASSIGN REJECT messages as suggested in GSM 08.58, 5.7. When a new IMM.ASS.REJ is to be appended to the AGCH queue and the last message in that queue is of the same type, the individual entries (up to 4 per message) of both messages are extracted, combined and stored back. If there are less than 5 entries, all entries fit into the old message and the new one is discarded. Otherwise, the old message will contain 4 entries and the remaining ones are stored into the new one which is then appended to the queue. Ticket: SYS#224 Sponsored-by: On-Waves ehf
2014-03-10agch: Manage AGCH queue lengthJacob Erlbeck2-1/+5
Currently, the AGCH queue length is not limited. This can lead to large delays and network malfunction if there are many IMM.ASS.REJ messages. This patch adds two features: - Don't accept msgs from the RSL layer when the queue is way too full (safety measure, mainly if bts_ccch_copy_msg() is not being called by the L1 layer, currently hard coded to 1000 messages) - Selectively drop IMM.ASS.REJ from the queue output depending on the queue length Ticket: SYS#224 Sponsored-by: On-Waves ehf
2014-03-10agch/pch: Use PCH for AGCH msgsJacob Erlbeck2-3/+16
This patch extends paging_gen_msg() by adding an output parameter is_empty that is true, if only a paging message with dummy entries has been placed into buffer. This feature is then used by bts_ccch_copy_msg() to insert an AGCH message if is_empty is true. Ticket: SYS#224 Sponsored-by: On-Waves ehf
2014-03-10agch/test: Add test for AGCH queue handlingJacob Erlbeck5-1/+282
The first test checks the AGCH may queue length computation. The second test fills the queue by calling bts_agch_enqueue() with a mix of IMM.ASS and IMM.ASS.REJ. Then it drains the queue by calling bts_ccch_copy_msg(). After each of both steps, statistics are printed out. Sponsored-by: On-Waves ehf
2014-01-15misc: Allow to cross-execute the testsuite using qemuHolger Hans Peter Freyther1-2/+2
When cross-compiling osmo-bts/osmo-pcu one can not easily execute the testsuite. By adding the OSMO_QEMU variable in front of the normal execution we can execute the tests. This should work for native and cross builds. $ OSMO_QEMU="qemu-arm -L /opt/poky/1.1.2/sysroots/armv5te-poky-linux-gnueabi/" make check
2013-11-27bts: Fix typos in the log messagesHolger Hans Peter Freyther2-2/+2
2013-10-10sysmobts: Fix the unit test after the internal band changesHolger Hans Peter Freyther1-4/+15
2013-10-06abis: delay l1if_reset() until OML link is establishedHarald Welte1-0/+3
2013-10-06migrate away from our own abis.c code to libosmoabisHarald Welte2-2/+2
libosmoabis has a BTS-side implementation of the IPA protocol for years, and osmo-bts should have used that all the time. Unfortunately it had its own local hack, this patch is migrating to the libosmocore implementation.
2013-06-24sysmobts: Introduce an auto-band config to ease DCS/DCS, PCS/PCS changesHolger Hans Peter Freyther4-1/+151
During development one switches from GSM900 to GSM1800 and GSM850 to GSM1900. This commit attempts to make this switch more easy. GSM1800 and GSM1900 have overlapping ARFCNs. This means that the mapping from bands to arfcn is not injective. Because of that I removed the code to deduce the band from the ARFCN. This was done in commit 8c3d807b3fc785ffb18aeb97355150c92221e8a0. The auto-band option allows to move between GSM900/GSM1800 and GSM850/GSM1900. Add a simple testcase with these auto-band configurations.
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer2-2/+2
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-02-27tests: Share the stub between the paging and ciphering testsHolger Hans Peter Freyther5-86/+50
2013-02-27sysmobts: Improve the shutdown of the DSP on exitHolger Hans Peter Freyther2-0/+4
Issue the RfDeactivate.REQ before sending the MphClose.REQ. Ideally we would issue MphClose.REQ after the RfDeactivate.CNF but this is not possible right now. The current approach makes the following warning of the DSP go away on shutdown. This was tested with my E71 and an active silent-call using a SDCCH. DSP Warning: [ERROR] : DeviceMng_ValidateL1Handle() => Invalid layer 1 handle
2012-12-26ciphering: Handle ciphering support for A5/3 correctlyHolger Hans Peter Freyther5-1/+146
This was found and debugged by Sylvain. The BTS will always support A5/0 so we do not keep track of that, the first bit of the flags is used for A5/1, second for A5/2... but for RSL there is an offset to go from RSL to A5(x). Add a testcase and change the code.
2012-12-26tests: Don't delete atconfig in cleanDaniel Willmann1-1/+1
This file is created in ./configure so we shouldn't remove it with make. Otherwise ./configure && make clean && make check fails with: make[3]: *** No rule to make target `atconfig', needed by `check-local'. Stop.
2012-12-22paging: Update the test output to make the test passHolger Hans Peter Freyther1-0/+1
2012-12-20openbsc: Prepare to allow to have the OpenBSC directory somewhere elseHolger Hans Peter Freyther1-1/+1
Right now osmo-bts requires access to one OpenBSC header file and this requires that openbsc and osmo-bts git are in the same directory. Begin with making the location of the OpenBSC sourcecode configurable. This approach will allow to build osmo-bts on our Jenkins installation but now has the risk of more code including the openbsc/*.h header files.
2012-07-26PCU: Removed -P option, so GPRS support is always enabledAndreas Eversberg1-1/+0
2012-07-25tests: Use the right name for the struct (not that it matters)Holger Hans Peter Freyther1-1/+1
2012-07-22add missing stub functions to ensure paging_test compilesHarald Welte1-0/+7
FIXME: hlayer1 and l1if function calls are not acceptable in src/common !
2012-07-21Send RR paging requests to PCU, in order to page on PACCHAndreas Eversberg1-0/+1
2012-07-08PCU: Add PCU socket interface to BTS.Andreas Eversberg1-0/+1
A special command line option "-P" is used to enable socket interface and signal available GPRS MO object to BSC.
2012-07-05paging: Update the unit test that would have caused the previousHolger Hans Peter Freyther1-0/+30
The unit test created and used the paging request in the same second and was passing because of that. Add a second test with a delay to force now to not be equal to the expiration time.
2011-12-01test: Introduce a very simple test for the paging subsystemHolger Hans Peter Freyther5-0/+185
Check that adding a paging command works, check that it is expired after the first call to paging_gen_msg. The test will be extended to test the scheduling and selection of the various paging messages.