Commit Graph

570 Commits

Author SHA1 Message Date
Harald Welte 0e5aad201f Add new GSUP Emulation module, dispatching GSUP based on IMSI
Change-Id: I6d06280fa5729ee921d319854a9b11636cf83495
2018-01-21 19:31:09 +01:00
Harald Welte cb6cc33521 L3_Templates: Template for tr_CM_SERV_REJ and ts_ML3_MO_LU_Req
Change-Id: Iad1596a3b80de16a9b0e2d644cf9a0fe2c51ad21
2018-01-21 19:31:09 +01:00
Harald Welte ae8ce238cd BSSMAP_Templates: Fix + enable ts_CellId_CGI
Change-Id: Icafe6415b3f896176edcac604a0945e83126db09
2018-01-21 19:31:09 +01:00
Harald Welte 0a6835c6f2 BSSMAP_Templates: Make ts_BSSAP_DTAP usable
A send template with '?' is broken.  Also, allow caller to specify DTAP
payload as well as optionally a DLCI.

Change-Id: I641ee8ce5e5ae70b514342cf68cdc79b1926c4d0
2018-01-21 19:31:09 +01:00
Harald Welte dfe94dd5f7 GSUP_Types: Templates for UpdateLocation + ISD
Change-Id: If7a5a1159f098645652114e0c36fea98f63f946c
2018-01-21 19:31:09 +01:00
Harald Welte 049ca642aa BSSMAP_Templates: tr_BSSAP_BSSMAP / tr_BSSAP_DTAP: DLCI may be present
Change-Id: I98b313e354b31fae8c1fea9e61a838970d575d69
2018-01-21 19:31:09 +01:00
Harald Welte b0ec4eec33 BSSAP_Adapter: Always perform BSSMAP Reset on start-up
Change-Id: I1f8834be3409348b3a30b1489f5faa4d1c47b086
2018-01-21 19:31:09 +01:00
Harald Welte 0cf76ad9f7 Move BSSAP_Adapter.ttcn to library so it can be reused
Change-Id: I6ecb1a4823ee036b65d4e4e8ebc23c1db4915a42
2018-01-21 19:31:09 +01:00
Harald Welte ffe55fcc83 bsc test: Abstract out CTRL handling so it can be re-used from MSC test
We create a new Osmocom_CTRL_Adapter module which can be used by
test suites using the 'extends' functionality.

Change-Id: I3ef6cfaa738900e008155013a05b8ccf3d4b7aeb
2018-01-21 19:31:09 +01:00
Harald Welte 67089ee9a4 BSSAP_Adapter: De-couple from BSC-testing MSC_ConnectionHandler
... and pave the way from using it on the other side in MSC testing

Change-Id: I0095f7d24dd8b24f759e4c74a4e7856ec4503ed2
2018-01-21 19:31:09 +01:00
Harald Welte 876bf9d474 MNCC_Emulation: Similar to BSSMAP_Emulation but for MNCC
Dispatches MNCC to individual ConnHldr's based on IMSI.

Change-Id: I850b49ce6a6c894b413b8905008452ce91d2cdb0
2018-01-21 19:28:59 +01:00
Harald Welte ca519981aa BSSMAP_Emulation: Add missing procedure port to client/ConnHdlr
Change-Id: I2925f74d5dcc18f37d48ec8a38a308c1adeef3cc
2018-01-21 19:28:26 +01:00
Harald Welte fe75a20163 MNCC_Types: Add enumerated for cause location + cause coding
Change-Id: If67691a7a18cdde726dfcab48fdfc7b29bd518b4
2018-01-17 13:34:58 +00:00
Harald Welte 8a10e8656d MNCC: Make sure all unused fields are set to omit, not 'unbound'
Change-Id: I0ef3afa19d4ad5e011a7c0d86f8367461608e163
2018-01-17 13:34:58 +00:00
Harald Welte 251b52b71c MNCC: Add some useful templates / helper functions
Change-Id: I59374f9f17600bd405b52dd3a0bcdb39b9ac9adc
2018-01-17 13:34:58 +00:00
Harald Welte 8b2a258808 MNCC_Types: Add templates for most MNCC messages
This adds templates for sending and receiving MNCC messages from
the external MNCC handler point of view, i.e. as required for MSC
testing.  The inverse templates will be needed if we want to implement
emulation of the MSC side of MNCC.

Change-Id: I77665aaf589bdaa9dc0aa6a5daa431fafdc2b383
2018-01-17 13:34:58 +00:00
Daniel Willmann d47106b337 BSSMAP_Emulation: Initialize ExpectTable before use
The assignment_fr_* tests now go through to the point where the BSC
sends a CRCX to the mgw.

Change-Id: Ic5a128861ae7b1a4cf8158e43c59c52ebd2a20ba
2018-01-17 13:12:19 +01:00
Daniel Willmann 17f970fc65 RSL_Emulation: Initialize the ConnectionTable
By default all the elements in the conn table seem to be considered
<unbound>.
f_cid_create() manages to set ra, ra_fn and comp_ref in the
ConnectionData element, but checking for
ispresent(ConnectionTable[i].ra) still returns false while
log(ConnectionTable[i].ra) returns 23. Setting every optional element to
omit as f_cid_clear() does before using the connection table seems to
solve this issue.

The assignment_fr_* tests now continue after receiving the Immediate
Assignment, but still fail after receiving the CM Service Request.

Change-Id: I24205425c5b6ae5b8a0f6288ba89ea5a1dc4669d
2018-01-17 13:11:57 +01:00
Harald Welte 818b6e4225 Add "SourceInfoFormat := Single;" to all test configs
This will make sure that all log files will contain information about
the .ttcn source file name and line number that has caused the log,
which is extremely useful during debugging.

Change-Id: Id6785757f20279ba84b34747f878baf67d065b20
2018-01-17 11:11:29 +00:00
Stefan Sperling b041b3d339 Test control connection status query for MSC 0.
This new test exercises the new 'msc.0.connection_status' control
command which is added in https://gerrit.osmocom.org/#/c/5630/

Change-Id: I55faa1ec413629234e24831dbc05d8b0afec8099
Related: OS#2729
2018-01-12 14:25:44 +00:00
Stefan Sperling 6d9309b8a4 Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC triple octet.
With help from Daniel Willmann.

Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Related: OS#2754
2018-01-11 14:43:16 +00:00
Stefan Sperling 7159dbbce6 Fix BTS location area code assignment in test configuration.
The paging tests expect BTS 0 and 1 in LAC 1, and BTS 2 in LAC 2.
BUt the osmo-bsc configuration file had BTS 1 in LAC 2, and BTS 2 in LAC 1.

Change-Id: I1d6b02fe06116dee59977422bc93bcafcd3aba76
2018-01-09 13:19:46 +01:00
Harald Welte 474fd7d11a Add a MNCC Socket implementation for TTCN-3
Change-Id: I8c334d4c2e630b2b779e73404c44a8df3278c614
2018-01-03 21:09:35 +01:00
Harald Welte 35bb716610 Add comments with short module description on top of each file
Change-Id: Id934d7a763b619d52cbec7de439b3708225b81f3
2018-01-03 21:09:29 +01:00
Harald Welte df32723446 GSUP Support and first test against OsmoHLR
Change-Id: Idd7a6aca1ab193da39294f49a3adc4c1cd7cecff
2017-12-28 23:17:24 +01:00
Harald Welte 2e1a1da674 bsc-test: Fix compilation after IuUP support was introduced
Ever since I46de7fb9c324654275a27aa5f8c1be70340e3229 we had problems
linking the object files together due to a missing object

Change-Id: I5d8c37f924b3a2c8b28cace4da2add1fadd0151a
2017-12-28 23:17:24 +01:00
Harald Welte f91edf3b49 MGCP_Test: be more liberal in some of the error codes we expect
Sometimes it's not entirely clear which error code should be returned,
so let's accept multiple options, depending on the situation

Change-Id: I6d6eaec4d025b9da170f59c759884afe2e768521
2017-12-28 14:21:03 +01:00
Harald Welte 33d8216ab4 MGCP: Add 30 endpoint number test to control section
Change-Id: Ifa03697531680c72e4179a4195aeac371660b722
2017-12-28 14:20:53 +01:00
Harald Welte 646ecdb8e4 MGCP_Test: Test use of 30 endpoint numbers
We used to have a big (OS#2784) where only endpoint numbers below
10 (0x0A) were working due to failed interpretation in hex/dec.

Let's use up to 30 endpoints to ensure hex as well as two-digit
digit numbers.

Change-Id: Ifb3e01b5d31decefbf0c87ea39ec5021c8795579
2017-12-28 03:28:40 +01:00
Harald Welte 8098164721 RTP_Emulation: Integrate IuUP support
Change-Id: I46de7fb9c324654275a27aa5f8c1be70340e3229
2017-12-25 00:03:07 +01:00
Harald Welte 3f6f48f4c1 RTP_Emulation: Add RtpemConfig / RTPEM_configure() call
Change-Id: Ie60b750fc009a3d8aa044e4fd450873aa19086bb
2017-12-25 00:00:58 +01:00
Harald Welte 46a38f1669 RTP_Emulation: Fix calculation of timer + timestamp increment
Change-Id: I3ba0d31ad571f42721f208a40f7dcbd8fb2c6e88
2017-12-25 00:00:58 +01:00
Harald Welte 8a4d3954b6 RTP_Emulation: Fix encoding of timestamp; int2bit counts in bits!
Change-Id: I8e8b8faff362536c46b188eb9bbb77bf0ceb866d
2017-12-25 00:00:58 +01:00
Harald Welte c676c68de6 Add 3GPP TS 25.415 IuUP encoder/decoder
Change-Id: Ie04438d8ec2b796e9e56b1937fa024a5299457dd
2017-12-25 00:00:58 +01:00
Harald Welte 38b2a10e0b BSC_Tests: Fix TC_assignment_fr_a5_4
Don't expect the ASSIGNMENT to fail in case of unsupported A5/4,
but expect a CIPHERING MODE REJECT.

Change-Id: I15024f61e67795b7e5ce72e1b641db6ca92ff76d
2017-12-25 00:00:58 +01:00
Harald Welte 1a40de6a7f MSC_ConnectionHandler: fix f_rsl_reply() for RSL_MT_ENCR_CMD
For some weird reason the link_id is *not* the second IE in
RSL_MT_ENCR_CMD, while it is in all other RSL RLL or DCHAN messages.

Change-Id: Iea93aa8dba74d25c74a257d011ba43308ee375e4
2017-12-23 02:29:46 +01:00
Harald Welte 4532e0a145 convert TC_assignment_sign to 'new style' tests
the use of the MSC_ConnHdlr automatically handles the MODIFY on
both RR and RSL level.

Change-Id: Iad7122ff5220ffc1640d802db47b1aa97986ed5b
2017-12-23 02:29:46 +01:00
Harald Welte 8b20f7c963 BSSAP_Adapter: Fix missing 'repeat' in as_reset_ack()
The as_reset_ack() exists to acknowledge any incoming RESET without
every test case having to deal with it explicitly.  However, of course,
the processing of an inbound RESET should not abort but the alt clause
shall continue.

Change-Id: I94dc72b5788ccc8dff2c4b80599c9fbf7e90e730
2017-12-22 20:40:38 +01:00
Harald Welte df32ab1be8 BSC_Tests: remove bogus line sfrom osmo-bsc.cfg
Those lines serve no purpose (and are being removed from osmo-bsc master)

Change-Id: Icf037e8cd9a51e676eac472b29c0d616a5632c5d
2017-12-18 08:40:39 +01:00
Harald Welte 1b473ca34d BSC_Tests: Delete unused/dead code
Change-Id: Ife089a2c292f4eae7a7c76dd2f112e7821f02cda
2017-12-17 20:25:53 +01:00
Harald Welte 21b46bdb74 BSC_Tests: Update readme + source code comments
Change-Id: I7b7d0e504e3e94077d674b464f39bd8851941922
2017-12-17 19:48:03 +01:00
Harald Welte 8d5eead70e MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD
In all RSL messages the link identifier is usually the second IE.
However, as the only known exception, the RSL Encryption Command has it
as third IE.

Fixes the following error message:
Dynamic test case error: Using non-selected field link_id in a value of
union type @RSL_Types.RSL_IE_Body

Change-Id: I2bbb83b5394d0b693a47d286beed5c699ab6e8ae
2017-12-17 19:00:34 +01:00
Harald Welte f0d6ac6d80 BSC_Tests: reduce amount of sleeping to speed up test suite
Change-Id: Ifd956556969467d4f059d2c8e58a924eb7ec0418
2017-12-17 17:02:45 +01:00
Harald Welte 44bdaa5bad fix TC_ctrl expectation: We expect 3 BTSs
Change-Id: I4ba5d357474d43c3065858bfa18bf73f1c4eba5d
2017-12-17 17:02:45 +01:00
Harald Welte 89d42e8fe9 BSC_Tests: Only start the number of BTSs required for a given
Change-Id: Ife3ec4900a73a29c2ef258a5a9d38b95ced8dc86
2017-12-17 17:02:45 +01:00
Harald Welte 73cd271a56 BSC_Tests: Implement ecnryption related procedures
Let's verify the operation of the CIPHERING MODE COMMAND as issued
by MSC, performed by BSC and implemented by simulated BTS/MS.

Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78
2017-12-17 13:24:39 +01:00
Harald Welte 82d2b87b47 MSC_ConnHdlr: Tighten permitted messages
Accept CRCX only once; Accept MDCX only after CRCX; Accept RSL MODIFY
only after RR MODIFY.

Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa
2017-12-17 13:24:39 +01:00
Harald Welte 552620d570 BSC_Tests: Migrate various ASSIGNMENT tests over to MSC_ConnHdlr
This way we benefit from the ability to handle the RR MODE MODIFY,
RSL MODE MODIFY, IPA CRCX and IPA MDCX capabilities of the MSC_ConnHdlr
component.  While each test case now needs a separate function in
addition to the actual testcase, this allows for more flexibility
and a more complete emulation of BTS behaviour.

Change-Id: Iba50663cb5104bf34bd6fc8aac2aa3b47155fe99
2017-12-17 13:24:39 +01:00
Harald Welte c1a2fff5e0 BSC_Tests: Re-wire MSC_ConnectionHandler to handle BSSAP and RSL
Using the MSC_ConnHdlr component, we can now handle the BSSAP (MSC)
and RSL (BTS) side of a single radio channel.

Change-Id: I00dcf1e4eaa7f133788cc01fbbcd4148a0258ef4
2017-12-17 13:24:39 +01:00
Harald Welte 15166144ae L3_Templates: Add ts_RRM_ModeModifyAck template
Change-Id: Iec607577aff1c65cb208c20a4c4169b5b4569892
2017-12-17 13:24:39 +01:00