aboutsummaryrefslogtreecommitdiffstats
path: root/library/RSL_Emulation.ttcn
AgeCommit message (Collapse)AuthorFilesLines
2019-08-13bsc: add TC_ho_neighbor_config_1 thru _7Neels Hofmeyr1-0/+2
Add tests to play through various neighbor configurations. Tests will pass as soon as osmo-bsc I29bca59ab232eddc74e0d4698efb9c9992443983 is merged. Add RSL2 to allow triggering handover to BTS 2. Adjust osmo-bsc.cfg to match the new tests. Also applied in docker-playground I1c57a04747f5ec004ccf4657954dcb0b003c24fc. - Actually enable handover. - Add bts 3 Depends: osmo-bsc I8623ab581639e9f8af6a9ff1eca990518d1b1211 ('no neighbors') Related: OS#4056 Change-Id: Ia4ba0e75abd3d45a3422b2525e5f938cdc5a04cc
2019-05-27cosmetic: Update copyright statement, license notice and SPDXHarald Welte1-0/+2
Some of our files didn't have a copyright notice at all, let's add it. Also, update the notices in other files and ensure a SPDX identifier is present in all but the most trivial files. Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd
2018-11-06bts: f_est_dchan: verify Chan Rqd originated by RACH arrives on RSLPau Espin Pedrol1-4/+46
We cannot notify RSL Emulation layer about expecting a specific FN (during ts_RSLDC_ChanRqd) because we only know the FN after sending the RACH request, and since notification to RSL Emulation happens async, it can happen (verified) that ChanRqd message from BTS arrives and is handled before we register the RACH req into the ConnectionTable. Change-Id: I438fd3ee82d88498d928dbcc89ce9bd80d37ab64
2018-10-24RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWNPau Espin Pedrol1-0/+8
Otherwise RSL layer fails this way when this event is received: RSL_Emulation.ttcn:429 Receive operation on port IPA_PT succeeded, message from TC_chan_act_a51-RSL-IPA(3): @IPA_Emulation.ASP_IPA_Event: { up_down := ASP_IPA_EVENT_DOWN (0) } id 9 - Function main_client was stopped. PTC terminates. RSL_Emulation.ttcn:429 Message with id 9 was extracted from the queue of IPA_PT. RSL_Emulation.ttcn:430 setverdict(fail): none -> fail reason: "Received unknown primitive from IPA", new component reason: "Received unknown primitive from IPA" We now fail with a clearer message "Lost IPA connection!". These failures seem to happen under high load when the BTS doesn't get a steady clock from osmo-trx. Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
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 Willmann1-4/+5
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-06RSL_Emulation: Stop with error verdict if conn table runs out of spaceDaniel Willmann1-6/+4
Change-Id: If1a002da97cf1b66855f2e7a0fe2a54a6428bc81
2018-06-01*_Emulation.ttcn: Specify destination when replying on procedure portsHarald Welte1-8/+8
procedure ports (like message ports) require us to specify the destination of a message ("reply") in case it is connected 1:N and not just 1:1. This didn't show up as a problem so far, as we typically only had one component talking to those procedure ports at any given point in time. Change-Id: I696ec67080815348bb95e43ecbbf262e533e39a3
2018-05-27RSL_Emulation: Handle ID_ACK event in BSC roleHarald Welte1-0/+1
In I483ddd45c1cf631a5a9d8f862b6ca728b38bdc14 we introduced code that makes the IPA_Emulation code to emut an ASP_IPA_EVENT_ID_ACK [also] to the RSL port, irrespective of client/server status. However, RSL_Emulation only handled this event in the BTS role for BSC testing, but not in in the BSC role for BTS testing. Change-Id: I99a5c58ea8d1e74b2ad51aed23009af6322a1007
2018-04-15RSL_Emulation: Less verbose loggingHarald Welte1-4/+0
Don't use explicit log() statements for normal message forwarding between ports. This will be visible in the automatically-generated log statements anyway... Change-Id: Idcfb1897dd00df1839cf1a0182a5a030bf71c0cb
2018-03-23bsc: Fix tons of TTCN3 compiler warningsHarald Welte1-8/+6
Change-Id: I60dc054d19a249d46d44585c17626746c34f4b09
2018-03-22RSL_Emulation: Introduce LastActTableHarald Welte1-2/+70
The LastActTable stores a copy of the decoded RSL CHAN_ACT for each channel number. This can be used by a RSL_DchanHandler to learn parameters of its own activation. Change-Id: I629d66e27cbe4c8b02e704a7181b3bff843e9aa4
2018-02-24RSL_Emulation: Make CCHAN_PT bi-directionalHarald Welte1-0/+4
So far we only dispatched received Common Channel messages from the wire / IUT into the CCHAN_PT. Now the tester can also send Common Channel messages back to the wire / IUT. Change-Id: If3d5516c14ea3fbbd8c3de35eaa8ea5f18a00933
2018-02-21RSL_Emulation: Pass ASP_IPA_EVENT_UP to RSL_CCHAN portHarald Welte1-2/+6
When emulating the BSC side of RSL, this can be used by a test case to wait for the RSL connection to be established. Change-Id: Iad2f6e4cb6a8f3b77e452f36a83ec11e7554e6c7
2018-02-21RSL_Emulation: Introduce notion of 'bts_role'Harald Welte1-8/+20
So far we assumed we emulate the BTS side and talk to a BSC. Let's make this configurable and disable the BTS-side spcific code paths by means of a 'bts_role' boolean type. Change-Id: I0d0460cbb633b470f6117d07643f68aefb1530eb
2018-02-13RSL_Emulation: Add procedure calls to suspend/resume dchan handlingHarald Welte1-3/+34
We introduce a procedure by which any DchanHandler can globally disable all receiving/processing of DChan related messages. This is required in upcoming handover code, as we need to block handling of messages such as RSL IPAC CRCX on the new Dchan before we have processed the RR HANDOVER CMD and raised an associated expect here in the RSL emulation code. Change-Id: Ibef65f87d0d481accbc0e019874dd43b3f9a5dbc
2018-02-13RSL_Emulation: Add second RSL/RSL_PROC port for hand-over casesHarald Welte1-6/+11
Also, extend RSLEM_{register,unregister}() with an optional third argiment, so the RSL_DchanHdlr can register 'expect' also for that secondary BTS/port during hand-over Change-Id: Ic22778f17dc4b93ef54837cf400ddd7d1732ae7e
2018-01-29bsc: Unregister old RSL channel number after assignmentHarald Welte1-1/+17
Change-Id: I27d113391094f938ff92c4d6514172ee634f695c
2018-01-29RSL_Emulation: Permit registration of explicit Channel NumberHarald Welte1-3/+76
During assignment or hand-over, a given TTCN-3 component may be interested in registering more than one channel number. Add an explicit procedure port with associated registration procedure, similar to what we already do in GSUP, MNCC and others. Change-Id: Iba37bf9541c779b79e179f995cdfa677633fadeb
2018-01-17RSL_Emulation: Initialize the ConnectionTableDaniel Willmann1-0/+11
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-03Add comments with short module description on top of each fileHarald Welte1-0/+17
Change-Id: Id934d7a763b619d52cbec7de439b3708225b81f3
2017-12-17BSC_Tests: Prepare for tests based on {RSL,BSSMAP}_EmulationHarald Welte1-0/+2
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-09RSL_Emulation: Move templates into RSL_TypesHarald Welte1-32/+0
2017-12-09IPA_Emulation: split t_ASP_RSL_UD in send and receive templateHarald Welte1-4/+4
2017-12-08library: Add RSL_Emulation.ttcnHarald Welte1-0/+332
This emulates the RSL part of a BTS towards a BSC