Commit Graph

330 Commits

Author SHA1 Message Date
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
Harald Welte 004f5fbca3 BSSMAP_Emulation: use BSSAP_CodecPort
So far, BSSMAP_Emulation used the SCCPasp_SP_PORT directly, explicitly
calling BSSAP encode/decode functions while processing the primitives.

Let's clean this up and use the BSSAP_CodecPort which has meanwhile
been developed as a dual-faced port that can be stacked between SCCPasp
and the user to avoid any manual encode/decode function calls.

Change-Id: Icded789d18f3469f74e16f552df2c7ac44ac4294
2017-12-17 11:04:32 +01:00
Harald Welte 05f378a956 Merge changes Idd5ac427,Ia3b8632e
* changes:
  update README.txt with status of current implementation
  BSC_Tests: Update CFG with list of test cases
2017-12-15 14:18:25 +00:00
Harald Welte bab2f7a74f update README.txt with status of current implementation
Change-Id: Idd5ac4273975b5c0e3ea373f1b8f6d6b2e534c0b
2017-12-15 15:16:42 +01:00
Harald Welte b58e8a098d BSC_Tests: Update CFG with list of test cases
Change-Id: Ia3b8632e0528e862288f7c8565a2e1db04f9eebc
2017-12-15 15:11:19 +01:00
Harald Welte f1b64e208f BSC_Tests: Ensure MSC passes SpeechCodecList in AoIP ASSIGNMENT
Change-Id: I66deffc50b5adcc8707747c0baa2e65ee36bf18e
2017-12-15 14:56:48 +01:00
Harald Welte 235ebf1b9c BSC_Tests: Add whole bunch of new assignment tests
Change-Id: Ia7304f2e2265c2ebd92575a9403b082579397656
2017-12-15 14:19:10 +01:00
Harald Welte 4bf5fc97fb BSSMAP_Templates: Define various ASSIGNMENT related templates/constants
Change-Id: Id4f98120dbedf1a4fd5fb34df0d638eb08d7c3cb
2017-12-15 14:19:10 +01:00
Harald Welte b69533d153 BSSMAP_Templates: Define enum with 08.08 cause values
Change-Id: I2fc122a510403d0da8da04ca323687065347c96a
2017-12-15 14:19:10 +01:00
Harald Welte cfe2c962a7 BSC_Tests: Add TC_outbound_connect to test if BSC rejects inbound SCCP connections
Change-Id: Ie9087df9ff9b48c8be242b1ae66cbca936b07121
2017-12-15 14:19:10 +01:00
Harald Welte cc7e4dc40e BSSMAP_Templates: Enable use for AoIP, not just E1-CIC
Change-Id: I421ade4ae1c0c19c9c2b1172cdcf8d6c4cd55205
2017-12-15 14:19:10 +01:00
Harald Welte 9958a4d7c8 RSL_Types: Add various IPA / Abis-IP specific IEs + templates
Change-Id: I683e7c23b217a993e0d8f079e5bf1a10403420bb
2017-12-15 14:19:10 +01:00
Harald Welte 16a4adfa5f BSC_Tests: Add TC_assignment_cic_only (AoIP Assign. must fail with only CIC)
Change-Id: Iee7202841ad8466a65b5d54679262be100863e39
2017-12-15 14:19:10 +01:00
Harald Welte 9cf4e7208e Merge changes I7b692cce,Iade77321
* changes:
  BSC_Tests: Add test case for RSL link drop counter
  BSC_Tests: Add TC_chan_exhaustion to test for channel exhaustion
2017-12-14 17:31:54 +00:00
Harald Welte e12d791958 Merge changes Ic0188065,I48057cb4,I2bc3de37
* changes:
  BSC_Tests: Add TC_chan_act_nack to test RSL Channel Activate NACK
  BSC_Tests: Add TC_paging_counter to test paging related counters
  BSC_Tests / RSL_Types: Add enumerated for RSL Cause value
2017-12-14 17:31:43 +00:00
Harald Welte 4e9b9cc114 BSC_Tests: Add test case for RSL link drop counter
Change-Id: I7b692cceaed07c112f8c62b87081cfdb322c8120
2017-12-14 18:31:02 +01:00
Harald Welte 799c97bb9d BSC_Tests: Add TC_chan_exhaustion to test for channel exhaustion
We ensure that all channels are allocated, and that the first allocation
beyond the avialable channels will fail and generate an IMM_ASS_REJ.

WE also verify that the related counters are incremented as expected.

Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198
2017-12-14 18:30:53 +01:00
Harald Welte 618ef64574 BSC_Tests: Add TC_chan_act_nack to test RSL Channel Activate NACK
Change-Id: Ic0188065f50d29c44d7bf220f2ef881997a14b68
2017-12-14 14:58:20 +01:00
Harald Welte 7ccc4f93f9 Merge "BSC_Tests: Add more tests about invalid channel activations" 2017-12-14 13:55:52 +00:00
Harald Welte ea02e2dd97 Merge changes Id75cc92d,Ia5a39d37
* changes:
  BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK
  BSC_Tests: Make as_Tguard() more robust (don't abort after RESET)
2017-12-14 13:55:40 +00:00
Harald Welte 1ff6999b81 BSC_Tests: Add TC_paging_counter to test paging related counters
Change-Id: I48057cb4eeb96637a663940cf4de4df1a9f2e85d
2017-12-14 12:31:17 +01:00
Harald Welte a8ed906866 BSC_Tests / RSL_Types: Add enumerated for RSL Cause value
this looks much more human-readable in the logs...

Change-Id: I2bc3de37a3059cc16c6293df45e5c4d620422502
2017-12-14 09:46:01 +01:00
Harald Welte 5cd20ed288 BSC_Tests: Add more tests about invalid channel activations
Change-Id: I8a44b5eab6c6e09330305547d145820983f90140
2017-12-13 22:34:00 +01:00
Harald Welte ef37e76187 Merge "Ignore build byproducts" 2017-12-13 20:21:51 +00:00
Harald Welte d693965455 BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK
... and replace it with a function

Change-Id: Id75cc92ddf1c1833c892a7bfa77d6561fd0f3679
2017-12-13 21:02:46 +01:00
Harald Welte 69c1c261ba BSC_Tests: Make as_Tguard() more robust (don't abort after RESET)
Change-Id: Ia5a39d372c1b7ec8267446f2762aabc600667775
2017-12-13 21:02:08 +01:00
Harald Welte 10e6898df8 Merge "Avoid gcc version check" 2017-12-13 18:54:24 +00:00
Harald Welte c7be8801a0 Merge changes I53ffe442,Ic0750bdc,Ic5499a0b,I67343f01
* changes:
  bsc: Run three virtual BTSs (2 in one lac, 1 in another)
  Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort
  Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files
  move RTP_CodecPort.ttcn to library
2017-12-13 18:53:49 +00:00
Harald Welte 5d1a2209f2 bsc: Run three virtual BTSs (2 in one lac, 1 in another)
This allows us to verify if the BSC pages *only* where it is supposed
to page based on the cell identity list in the 08.08 PAGING.

Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457
2017-12-13 19:51:29 +01:00
Max dbf15f8eab Avoid gcc version check
By default the build fails on Debian due to gcc version check in
/usr/include/titan/cversion.h - instead of asking users to manually
change this file let's add workaround to our makefile fixer which
disables this check automatically.

The corresponding Debian bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816

Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328
2017-12-13 18:08:25 +01:00
Max e1232e1b16 Merge "Fix rmlink.sh" 2017-12-13 16:50:07 +00:00
Harald Welte 067d66ed5b Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort
Change-Id: Ic0750bdc025cd6f16094843550429d976fb44f4f
2017-12-13 17:24:03 +01:00
Harald Welte 1a9b35dd3e Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files
Change-Id: Ic5499a0b5f635a93214cbb5e641d2fd8d37f38d6
2017-12-13 15:42:31 +01:00
Max dde54d3979 Ignore build byproducts
Change-Id: I3a677a809f372a147cd4855abe3f0db14f738450
2017-12-13 14:25:54 +01:00
Max 70feb59917 Fix rmlink.sh
Exclude directories with symlinks which are under version control from
link cleanup script.

Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2
2017-12-13 14:15:08 +01:00
Harald Welte 152c38c765 move RTP_CodecPort.ttcn to library
Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3
2017-12-13 13:19:26 +01:00
Max 6688c94b42 Add git-review config
Change-Id: Ie8ea609827ae4da6659b64c25f0c743770e0cc07
2017-12-13 11:15:48 +01:00