Commit Graph

702 Commits

Author SHA1 Message Date
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 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 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 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 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 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 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 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 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
Harald Welte 20a58c6d6f generalize shared code from regen_makefile.sh into shared helper script
Change-Id: I86a738420851a7d9e3bdb2671f6862c3d505a4ba
2017-12-13 01:04:42 +01:00
Harald Welte e65d40e4db BSC_Tests: Ensure that PCH load indications suppress further paging
Change-Id: I1111996e497bc3ef179b57df135975160b4f7a52
2017-12-13 00:50:11 +01:00
Harald Welte 9fbe93f532 regen_makefile.sh: Fix TITAN 6.1.0 support
When introducing the rewriting for 6.3.0 we broke the 6.1.0 support.
Now the result should build on Debian with both 6.1.0 and 6.3.0

Change-Id: I263a6abd2d9eb15ce5778ef8dbfcdac2a228b77d
2017-12-13 00:50:11 +01:00
Harald Welte 6807982106 Makefile: clone dependencies into 'deps' folder
We used to rely on out-of-tree git clones to be prepared by the user.

This commit changes the system to make sure we clone all git repos
we depend upon into the 'deps' folder, and then setup the symlinks
to that folder.  As a result, we should be able to support
self-contained builds using the makefiles in this repo.
2017-12-12 16:30:53 +01:00
Harald Welte 1098500d2d BSC_Tests: Verify paging stops after BSSMAP RESET on A interface 2017-12-12 09:29:15 +01:00
Harald Welte ad3339051e Add osmo-bsc.cfg and osmo-stp.cfg for this test case 2017-12-11 19:53:35 +01:00
Harald Welte 6f521d8e05 BSC_Tests: Add 12 different PAGING tests 2017-12-11 19:52:02 +01:00
Harald Welte bd868bd91e BSC_Tests: Avoid race condition with OML
We use the "oml-connection-status == degraded" to determine if
the OML connection has been brought up by the external helper.

However, this status is advertised from the moment the ID_ACK was
issued on the OML connection, and *not* only from the moment on
when we're expecting the RSL connection (after initializing all MO).

Let's introduce some delay to avoid running into a race condition here.

The proper solution is to implement OML inside the test suite, which
is too large of a task to be done right now, where the focus is on
RSL+BSSAP testing.
2017-12-10 18:28:40 +01:00
Harald Welte 15e1dea8c2 BSC_Tests.cfg: Use 'control' section as default test suite 2017-12-10 18:28:21 +01:00
Harald Welte b291770b7b BSC_Tests: Ensure TC_chan_rel_rll_rel_ind terminates with 'fail' not 'error' 2017-12-10 15:48:52 +01:00
Harald Welte 85804d4dd0 BSC_Tests: Add new TC_chan_rel_a_reset
This test case tests for proper release of RF channels after the MSC
issues a BSSMAP RESET.
2017-12-10 14:11:58 +01:00
Harald Welte f7e771027f BSC_Tests: Suppress logging for M3UA/SCCP/IPA/CTRL
This makes it easier to interpret the log output
2017-12-10 14:11:17 +01:00
Harald Welte 60e823a555 BSC_Tests: More robust against race condtions in IPA CCM and RESET 2017-12-10 14:10:59 +01:00
Harald Welte d8c36cda22 BSC_Tests: Add new TC_chan_rel_hard_rlsd (MSC sends hard RLSD) 2017-12-09 23:05:31 +01:00
Harald Welte 4003d11fe8 BSC_Tests: Add various additional test cases 2017-12-09 22:37:21 +01:00
Harald Welte a5d2ab2cdc BSC_Tests: Only one CTRL interface per BSC, not per BTS
... and use CTRL to deteremine once external OML dummy has
re-established the connection so we can start RSL subsequently.
2017-12-09 14:21:42 +01:00
Harald Welte 96c94410c1 BSC_Tests: Add CTRL interface connection 2017-12-09 03:13:36 +01:00
Harald Welte a76c4bb7b9 Extend IPA_Emulation with support for CTRL 2017-12-09 02:06:07 +01:00
Harald Welte ae02669508 BSC_Tests: Start with much simpler tests at BSSAP / SCCP level
Rather than using the more complex RSL Emulation and BSSAP emulation
components, we attach to the RSL and BSSAP Codec Ports and send some
messages back and forth for low-level testing such as timeouts, response
to RACH requests, failure of MSC to react to CR requests, etc.
2017-12-09 01:03:01 +01:00
Harald Welte f8a0bdaad5 BSSMAP_Templates: Add parameters to tr_BSSMAP_ComplL3 for better matching 2017-12-09 00:53:17 +01:00
Harald Welte 696ddb6de3 bsc-tests: Add BTS_Simulation, RSL_Tests and .cfg file 2017-12-08 14:01:43 +01:00
Harald Welte 28d943ef35 ts_BSSMAP_HandoReq: Hand in raw list as argument, not IE type
Also, add new ts_BSSMAP_Paging() template.
2017-11-25 15:01:16 +01:00