aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/testsuite.at
AgeCommit message (Collapse)AuthorFilesLines
2017-03-16mgcp parsing, mgcp testNeels Hofmeyr1-0/+7
Change-Id: Ibe2ab17b3fa3a506a2e841ba979ea4175e3a21e8
2017-03-16vlr: get SMS working, by SMS recipient MSISDN round-robinNeels Hofmeyr1-0/+7
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. Change-Id: I1acf9debb6ba9164e6edcfd5bc5e48e8c98f2b01
2017-03-16msc_vlr tests: add tests to reject concurrenct connsNeels Hofmeyr1-0/+7
Change-Id: I5c04b1cf0ad302c35968e0f8dfb122997f3f7bf1
2017-03-16Add msc_vlr test suite for MSC+VLR end-to-end testsNeels Hofmeyr1-0/+56
Change-Id: Ic073f3a069a7f5e7e421e0e56140f069ee9b10b8
2017-03-16Use libvlr in libmsc (large refactoring)Neels Hofmeyr1-14/+0
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 development collapsed in one patch. The original history may still be available as branch neels/vlr_orig. TODO: This commit may be split in several smaller changes before merging to master. Related: OS#1592 Change-Id: I702ba504ce2de93507312c28eca8d11f09f4ee8b
2017-03-08add struct bsc_subscr, separating libbsc from gsm_subscriberNeels Hofmeyr1-0/+7
In a future commit, gsm_subscriber will be replaced by vlr_subscr, and it will not make sense to use vlr_subscr in libbsc. Thus we need a dedicated BSC subscriber: struct bsc_subscr. Add rf_policy arg to bsc_grace_paging_request() because the bsc_subscr will no longer have a backpointer to gsm_network (used to be via subscr->group). Create a separate logging filter for the new BSC subscriber. The implementation of adjusting the filter context is added in libbsc to not introduce bsc_subscr_get/_put() dependencies to libcommon. During Paging Response, fetch a bsc_subscr from the mobile identity, like we do for the gsm_subscriber. It looks like a duplication now, but will make sense for the VLR as well as for future MSC split patches. Naming: it was requested to not name the new struct bsc_sub, because 'sub' is too ambiguous. At the same time it would be fine to have 'bsc_sub_' as function prefix. Instead of struct bsc_subscriber and bsc_sub_ prefix, I decided to match both up as struct bsc_subscr and bsc_subscr_ function prefix. It's fast to type, relatively short, unambiguous, and the naming is consistent. Add bsc_subscr unit test. Related: OS#1592, OS#1594 Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e
2016-12-13oap_client_test: print test descr to stderr, check stderrNeels Hofmeyr1-1/+2
Related: OS#1592 Change-Id: If1696c8e7bfa696b250f7eac24f08f85f8f492a2
2016-12-13oap_test.c: rename to avoid clash with libosmocore oap_test.cNeels Hofmeyr1-2/+2
Rename to oap_client_test.c, which is also a more accurate name. Related: OS#1592 Change-Id: I3ca333141a15940df07a1ae77a30bc54885db41f
2016-11-01OML: Improve OML attribute handlingPhilipp1-0/+6
the OML attribute tables are hardcoded. To set variable parameters, the hardcoded data structure (tlv) is patched on byte level during runtime. This patch replaces this mechanism. - Replace hardcoded OML attribute tables with dynamically generated TLV structures. - Add unit tests to check if the OML attribute tables are generated correctly - Put OML attribute table generator code in a separate file: bts_ipaccess_nanobts_omlattr.c Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa
2016-09-30SGSN: Fixing build configPhilipp1-0/+4
Tests for V.42bis, slhc, llc-xid and sndcp-xid are built and executed on all build configurations, but are only needed when the sgsn (gprs) is built. This patch adds conditions check if the tests mentioned abvove are needed or not. Change-Id: I6921e6198ea7f99fe5276f91cbc522091853bc4e
2016-09-24V.42bis: integration and unit testPhilipp1-0/+6
- Edit previously committed V.42bis implementation to function outside IAXmodem. - Add unit test to verify the correct function of V.42bis Change-Id: I689413f2541b6def0625ce6bd96f1f488f05f99d
2016-09-24RFC1144: integration and unit-testPhilipp1-0/+5
The previously pushed slhc implementation has been modified to compile and function outside of the kernel. Also debug log messages were added and datatypes ware matched. The implementation is now ready to be used Change-Id: I7a638e88a43b3eb9d006751a03ef2570e36613f0
2016-09-24SNDCP: add SNDCP-XID encoder/decoder and unit testPhilipp1-0/+7
The SNDCP-XID (or layer-3 xid) is used to exchange layer-3 parameters such as compression. The encoder encodes a bytestream that is then sent as regular XID field from LLC. We will need the SNDCP-XID to negotiate the parameters for our upcomming GPRS data and header compression features Change-Id: If2d63fe2550864cafef3156b1dc0629037c49c1e
2016-08-27Adding LLC-XID encoder / decoder and unit testPhilipp1-0/+5
The lle-xid encoder/decoder is needed to encode and decode llc xid parameter messages. We need this to exchange sndcp-parameters (SNDCP-XID) and also simple parameters such as encryption IOVs Change-Id: Ia06e4cb08bf9b48c2a4682606d1b1a91d19a9d37
2016-03-31Add MM Auth test; add auth_action_str() functionNeels Hofmeyr1-0/+7
Add basic MM Authentication test setup, with fake DB access and RAND_bytes(). So far implement simple tests for IO error during DB access and missing auth entry. To print the auth action during tests, add struct auth_action_names and auth_action_str() inline function in auth.[hc].
2015-11-16Add GTP hub initial code base.Neels Hofmeyr1-0/+7
First steps towards a new GTP hub. The aim is to mux GTP connections, so that multiple SGSN <--> GGSN links can pass through a single point. Background: allow having more than one SGSN, possibly in various remote locations. The recent addition of OAP to GSUP is related to the same background idea. (This is a collapsed patch of various changes that do not make sense to review in chronological order anymore, since a lot of it has thorougly transmorphed after it was first committed.) Sponsored-by: On-Waves ehf
2015-11-02oap: add oap testsuite skeletonNeels Hofmeyr1-0/+7
Sponsored-by: On-Waves ehf
2014-12-05bsc/test: Add tests for gsm_subscriber baseJacob Erlbeck1-0/+6
This commit adds test for the generic part of gsm_subscriber like reference counting and flag usage. Sponsored-by: On-Waves ehf
2014-10-09sgsn: Add boilerplate code for a SGSN testHolger Hans Peter Freyther1-0/+7
2014-06-05mgcp/test: Add test cases for transcoding and repackingJacob Erlbeck1-0/+7
This patch adds test cases for transcoding and repacking. Sponsored-by: On-Waves ehf
2014-04-30db: Add testcase for the db migration.Holger Hans Peter Freyther1-1/+3
2014-01-16si/test: Merge si tests into gsm48 testsJacob Erlbeck1-6/+0
Currently tests covering features of the GSM 04.08 specification are spread over the si and gsm0408 subdirs in tests. This commit merges all tests from 'si' into 'gsm0408' and removes the 'si' test sub-directory. Sponsored-by: On-Waves ehf
2013-12-19Add EFR support to TRAU muxer + test caseAndreas Eversberg1-0/+6
Decoding and encoding of FR and EFR TRAU frames are put into seperate functions. CRC check is done to detect bad EFR TRAU frames. The test case includes FR and EFR transcoding. EFR support was tested with Nokia InSite BTS and Siemens BS11.
2013-10-15gbproxy: Add test program to test gbproxy message handlingJacob Erlbeck1-0/+6
This program tests the gbproxy implementation by passing NS messages to a modified gbproxy that dumps the resulting messages, signals, and state. It focusses on testing abnormal situations like port changes. Ticket: OW#874 Sponsored-by: On-Waves ehf
2013-09-19bsc/mminfo: Patch timezone and DST in MM Info messagesJacob Erlbeck1-0/+7
This adds in-place patching of the time information in the MM INFORMATION message. The timezone in the 'Local time zone' and the 'Universal time and local time zone' information elements and the offset in the 'Network Daylight Saving Time' information element are optionally set. The new values are determined by the 'timezone' vty command in the config_net_bts node. That command is extended by an optional DST offset parameter. Tests are provided for the vty part and for the plain bsc_scan_msc_msg() function. Sponsored-by: On-Waves ehf Ticket: OW#978
2013-07-31nat: Allow to use the prefix lookup to rewrite numbersHolger Hans Peter Freyther1-0/+1
* Increase the rewritten rule to five digits (this is the easiest for the unit test). This will add another 40kb to the runtime size. * Create a unit test that tests adding and removing the prefix rules. * Use the regexp match to replace from one package
2013-07-31nat: Introduce a prefix lookup tree (trie) for number rewritingHolger Hans Peter Freyther1-0/+8
* It is a trie. The max depth of the trie is the length of the longest prefix. The lookup is O(lookuped_prefix), but as the prefix length is limited, the lookup time is constant. * Each node can hold the entire prefix, has place for the rewrite rule with up to three digits. * A trie with 20k entries will take about 3MB ram. * Filling the trie 100 times takes ~800ms on my i7 laptop * 10.000.000 lookups take 315ms.. (for the same prefix). * 93/99 lines are tested, 6/6 functions are tested, 49 of 54 branches are tested. Only memory allocation failures are not covered * A late addition is to handle the '+' sign and to increase the number of chars in the rewrite prefix. The timing/line coverage has not been updated after this change.
2013-07-27smpp: Move the coding/mode detection into a utils fileHolger Hans Peter Freyther1-0/+8
Make sure to not ever have issues with this code again, move the utility code to a new file and create a basic testcase. The method currently has 100% line and branch coverage. My initial patched missed the smpp_utils.c file and I re-did the copying (and verifying the branch coverage)
2013-01-07nat: Introduce a global IMSI barr list using red-black treesHolger Hans Peter Freyther1-0/+2
2012-12-19abis: Create a routine that can parse all SW Descriptions of a SW ConfigHolger Hans Peter Freyther1-0/+6
Be able to parse the entire SW Config IE. Parse the SW Descruption into a struct provided by the caller.
2012-10-22si: Partially implement the range encoding for the SI.Holger Hans Peter Freyther1-0/+6
I saw the old copy of the "Appendix J" code too late and I have discovered some quirks and I am more familar with my implementation. Most noticable 'w' only needs to be as big as the input arfcn but requires the 'w' to be initialized. The power_of_2 implementation differs as well (mine matches the output of wirehsark). The f0 could be chosen in a better way but right now picking the lower bound is the easiest. It is not clear if to use modulo if the range is chosen in the middle. This can be improved in the future. Right now I have no bit fiddling for range128, 256 and 1024 as I was running out of time.
2012-01-09tests: Use atlocal/atlocal.in to enable/disable the NAT testHolger Hans Peter Freyther1-2/+2
Kill the hacking, use atlocal to remember if the NAT test should be enabled and then skip the test (exit with 77).
2012-01-06tests: Introduce running tests with GNU autotest in OpenBSCHolger Hans Peter Freyther1-0/+39
The quality of the tests is of different value but it is good to get started and improve from here.