AgeCommit message (Collapse)AuthorFilesLines allow to skip the configuration file parameterlynxis/specify_specific_testsAlexander Couzens1-1/+1
Allows to use the default configuration file while setting a specific test case. Change-Id: I6b318aea9e1f8b23c283d08e7b06f055fc907cdd remove superflouse `set -e`Alexander Couzens1-1/+0
The set -e will not interfere with the next command, as it's executed and not included. The exit code of the last command is returned with and without -e. Change-Id: I820d59b29b4ba4a1d094c5c2a2af367e6ef4e5b6
2019-05-11add three tests for CIPHER MODE COMPLETE without algoStefan Sperling4-3/+120
Add three tests which exercise MSC behaviour when a CIPHER MODE COMPLETE command lacks the optional chosenEncryptionAlgorithm IE. Check for behaviour with A5/1, A5/3, and A5/1 + A5/3 configured in the network, and expect the location update to succeed. These tests pass on master, but they should somehow verify the cipher the MSC ends up using. I am not quite sure how to do that. Would inspecting the MSC's VTY be a reasonable approach? How could his be done by code which runs on BSC_ConnectionHandler? Change-Id: I1a2a126795c544613a7a87e238e1fc8c4e943885 Related: OS#2872
2019-05-11msc: Add a test for LU with invalid MCC/MNC in BSSAP/RANAPHarald Welte2-0/+43
Verify that the MSC rejects a location update from a Cell/BSC that contains a PLMN which does not match the core network's PLMN. Related: OS#3162 Change-Id: I676894358259b9cc0f973769ce552ba58a2a58a1
2019-05-11msc: Separate as_GSUP_SAI from f_mm_authHarald Welte1-19/+24
In some cases we might want to match on (and perform) the GSUP SEND AUTH INFO without also expecting/performing a MM authentication on the Iu/A interface. Hence it makes sense to split those two. Change-Id: I7b298d589930bab976b478ac84553a6352f25c93
2019-05-11Fix regression in tr_GSUP_PROC_SS_ERR during inter-MSC-hoHarald Welte1-1/+1
In Change-Id I7d76c982ad4e198534fa488609c41e8892b268ab we merged various changes to GSUP_Templates.ttcn, mostly related to adding the tr_GSUP_IE_Message_Class IE. In most caes, the specified MessageClass is correct. However in tr_GSUP_PROC_SS_ERR we accidentially used OSMO_GSUP_MESSAGE_CLASS_SMS instead of OSMO_GSUP_MESSAGE_CLASS_USSD. This makes TC_lu_and_ss_session_timeout pass again. Change-Id: I04fa1be24ec63ed1eb767a33de0297722b4366f1
2019-05-11Make f_gen_tr_ss_ies() work for both 'latest' and 'master'Harald Welte1-1/+9
This fixes the partial revert of c43c8cd275b4f71b0bc6a50fc81564c812d5b406 to work for both situtions: Messages that have the OSMO_GSUP_MESSAGE_CLASS_USSD and messages that don't. The particular implementation is rather ugly, but we're waiting for a response to on how to solve this kind of problem in a more elegant way. Meanwile, we make it work first. Change-Id: Ibf137de6a41aaa43894cc0b6da8341ceb88b0756
2019-05-11BSSGP_Emulation: More/improved commentsHarald Welte1-1/+3
Change-Id: I04250667a498f3f00d4fbb4cd22a4f7b71e2bba1
2019-05-11SGSN_Tests: add test case TC_attach_pdp_act_gmm_detachAlexander Couzens1-0/+26
MS -> SGSN: Attach Request MS <-> SGSN: [..] MS -> SGSN: Attach Complete MS -> SGSN: PDP Activate Request MS <- SGSN: PDP Activate Accept MS -> SGSN: GMM Detach Request MS <- SGSN: GMM Detach Accept Related-to: OS#1881 Change-Id: Ibafbbb8ed99357d1e2e13d576b2624939388e85b
2019-05-11SGSN_Tests: fail when receiving any layer 3 package for a power off stationAlexander Couzens1-0/+4
Change-Id: I27d798c1866ed7ae9b03b9c0ffdd7400431551f9
2019-05-11SGSN_Tests: correct verdict failure message in f_detach_mo()Alexander Couzens1-1/+1
Change-Id: I5c03ef7dd7486025d35d4482a7fe150dd36de907
2019-05-11SGSN_Tests: fix regression in f_send_l3_gmm_llc() which breaks TC_attach_rau_a_bAlexander Couzens1-1/+1
The gb_index was forgotten to given to the new function f_send_l3(). All testcases which only used the default BSSGB connection #0 continued to work, but the TC_attach_rau_a_b is the only testcase which uses #0 and #1 at the same time. Fixes: a05b80792266 ("sgsn: Add TC_llc_null to test if SGSN survives a LLC NULL packet") Change-Id: Ie3dd8c613d3b3440447a282dc4545078cb927274
2019-05-10Revert partial of 0ac6315212a3 ("msc: add inter-BSC and inter-MSC Handover ↵Alexander Couzens1-6/+0
tests") Commit 0ac6315212a breaks all related GSUP SS tests because it require all GSUP SS packages to have a OSMO_GSUP_MESSAGE_CLASS_USSD IE. Change-Id: Iadbc37105fa67cf6383fb63b86ed653ccc7bddf7
2019-05-10BSSGP_Emulation: Implement LLC sending also for SGSN-roleHarald Welte1-1/+8
We used to support sending of LLC messages only for the MS role, where we generated BSSGP UL UNITDATA. Let's also support the SGSN role, where we have to generate BSSGP DL UNITDATA Change-Id: If86f4b7c9e7c3c799c274f37a350dec4a788f124
2019-05-10BSSGP_Emulation: Pass uplink L3 to BSSGP Uplink UnitdataHarald Welte1-0/+8
Change-Id: I71c19cd0f11927eb70667210a4ba1ee5873fd534
2019-05-10BSSGP_Emulation: Fix transmission of MT L3 in LLC/BSSGPHarald Welte1-1/+1
it seems that some part of the code was commented out, breaking the path where a ConnHdlr is sending a L3 MT message. Change-Id: Ie652598292f2fbd2e1e0c4aa679ff0d68d78c88c
2019-05-10SGSN_Tests: Introduce NUM_GB to avoid '3' as magic valueHarald Welte1-3/+4
Change-Id: I28b7dd26c5c129ec41c6349de9ddc9ef0ffee8ac
2019-05-10SGSN_Tests: Make more helper functions gb_index awareHarald Welte1-23/+32
The gb_index indicates through which Gb link (simulated RAN/PCU) a given message shall be sent. Change-Id: I3825634f581897f6951d9673984f138e977cc7ac
2019-05-10SGSN_Tests: Make f_gmm_attach() and f_gmm_auth() work on gb_idx != 0Harald Welte1-19/+31
Let's make sure the related functions can be used on other gb_idx, i.e. via another Gb interface (and hence simulated RAN/PCU) than the first one. Change-Id: Ie88cbf0c70269cc3e2c2fd2a0c65c8f2130ec2b1
2019-05-10library: Add PAP_Types for PPP Authentication Protocol (RFC 1334)Harald Welte1-0/+90
Change-Id: I31cb766bb701b8107df5de978d2b0b085977045a
2019-05-10ggsn: Verify that there are no duplicate PCO protocolIDsHarald Welte1-0/+37
Introduce a function to verify there's no duplicate ProtocolIDs in the PCO returned from the GGSN. Change-Id: I9d439dab1696196cd125f4d7113b426f1711a405 Related: OS#3914
2019-05-10RAN_Emulation: Fix IMSI table lookup on RANAP pagingHarald Welte1-1/+1
We need to check explicitly for '== null'. isvalue() is of no help here, as 'null' apparently is a value in TTCN-3. Change-Id: I4b2793937a201c5535051092d871ded6cb053f5f
2019-05-09msc: Permit optional authentication before reject/timeoutHarald Welte1-0/+3
Tests like TC_lu_imsi_reject, TC_lu_imsi_timeout_gsup and TC_cmserv_imsi_unknown all expected a reject straight in response to the LU REQ / CM SERV REQ. However, the MSC may very well decide to perform authentication beforehand. It's an implementation detail when a MSC/VLR performs authentication, so the tests should be tolerant to this. This primarily shows up in 3G/Iu/RANAP related tests, as authentication is mandatory there. Change-Id: Icdd3f34eca08092703ab2ba9a8e755e2d609a59b
2019-05-09msc: Don't require protocolExtensions in RANAP PagingHarald Welte2-4/+4
We were using '?' for the protocolExtensions in RANAP messages, which required that such extensions existed. In reality, we want to use '*' which accepts paging messages whether or not there are any protocolExtensions present. As this is the default in all our RANAP receive template, callers don't even need to specify it. This should fix all Iu paging related test failures in MSC_Tests*.ttcn Change-Id: If22e16ecb301c86b9073ffde0af9e03bc85fbcc7
2019-05-09msc: add inter-BSC and inter-MSC Handover testsNeels Hofmeyr6-92/+1015
Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab
2019-05-07msc: mo and mt voice call tests: add lots of missing partsNeels Hofmeyr5-90/+228
Both f_mo_call_establish() and f_mt_call_establish() were testing barely half a voice call setup. For example, f_mo_call_establish() used to be satisfied with just two CRCX, but no actual RTP connections being made. Add numerous MNCC and MGCP messages more closely resembling an actual call. The main reason is to achieve a state that passes both current osmo-msc master as well as the upcoming inter-MSC Handover refactoring. Add log markers to f_*_call_*(): often when a test halts, it is not at all clear why. With these log markers it is saner to figure out what has happened and what hasn't. Change-Id: I162985045bb5e129977a3a797b656e30220990df
2019-05-07bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setupNeels Hofmeyr1-0/+3
Randomly, this test issues the Clear Command so fast that the MGW has not yet been set up, and hence the test cannot possibly see DLCX for endpoint conns that haven't been set up at all. So, simply wait a bit before clearing. Change-Id: Idd0b3810916efd02a499e0ac060a6a275265b8c3
2019-05-02move as_iu_release_compl_disc from BSC_ConnHdlr to RAN_EmulationHarald Welte2-21/+23
... this way other tests beyond MSC_Tests.ttcn can use it. Change-Id: If6d4bbbd09c6261bd665aa66e0d4d027aeaa4d16
2019-05-02RAN_Adapter: More verbose loggingHarald Welte1-1/+4
Change-Id: I16a2c4858d8cac65f39e37d23051fa77c15d4c6f
2019-05-02move imsi_hex2oct to Osmocom_Types.ttcnHarald Welte2-19/+19
This function is required not only for the MSC_Tests, but also for the upcoming Iu related SGSN tests Change-Id: Ic23669671ce79151046f2330726bb68542faeb0e
2019-05-02sgsn: Add initial XID handshake related testsHarald Welte1-1/+61
Change-Id: I5d4b3cba2fe05dffe10c843f16cfec343bc67b5f
2019-05-02LLC_Templates: Add XID related templatesHarald Welte1-0/+96
Change-Id: I383e8761f91fac18625a442088e865ad6a9b472b
2019-04-30msc: Add Iu related tests for most existing 2G testsHarald Welte3-58/+590
This might look a bit like copy+paste programming for our testcases. However, we actually want the Iu related tests show up as separate 'testscase' in the TTCN-3 sense, so there's no way that's more elegant than this :/ Change-Id: I3b56e17487c9df839e67ed390a1ff89979683e8e
2019-04-30msc: Introduce f_cl3_or_initial_ue as replacement for f_bssap_compl_l3()Harald Welte2-27/+33
The new function will check the RAN type and dispath to f_bssap_compl_l3() in case of 2G/GERAN and to f_ranap_initial_ue() on case of 3G/UTRAN. Change-Id: Ia27afa265d441d1a0cbb40cc2d938aff46fa25f9
2019-04-30msc: Add RANAP to msc testsHarald Welte5-76/+317
Integrate RANAP to MSC_Tests.ttcn Related: OS#2856 Change-Id: Idfa54b7607ad6e7016ed9411b0cc5330c901ea34
2019-04-30regen-makefile: Use '-U 5' to split C++ files in multiple chunksHarald Welte1-2/+2
Particularly the C++ files generated for the rather comprehensive 3GPP asn.1 specified protocols like MAP, RANAP, ... result in very large source files and subsequently g++ processes that consume well into the multiple gigabyte range of memory. Let's use the '-U 5' option to ask the ttcn3_compiler to split all c++ files into 5 chunks, resulting in more files to compile, but smaller individual files. I also tested '-U type' before, but it was still grinding my 16GB RAM laptop to unusable deep-swapping state when running 'make -j8' for the IuCS extended MSC test suite. Change-Id: I013b623e98d58a39dd7bb2b0db4a911725028535
2019-04-26BTS_Tests: use 0.0 as default for mp_ipa_up_delayPhilipp Maier1-1/+1
The module parameter mp_ipa_up_delay ads a delay after the ipa bring up. This is relevant for the tests with real BTS hardware, but it is not relavent for the regular TTCN3 tests. Lets set the default to 0.0, since the delay caused problems with TC_rsl_ms_pwr_ctrl and TC_si_sched_13_2bis_2ter_2quater. Change-Id: I7663cad5df1ee5a8bcdbbf522881999f1be9f4fe Related: OS#3960
2019-04-25RAN_Emulation: Add RANAP supportHarald Welte2-10/+345
So far, RAN_Emulation only handled BSSAP and hence could be used to emulate BSCs towards the MSC. Let's extend it with RANAP support so we can also emulate RNCs towards the MSC. We try to share as much code and logic as possible betweeb the two. Related: OS#2856, OS#2857 Change-Id: Ie79bda764162e5c5a42608bde5c5f486ea531f33
2019-04-25HNBAP, RUA and RANAP protocol codecsHarald Welte31-0/+12411
This patch introduces protocol codecs for the HNBAP, RUA and RANAP protocols, which is mandatory for testing IuCS, IuPS or Iuh in the future. As Eclipse TITAN ASN.1 only supports the BER codec and the above protocols all use APER, we need to use an external transcoder from APER to BER and vice-versa. This was implemented using a proprietary ASN.1 compiler / trnaslator which sysmocom is packaging as libfftranscode, which is made available as binary package for Debian 9 at Related: OS#2856, OS#2857, OS#2858 Change-Id: If4a72de9bc54d6e6a7daaca78a4d4aa5684203a5
2019-04-25RAN_Adapter: Support build without IPA / BSSAP supportHarald Welte1-1/+7
Change-Id: I5370f0ea6f2f6cfdc3370a6f3d3bf2e6c32af4d2
2019-04-25RAN_Adapter: Rename functions from f_bssap_* to f_ran_adapter_*Harald Welte3-10/+10
Change-Id: I73818247f1dfc71c8ece11660e6c18f5f153d186
2019-04-25RAN_Emulation: Modularize protocol supportHarald Welte12-139/+214
The RAN_Emulation currently unconditionally provides BSSAP and MGCP support. Let's re-structure the code so that support for those protocols is now possible to enable/disable at compile time. This patch is in preparation of introducing RANAP support in RAN_Emulation. Change-Id: Id53ba3ff05f9946230e0e4a759245de14a0f9fbd Related: OS#2856
2019-04-25msc: Add testcase for UMTS AKA over GERAN TC_lu_imsi_auth3g_tmsi()Harald Welte1-0/+15
Change-Id: I10cc7ed214e83b4624587c60f332034d3f19b22d
2019-04-25msc: f_mm_auth(): Add support for UMTS AKAHarald Welte2-9/+30
Change-Id: Id57adcebd63a06cfa555824e493561fe08f13d6d
2019-04-25sgsn: Add test cases to verify SABM handling on LLGMM + LL5Harald Welte1-0/+36
As OsmoSGSN doesn't implement ABM, the correct resposne to any SABM is DM. RelateD: OS#3953 Change-Id: Ib0d371a3356d6cb481b794945476ab40f5e0f02a
2019-04-25sgsn: Add TC_llc_null to test if SGSN survives a LLC NULL packetHarald Welte1-2/+25
This test case reproduces a bug in OsmoSGSN where it would crash as a result to sending LLC NULL frames. Change-Id: I38326f2ebaaff009d4357edad9511ce2ce7736fd Related: OS#3952
2019-04-25LLC_Templates: Add templates for NULL and DISCHarald Welte1-0/+13
Change-Id: Ia5b350990379bba1677a0c1c99cf37e6651ba84d
2019-04-25deps/Makefile: Use osmocom fork of LLC protocol moduleHarald Welte1-2/+2
Change-Id: I8b9f107f0a99dcbd8148a3d431a101d194dfe788
2019-04-25LLC_Templates: Add SABM, UA, FRMR, DM templatesHarald Welte1-2/+59
Related: OS#3953 Change-Id: Idb40dcd53310b76ea9df6c0090e31175a4382460
2019-04-24BTS_Tests: wait until BTS supplies stable signalPhilipp Maier1-0/+5
When running tests with real hardware it is important to wait for some time (3 sec. should be enough) before exiting f_init(). This is to ensure that the BTS supplies a stable carrier before the test proceeds. Change-Id: Ib78633a33a15cd40514e15b6ebf9a0a8fb7b9c68 Related: OS#3863