Commit Graph

366 Commits

Author SHA1 Message Date
Daniel Willmann 2073c41997 HACK: Workaround buggy mgw newline parser
Change-Id: Ic16dfe6c2452b2dc3e9560b0fa6bdd67fb59b2fe
2018-01-17 18:01:00 +01:00
Daniel Willmann d829b55309 bsc: Expect CRCX and send an ACK back
Change-Id: Ic4fabc2a2cf034a831e446697b3a22f4d1d0c6d6
2018-01-17 17:58:50 +01:00
Daniel Willmann 1fb6e4cc91 bsc: CRCX is answered with (malformed) ACK
Change-Id: I09c1ed467e95be236e0758d6a9c8bbef405c02eb
2018-01-17 15:29:17 +01:00
Daniel Willmann 4886ae6d0c bsc: Reply to CRCX with ACK
Change-Id: Ieaea431a99241d8844b915e1b46b77c79fff24df
2018-01-17 15:29:17 +01:00
Daniel Willmann f667613772 bsc: Register expect criteria for MGCP CRCX
Change-Id: I466df816eef9863bf1664e785b996c0697dc04e3
2018-01-17 15:29:17 +01:00
Daniel Willmann b381ca2e85 MGCP_CodecPort: Receive MGCP command or response
If we act as MGW we need to accept MGCP commands sent to us as well

Change-Id: I895cfb688a2923b278828f5ae918c73fda18636d
2018-01-17 13:25:58 +01:00
Daniel Willmann 38cbd6dfbe Fix ports
Change-Id: I854ee9af243dad112949bd7cdbb98a35bb2d6e86
2018-01-17 13:12:20 +01:00
Harald Welte 3da3379ef8 HACK: Work around IPA CCM bug in OsmoBSC
OsmoBSC has some misunderstanding about how IPA CCM works and hence
we need to work around this until that bug is fixed in OsmoBSC.

See https://osmocom.org/issues/2718

Change-Id: I304535d28a165f76a0a140dc0a15dd81a9db28c8
Related: OS#2718
2018-01-17 13:12:20 +01:00
Daniel Willmann 57dc293de9 Add moduleparm missing
Change-Id: I5d7d665225ebec9e9ecca56aaddbc557cec2351c
2018-01-17 13:12:20 +01:00
Daniel Willmann 6304d06b57 bsc: Start MGCP_Emulation and extend MSC_ConnectionHandler for MGCP
Change-Id: I1f316a9ed5859670348ea7aa352604020d6b09f5
2018-01-17 13:12:19 +01:00
Daniel Willmann a43a78cc5c BSC_Tests: Add MGCP_Emulation to gen_links
Change-Id: Iac24d8d3baf7e4ca6bdab6b0be7b55096e490d01
2018-01-17 13:12:19 +01:00
Daniel Willmann 61157015ee Add MGCP_Emulation
Change-Id: I5245be2b44e98e1c74b9519c610564667b980a67
2018-01-17 13:12:19 +01: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
Harald Welte 71b5ec8c57 RSL_Types: Fix message type of ts_RSL_IPA_MDCX_ACK()
Change-Id: I8ce0c96d66c3027d68542b3f58d9a732fb42517d
2017-12-17 13:24:39 +01:00
Harald Welte 7794d5b7ea RSL_Types: Handle IPA specific messages in tr_RSL_MsgTypeDR()
They all are related to a dedicated channel and carry a channel number
as first information element.

Change-Id: Ic3fdc029a96c34a9d2d9ec669b789526c8325637
2017-12-17 13:24:39 +01:00
Harald Welte f307500caa RSL_Types: Fix RSL Message Type enumerated definition
Change-Id: I9096f8a579ee245fb193e0fd53144056bc4a23a8
2017-12-17 13:24:39 +01:00
Harald Welte 624f963393 BSC_Tests: Prepare for tests based on {RSL,BSSMAP}_Emulation
The existing tests were implemented directly on top of the BSSMAP
and RSL CodecPorts.  If we loop in the RSL_Emulation and
BSSMAP_Emulation components, we can properly multiplex/demultiplex
multiple MS (radio channels) on both the RSL and the MSC (SCCP
connection) side.

In order to have a single component that handles both the RSL and the
BSSAP side of a given channel/subscriber/call, we introduce the concept
of BSSMAP "Expects", where the test csse can register the L3 INFO that
it sends in the RLL ESTablish INDication on the RSL side, so the BSSMAP
handler cna route the BSC-originated SCCP connection with that L3 INFO
back to the same component.  This is a bit inspired "in spirit" of the
"expect" mechanism of netfilter connection tracking.

Change-Id: I71f777cd4f290422fa68897952b6505875e35f0e
2017-12-17 13:24:35 +01:00