aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
AgeCommit message (Collapse)AuthorFilesLines
2012-03-26nat: Add another test case for TP-SRR clearing and number rewriteHolger Hans Peter Freyther2-3/+42
2012-03-16mgcp: implement a more tolerant parser based on strtok_r()Harald Welte1-2/+0
Instead of building complex manual byte-wise parsers, we simply use two strtok_r loops: one iterating over all the lines, the next one iterating over the invididual space-separated elements in the first line. The benefit is that we now accept \r, \n or \r\n, or any multiple of them as line ending. This works around incompliant MGCP implementations like that of Zynetix MSC. Addition: mgcp_analyze_header returns 0 when all out parameters have been set. Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2012-03-16mgcp_test: Add wrong messages as input and check what happensHolger Hans Peter Freyther2-2/+30
Test parsing some invalid messages and see if we start to crash.
2012-03-16mgcp_test: Rename method as it now operates on an array of messagesHolger Hans Peter Freyther1-2/+2
This code was cleaned up, catch up and rename the method.
2012-01-27MGCP: Add CRCX test casesHarald Welte1-0/+29
The second test case (CRCX_ZYN) fails as the message is not compliant with the spec. However, our parer should be more tolerant, just in case...
2012-01-27further generalize mgcp testing codeHarald Welte1-19/+30
use a data-structure driven approach
2012-01-27mgcp_test: remove duplicate codeHarald Welte1-13/+6
2012-01-18nat: Internationalize the TP-DA if it starts with a 00Holger Hans Peter Freyther1-4/+4
Internationalize the number like we do it for Call Control. Update the test result to match this new behavior.
2012-01-18nat: Prepare to rewrite the TP-DA number of a SMS submit.Holger Hans Peter Freyther3-2/+56
Introduce number rewriting of SMS-SUBMIT. Introduce a new list, move code around to help with finding a new number, somehow the number encoding for TP-DA is borked, 03.40 references 04.11 but the length appears to be strlen(number) without taken the type field into account.
2012-01-18nat: Print the sizes and the offending data in case of a failureHolger Hans Peter Freyther1-1/+5
2012-01-15nat: Add the bsc_data.c file to the EXTRA_DISTHolger Hans Peter Freyther1-1/+1
2012-01-15abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflagsHolger Hans Peter Freyther2-2/+2
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same time as we only build .a archives.
2012-01-10nat: Implement clearing of TP-SRR flags from TPDUsHolger Hans Peter Freyther3-3/+67
Match IMSI and destination address against a set of entries, if it is matching the header will be modified and no sender report will be requested. Change the test case to request the sender report and then verify that this bit is reset to 0.
2012-01-10nat: Reduce copy and paste in the test, create a verify_msgHolger Hans Peter Freyther1-50/+23
2012-01-10nat: Use the link_id from the original message in the new DTAP messageHolger Hans Peter Freyther1-1/+1
SMS went from SAPI=3 to SAPI=0 and nobody notices on the NAT->MSC direction.
2012-01-09tests: Use atlocal/atlocal.in to enable/disable the NAT testHolger Hans Peter Freyther3-7/+4
Kill the hacking, use atlocal to remember if the NAT test should be enabled and then skip the test (exit with 77).
2012-01-09Revert "tests: Make the test setup more abusive to fix the build"Holger Hans Peter Freyther1-7/+5
This reverts commit 41b42c72294d181217bae59e37ddf50c490df17f.
2012-01-09tests: Make the test setup more abusive to fix the buildHolger Hans Peter Freyther1-5/+7
Paolo says I will need to use atconfig/atlocal, need to read up on it first though.
2012-01-06gprs: Honor GSM 04.64 8.4.2 Receipt of unacknowledged informationHolger Hans Peter Freyther4-1/+76
GSM 04.64 8.4.2 asks to ignore UI frames if the DLCI is not known, or if the "(V(UR)- 32) <= N(U) < V(UR)". E.g. if we want to have V(UR) == 511 and this frame is dropped, we would ignore N(U)'s 0 to 510. Calculate the delta. The code is based on Jonathan Santos's "LLC UI window" fix but the issue was discovered independly.
2012-01-06tests: Introduce running tests with GNU autotest in OpenBSCHolger Hans Peter Freyther12-1/+126
The quality of the tests is of different value but it is good to get started and improve from here.
2012-01-06mgcp: Print message when the test is finishedHolger Hans Peter Freyther1-2/+8
2012-01-06gsm0408: Print message when the test is doneHolger Hans Peter Freyther1-1/+2
2012-01-06db: Fix the test codeHolger Hans Peter Freyther1-14/+27
* Initialize logging * use a dummy net before calling subcr_put as the keep in ram option is going to be set.
2012-01-06channel: Make the test not crash again.Holger Hans Peter Freyther1-4/+15
* Initialize logging * The callback expects NULL or a subscriber connection
2012-01-06nat: Log test output stdout using printf in prep for GNU autotestHolger Hans Peter Freyther1-78/+97
2011-08-22misc: Move the bsc_parse_reg to libcommom and name it gsm_parse_regHolger Hans Peter Freyther1-3/+3
Move the regexp parsing code from the NAT to libcommon as it will be used by the NAT and BSC code. This also adds the #include <regex.h> include to gsm_data. This header should be split up.
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso2-6/+7
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.
2011-06-30misc: Link to libosmogsm after adding our static librariesHolger Hans Peter Freyther1-2/+2
GCC 4.6.0 and LD.BFD 2.21 on ARM somehow fail to resolve the dbi symbols when we have the library in front of the static libraries, move them to the back. Without this patch the tlv_def_patch symbol and the gsm48_construct_ra.
2011-06-30misc: Link to -ldbi after adding our static librariesHolger Hans Peter Freyther1-2/+2
GCC 4.6.0 and LD.BFD 2.21 on ARM somehow fail to resolve the dbi symbols when we have the library in front of the static libraries, move them to the back.
2011-06-27update debug_test with logging system changesHarald Welte1-1/+1
Thanks to Konrad Meier
2011-06-26make channel_test build againHarald Welte1-1/+1
2011-06-01nat: Look into the TPDU/SMS-SUBMIT and use the TP-DestAddress for matchesHolger Hans Peter Freyther1-9/+17
Match the used SMSC and the destination of the SMS and change the SMSC address if both are matched.
2011-06-01nat: Patch the destination SMS address of a messageHolger Hans Peter Freyther2-3/+69
Use the same filtering infrasturcture to patch the SMSC address in a CP-DATA/RP-DATA message. Add a very simple testcase for this code.
2011-06-01nat: Prepare to patch more than the CC Setup messageHolger Hans Peter Freyther1-4/+4
Refactor the code to allow having different handlers. The goal is to be able to patch some SMS messages too.
2011-06-01nat: Allow to have a regexp to match the MSISDNHolger Hans Peter Freyther1-1/+3
The idea that MCC and MNC is enough to classify a subscriber turns out to be wrong. Certain operatos license a number range of IMSIs to others. When we see a '^' in the MCC field we treat it as a regexp. The code now turns the MCC/MNC into a regexp for the IMSI. It is not using extended POSIX regexp to match the behavior of the access list.
2011-05-12misc: Use the osmo_init code for signals and loggingHolger Hans Peter Freyther2-11/+4
Use the libosmocore code to ignore certain signals by default (e.g. SIGHUP, SIGPIPE) and use the new code to create a default stderr logging target and initialize it properly.
2011-05-07src: rename msg_entr* to osmo_config_*Pablo Neira Ayuso1-2/+2
Summary of changes: s/msg_entry_parse/osmo_config_list_parse/g s/msg_entry/osmo_config_entry/g s/msg_entries/osmo_config_list/g
2011-05-07src: use namespace prefix osmo_* for misc utilsPablo Neira Ayuso2-6/+6
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-06src: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso1-1/+1
Summary of changes: s/struct bsc_fd/struct osmo_fd/g s/bsc_register_fd/osmo_fd_register/g s/bsc_unregister_fd/osmo_fd_unregister/g s/bsc_select_main/osmo_select_main/g
2011-05-02nat: Rewrite the paging handling.Holger Hans Peter Freyther1-20/+3
The current code tries to find _one_ bsc for a paging message and then continues. The new code will try to find multiple BSCs for each LAC. This is done in preparation of having two BSCs handle the same LAC. This code right now is O(m*n) but it will be worse once paging groups are landed. The code to test the function was reduced to just test the lac lookup code as the other part can not be tested in a standalone setup anymore.
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-3/+3
This was done with sed on the files.
2011-04-04nat: Bail out if the regexp fails to compile and avoid a crashHolger Hans Peter Freyther1-6/+9
If the regexp fails to compile the internal dfa is NULL and a regexec will crash nicely. Fail and free the string if the regexp fails to compile.
2011-03-26tests: fix bsc-nat testPablo Neira Ayuso2-4/+4
In 136f453dd2492b95004461a33c90b11732f33bd8, I forgot to update the new header path in the test/bsc-nat files (this happened to me because I forgot to configured openBSC without --enable-nat).
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso5-8/+8
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-05Fix Makefile.am for builddir != srcdir0.9.13Harald Welte1-1/+1
2011-03-04Fix build of bsc-nat testHarald Welte1-8/+10
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte5-19/+25
... and make sure tests work again after restructuring
2011-02-28mgcp: Fix make distcheck due a copy 'n pasted Makefile.amHolger Hans Peter Freyther1-2/+0
2011-02-28mgcp: Allocate the endpoints for the E1 trunks as well.Holger Hans Peter Freyther1-1/+4
2011-02-28mgcp: Introduce a mgcp_trunk_config enum for endpoint configsHolger Hans Peter Freyther2-3/+3
We want to support real trunks in the MGCP code and we need to have some better book keeping for those. Move the code around.