summaryrefslogtreecommitdiffstats
path: root/library
AgeCommit message (Collapse)AuthorFilesLines
2018-10-03L1CTL_Types: Add support to set L1 Header params during SACCH txPau Espin Pedrol2-0/+38
Change-Id: Id014f790ee2ede8ae796c37b1c6b25c4af9034d2
2018-10-03library/RSL_Types.ttcn: expect any l3_info for 'tr_RSL_UNITDATA_*' by defaultVadim Yanitskiy1-2/+2
This is quite useful when one needs to expect an RSL UNITDATA message with any payload. Let's set 'l3_info' to '?' by default, like it's already done for 'ts_RSL_DATA_*'. Change-Id: I45260343b34d8d054e7efa72de11dd4cb510a8cc
2018-10-03library/RSL_Types.ttcn: fix inadequate template restrictionVadim Yanitskiy1-1/+1
The 'tr_RSL_UNITDATA_IND' is a 'response' template, so there is no reason to restrict 'link_id' to any obvious value. Change-Id: I29ac0a2828b565baa1d2f3ac0a922bc441378f94
2018-09-26bsc: inter-BSC HO: add TC_ho_out_of_this_bsc, TC_ho_into_this_bscNeels Hofmeyr3-0/+209
Add f_gen_handover_req() like f_gen_ass_req(), to match AoIP or SCCPlite requirements. For incoming HO, MSC_ConnHdlr needs to know the SCCP addresses to expect the incoming SCCP Connection from MSC to BSC. Add 'handover' section to TestHdlrParams, and pass in the addresses from test_CT via that. In osmo-bsc.cfg, add a remote neighbor config, so that the VTY command 'handover any to arfcn 123 bsic any' can trigger an outgoing inter-BSC HO. Add various BSSMAP handover templates to BSSMAP_Templates.ttcn. Add RR Ho Command template to L3_Templates.ttcn. Move ts_BSSAP_Conn_Req() from msc/BSC_ConnectionHandler.ttcn to library/BSSMAP_Emulation.ttcn, so we can also model an SCCP Connection Request in BSC_Tests.ttcn (this time from MSC to BSC). Add the two new tests to bsc/expected-results.xml. Related: OS#2283 Change-Id: Id22852d4be7f127d827e7a8beeec55db27c07f03
2018-09-25MSC_Tests: Reply to Classmark Req in TC_lu_imsi_auth_tmsi_encr_3_1_no_cmDaniel Willmann1-0/+11
After osmo-msc I73c7cb6a86624695bd9c0f59abb72e2fdc655131, osmo-msc sends a BSSMAP Classmark Request if encounters a missing Classmark, which is the case during LU when A5/3 is enabled. Fix this test by answering the Classmark Request, if any. Change-Id: I25578c050b7e105ed71b064891d4cd418ee30fcf
2018-09-18bsc: test Classmark EnquiryNeels Hofmeyr2-0/+27
Enhance TC_classmark to also include the BSSMAP Classmark Request -> RR Classmark Enquiry part. So far it was only testing the return path of RR Classmark Change -> BSSMAP Classmark Update. This test will thus fail with current osmo-bsc master, and will succeed as soon as osmo-bsc If5db638fd6e8d9c2ef9e139e99f0fabe1ef16ddf is merged. Add: * ts_BSSMAP_ClassmarkRequest in BSSMAP_Templates.ttcn * tr_RRM_CM_ENQUIRY in L3_Templates.ttcn Change-Id: Idaab4d568cf986b4897ba008f6262c839d1592fb
2018-09-16GSM_Types: Add CBCH_Block definition of TS 04.12Harald Welte2-0/+43
Change-Id: Ib034aba11a0219959c4224238e559ba36e95cacf
2018-09-16GSM_Types: Add support for Osmocom RSL ChannelNr CBCHHarald Welte1-1/+4
Osmocom uses 0xC8 as channel number for CBCH, this is an extension to the 08.58 definitions. Change-Id: I2203f4a9012c154c12ac9d8f9c448a9ed0f49197
2018-09-16rsl: Add SMSCB related RSL types / templatesHarald Welte1-0/+54
Change-Id: I203e72a203ffa7538aadc7b96e1ae7e21956c160
2018-09-16Osmocom_VTY_Functions: Generalize to handle multiple VTY portsHarald Welte1-7/+7
The existing Osmocom_VTY_Functions code was centered around a global module parameter specifying the prompt prefix. This prevented a single test to use multiple VTY connections to different Osmocom programs. This patch generalize the code by widening the prompt matching in f_vty_wait_for_prompt() and by allowing the caller to specify the prompt prefix to override the modulepar. Change-Id: I574b56c42fe95540af44a2c43d0fb469938c0e65
2018-09-16library/GSUP_Types: correct value of the GSUP_CancelTypeAlexander Couzens1-2/+2
The comment in the c header of OSMO_GSUP_CANCEL_TYPE_UPDATE says: 1 = /* 0 on the wire */, 2 = /* 1 on the wire */ Change-Id: I4d22af9fee19e6036dbb555422759e3c1285416a
2018-09-11GSUP_Types.ttcn: add tr_GSUP_SAI_REQ_UMTS_AKA_RESYNCAlexander Couzens1-0/+27
Match only on AKA RESYNC packages Change-Id: Ibab8a76fde78db6e7a84794e0b641bcb7b1fd1a7
2018-09-11L3_Common: extend the AuthVector to contain AUTSAlexander Couzens1-1/+6
AUTS is used in the UMTS AKA resync procedure. Change-Id: Id1afa47778e6220cab375ae4b54b251801724fdb
2018-09-04L3_Template: add template ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNCAlexander Couzens1-0/+22
ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC send a Authentication & Ciphering failure to resync the USIM with the HLR. Change-Id: Ia58dc1483757887ca14cfae19e30f9c91fef5874
2018-08-31improve connection failure message in IPA emulationStefan Sperling1-1/+2
Show addresses and ports which were attempted in the IPA connection failure message. Example output: Verdict: fail reason: Could not connect IPA socket from "" port -1 \ to "127.0.0.1" port 4238; check your configuration Change-Id: I828fe67d66bcd668aa14922b89a2feac56dc2d9a
2018-08-30show return code when sending L1CTL_FBSB_REQ failsStefan Sperling1-2/+3
Provide a little bit more information when a BTS test fails due to L1CTL FBSB failure. Example output: Test case TC_si_sched_default finished. Verdict: fail reason: \ FBSB Failed with non-zero return code 255 Change-Id: I5e8f23a2615b64bdf3167d486ba808c93f0f4b23
2018-08-24fix SCCPlite BSC tests: send IPA ID ACK, not GETNeels Hofmeyr2-3/+20
From libosmo-sccp.git Icffda98579e676ab6ca63c9c22cf5d151c4fe95f on, we expect an IPA ID ACK upon first connecting, not an IPA ID GET. This might be specific to the one MSC tested so far, but it's the status quo. Make the IPA server in IPA_Emulation configurable, to conform and send the IPA ID ACK upon connecting. This fixes the ttcn3-bsc-tests,SCCPlite suite, broken by above libosmo-sccp commit. For other IPA clients, it is so far required to send the IPA ID GET, so only configure the SCCPlite server in BSSAP_Adapter.ttcn to send IPA ID ACK, and leave the others unchanged. Related: OS#3500 OS#3498 Related: Icffda98579e676ab6ca63c9c22cf5d151c4fe95f (libosmo-sccp) Change-Id: I34b6296a1a408729802a9659c6524c0f67a2f4fe
2018-08-14BSSGP_Emulation: dont fail when removing a non-exitent clientAlexander Couzens1-2/+2
On multiple BSSGP tests the IMSI might not anymore registered to the first BSSGP Change-Id: Ibad8971e5acc2691da29cf7fa394d1d58eea79a4
2018-08-14BSSGP_Emulation: remove unused BSSGP_SP.receive(PDU_L3_MS_SGSN)Alexander Couzens1-8/+0
As the llc is handled outside, this function is not anymore needed Change-Id: Ib910dec4a54e155573c162a70731f20cbf1e9c5d
2018-08-14BSSGP_Emulation: move LLC layer out of BSSGPAlexander Couzens1-2/+10
The LLC layer needs to be accessed by the SGSN tests in order to do multi-BSSGP tests. Otherwise the sgsn will see LLC frame with wrong sequence numbers and drop them. Change-Id: Ie9e9d7da0a78a96f4f431c9085b9e273a39535f1
2018-08-14BSSGP_Emulation: add type record LLC_EntitiesAlexander Couzens1-0/+2
In prepartion of moving the LLC layer out of the BSSGP Change-Id: I1a8c6a608c84a984e542510482bbfc5394ae6658
2018-08-14BSSGP_Emulation.ttcn: extend BSSGP_Client_CT to hold 3 instances of BSSGPAlexander Couzens1-6/+6
Change-Id: Ibd7abba826a08b582361e9c255e9c44185e14067
2018-08-13NS_Emulation: support multiple instances at the same timeAlexander Couzens1-24/+27
The NS_Emulation has configuration values hardcoded or bound to module parameters which prevents multiple instances. Replace the module parameter based configuration with configuration given when starting the NS_Emaulation. Change-Id: I9128f9ad5c372779c38799269393137ba52576cd
2018-08-09add DTX fill frame BTS testsStefan Sperling1-4/+5
Add tests TC_tch_sign_l2_fill_frame and TC_tch_sign_l2_fill_frame_dtxd. TC_tch_sign_l2_fill_frame is already passing and verifies that fill frames are sent if there is nothing else to transmit on a SDCCH4/SDCCH8, TCH/H, or TCH/F signalling channel where DTX is disabled for downlink. TC_tch_sign_l2_fill_frame_dtxd is currently failing. It verifies that only specific fill frames are sent, as required by GSM 05.08 for TCHF signalling channels with DTX enabled for downlink. At present, our implementation generates no fill frames in this case, which is one piece of the problem described in issue OS#1950. Change-Id: Id4e0de6e78b62cd408f600a57a28617d91da64af Related: OS#1950
2018-08-08HLR: Add HLR_EUSE.ttcn to implement minimal external USSD EntityHarald Welte1-0/+11
As OsmoHLR is getting support for external USSD Entities (EUSEs), we have to implement this function in the test logic in order to test it. Change-Id: Ibab210b06abfd5a21e81c7f7fbe574c4f67414a0
2018-08-07move USSD_Helpers.ttcn to libraryHarald Welte1-0/+78
We want to use those also from the HLR_Tests, not just from MSC_Tests. Change-Id: I22be6c03d85dc6d6a8266b5ebce5d0c69c0551ed
2018-08-02IPA_Emulation: Add missing zero byte to strings in IPA CCM ID RESPHarald Welte2-2/+2
Change-Id: I3fdc0f47381d5ba1763197d5f264696f04d0396f
2018-07-27detect VTY TELNET port connection failures (attempt #2)Stefan Sperling1-0/+9
Pass the CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT parameter to the TELNET port by default. This allows tests to make progress into an error handling path if they are started while the osmo-* program they want to connect on VTY is not running. Observed with osmo-ggsn tests, where if the one test runs into a VTY connection failure the subsequent test would get stuck forever in a map() call on the VTY TELNET port. Teach the function f_vty_wait_for_prompt() about connection reports by the TELNET module. We may now receive an integer which represents the socket file descriptor for the telnet connection. This case was not handled by the previous change made in commit cb111b21aba1d5881da1a1d3f19754cbd15b3779. As a result, BSC tests started failing with "VTY Timeout for prompt" because the alt-statement in f_vty_wait_for_prompt() would not progress past the integer sitting on the VTY port's receive queue. Change-Id: I56925f93af6c55e93f3f417099db135744da6a40 Related: OS#3149
2018-07-25MGCP_Test: add function to check for RTP err countersPhilipp Maier1-0/+36
At the moment we check the error counters of the RTP statistics in the testcases. However, in most situations we will do the check to make sure that no errors occurred (all counters == 0). Rather than having a long tail of if statements in the testcases we should have a function for this. This also makes it much easier in case we add more error countes lateron. - add and use function f_rtpem_stats_err_check() Change-Id: I69e5f80b0765284ec99056ce62c315461967d2a1 Related: OS#3384
2018-07-24introduce a TTCN3 test suite for SCCPStefan Sperling2-14/+48
This test suite acts as an SCCP server on top of M3UA. SCCP tests are run against the sccp_demo_user program which can be found in libosmo-sccp/examples. This program must be started in client mode: sccp_demo_user -c The SCCP test suite should then work out of the box with the provided SCCP_Tests.cfg file and this additional change to sccp_demo_user default point codes: https://gerrit.osmocom.org/#/c/libosmo-sccp/+/9652/ There is currently only one test, for the libosmo-sccp crash reported as issue OS#2666. The implementation of this test is currently using an ugly workaround due to shortcomings of the M3UA Emulation layer (see source code comments). Whether a better solution is feasible is still to be determined. The test requires a patch to the SCCP Protocol Emulation which has been submitted upstream: https://git.eclipse.org/r/#/c/124552/ Change-Id: I03f5e8b282a7396b45417495c88d8fb81b26cda8 Related: OS#2666
2018-07-24MGCP_Test: check payload type of received RTP packetsPhilipp Maier1-0/+7
When an RTP packet is received, the payload type is not checked, so we will not detect if the MGW emits packets with a wrong payload type for some reason. - Introduce a statistics counter that counts packets with wrong PT - Update testcases so that they check for the statistics for wrong PT count. Change-Id: I83d4b04656a16ced624024245a2fcb7a0ad48a8a Related: OS#3384
2018-07-24Fail if f_streamId_by_trx() can't find a stream idDaniel Willmann1-1/+2
Change-Id: Ie58278edf7050254d7cdced48b4b7870e0e8d577
2018-07-24library: Ensure setverdict(fail) is followed by mtc.stopDaniel Willmann27-148/+148
This will prevent subsequent failures from overwriting the verdict so we can easily see the root cause of the test failure. Using testcase.stop instead for errors internal to our test infrastructure to mark them as test errors instead of failed. Change-Id: Idc6819aaf0b01e70c38fad828dd44dcec6bdd778
2018-07-21lib: gtp: Add templates to send ErrorIndiciationPau Espin Pedrol1-0/+25
Change-Id: I7c20bc3b62a953efe57eb05a8ba89f9f0830a816
2018-07-21sgsn: Add Test to verify Recovery procedure during CreatePdpRespPau Espin Pedrol1-2/+4
Change-Id: Ic81b854967492194367b7ce8a667c29c777791bf
2018-07-13lib: L3_Templates: Fix DEACT PDP REQ msg type and make tearDownInd optionalPau Espin Pedrol1-34/+33
Specs state in 3GPP TS 24.008 that TearDownInd IE is optional, so allow possibility to omit it. Also fix protocolConfigOpts being passed as parameter but not being used in template tr_SM_DEACT_PDP_REQ_MT. Change-Id: I006d64f51c17a22a42a225ddfa4119933e48a022
2018-07-11lib: GTP_Emulation: Allow receiving packets with TEID 0Pau Espin Pedrol1-2/+11
Some GTP messages like Echo Request, Echo Reply and Ind Error don't use the TEID value. According to 3GPP TS 29.060 sec 9.3.1 in those cases the TEID is set to 0: """ - TEID: Contains the Tunnel Endpoint Identifier for the tunnel to which this T-PDU belongs. The TEID shall be used by the receiving entity to find the PDP context, except for the following cases: - The Echo Request/Response and Supported Extension Headers notification messages, where the Tunnel Endpoint Identifier shall be set to all zeroes. - The Error Indication message where the Tunnel Endpoint Identifier shall be set to all zeros. """ Change-Id: Ic702b78028e850ed961ef805f35e10a42da34e56
2018-07-06RSL_Emulation: Stop with error verdict if conn table runs out of spaceDaniel Willmann1-6/+4
Change-Id: If1a002da97cf1b66855f2e7a0fe2a54a6428bc81
2018-07-05GGSN_Tests: test what happens when PCO contains only one DNS entryPhilipp Maier1-0/+37
When the protocol configuration options (PCO) contain an IPCP container then lists only one one DNS server (normally there are two included, a primary and a secondary). Than the parser in osmo-ggsn runs into an endles loop. This testcase tries to provoke this behavior by sending PDP CONTEXT ACTIVATE messages with PCO that contain only a single DNS entry per IPCP container. The hanging of osmo-ggsn is already fixed (see Depends). However when Primary and Secondary DNS are in separate IPCP containers, then only the first IPCP container is parsed (see also OS#3381) Change-Id: I71761e1f9db7ceac3c3df43d2e539f8c8d53c4fc Depends: osmo-msc Icffde89f9bc5d8fcadf6e2dd6c0b4de03440edd5 Closes: OS#3288 Related: OS#3381
2018-06-29bts: Extend Osmocom-specific RSL "supplementary meas info IE"Harald Welte1-1/+9
In osmo-bts Change-Id Iea4a4781481f77c6163d82dcd71a844a5be87bf2 we introduce an Osmocom specific "supplementary measurement info IE" into the RSL MEAS REP message. This commit adds the related type definitions and extends the related matching in BTS_Tests.ttcn. Change-Id: I5d1114c73508c67ad7cd9864d7370367612b1241
2018-06-28MGCP_Test: add tests to verify actual RTP flowsPhilipp Maier1-6/+43
The test coverage of the RTP aspects of the MGW is currently very minima. Lets add a few more testcase to verify RTP behaves as expected in various situations. - Add testcase TC_one_crcx_receive_only_rtp: Test recvonly mode of the MGW. All packets must be absorbed by the MGW, no packets must come back. - Add testcase TC_one_crcx_loopback_rtp: Test loopback mode of the MGW. All packet sent to the MGW must come back. - Add testcase TC_two_crcx_and_rtp_bidir: We already test unidirectional transmissions. This test does the same as TC_two_crcx_and_rtp but for both directions. - Add testcase TC_two_crcx_mdcx_and_rtp: Simulate a typical behaviour of a normal call. First create two half open connections and complete the connections later using MDCX. - Add testcase TC_two_crcx_and_unsolicited_rtp: Test what happens when a RTP packets from rogue source are mixed into the RTP stream. - Add testcase TC_two_crcx_and_one_mdcx_rtp_ho: Test a typical handover situation. An existing connection is handovered to another source on one end but the old source will keep transmitting for a while. Change-Id: I556a6efff0e74aab897bd8165200eec36e46629f Closes: OS#2703
2018-06-25BSC_Tests: use correct payload types and encoding names on MGCPPhilipp Maier2-0/+32
The test currently use a hardcoded payload type and encoding name. This does mean in practice that even when an assignment with EFR is happeining. The MGCP responses to the BSC tell that the codec is AMR. This is not correct. The testcases should always pick a suitable payload type / encoding name in the MGCP response - Add constants for IANA/3GPP assigned payload types - Add function to lookup the right encoding name for a payload type - Initalize the encoding name and payload type in g_media according to the BSSAP PDU. Change-Id: I2735267091059e2f2169da80bdcd30abc2b1554b Realted: OS#2728
2018-06-21library/GSUP_Types.ttcn: SS Info IE is optional for GSUP_PROC_SS_*Vadim Yanitskiy1-28/+51
The 'SS Info' IE is optional for GSUP_PROC_SS_{REQ|RSP} messages, and is not carried in some cases, e.g. when a subscriber aborts an active transaction by pressing the 'red button'. Change-Id: I20d9028acbe0c457d2a2cf72eff372b749d8dc30
2018-06-19library/L3_Templates.ttcn: fix f_facility_or_wc(omit)Vadim Yanitskiy1-0/+2
According to GSM TS 04.80, table 2.5, the Facility IE is optional for RELEASE COMPLETE message. So, if this IE is omitted, then the whole TVL shall be omitted. It's time to fix this. Change-Id: I216195ef71c95997708dad8c31b172b6f6cdc461
2018-06-19library/SS_Templates.ttcn: add empty Return Result templateVadim Yanitskiy1-0/+21
According to GSM TS 04.80, table 3.4, the Return Result component may be empty, i.e. may not contain any results nor operation code. It is used, for example, in responce to the network-originated USSD notification. Change-Id: Iaaff110c5f61cc87eda6143cd841f9832f6074bf
2018-06-18bsc: handover: actually send Handover DetectNeels Hofmeyr1-0/+9
Until now, the test went from RR Handover Command directly to RR Handover Complete, and osmo-bsc didn't mind it. However, the normal handover procedure requires an RSL Handover Detect to be sent in-between those. Send that. Change-Id: I6e54edcc3a99e116d852eca8e48c7a5bc685e832
2018-06-13lib/BSSGP_Emulation: fix removal of items in ClientListAlexander Couzens1-2/+8
Previous the old entries aren't removed. This only had an impact if two different f_TC_* were using the same imsi. When the second function tried to remove the Client again from the ClientList, the BSSGP_Emulation failed. Change-Id: I71103e8f8c5f18e8ebadc057cd62d85affd7ca8c
2018-06-12Osmocom_VTY_Functions: introduce f_vty_transceive_not_match()Alexander Couzens1-0/+8
fails when vty response match template. Change-Id: I489d2a47cd4690dcfc3f1042c332014593d082a2
2018-06-12Osmocom_VTY_Functions: move f_vty_transceive_match from HLR to this libraryAlexander Couzens1-0/+8
f_vty_transceive_match will be used by future SGSN tests. Change-Id: Ia69ab6d5639c2e10059f88c8cc97463820cb72e6
2018-06-10bts: More complete AGCH / IMM.ASS testingHarald Welte2-1/+55
The existing test simply sent 1000 messages via RSL without checking what actually arrived on the radio interface, or without expecting/counting any RSL DELETE IND. Let's fix this by introducing test sending IMM.ASS at three different rates, with related expectations in terms of nubmer of IMM.ASS arriving on Um vs. RSL DELETE IND arriving at BSC. Change-Id: Ib6043b76ba1d7aaff107bb612f63b5a747d8720c Related: OS#2990 Related: SYS#2695