Commit Graph

19 Commits

Author SHA1 Message Date
Pau Espin 1158cc629c Move SDP templates to its own SDP_Templates.ttcn file
SDP is used in other protocols than MGCP, eg. SIP.

Change-Id: I0610b4cf5533e46a3401c65e60c7cce975c85412
2024-03-22 11:28:51 +01:00
Vadim Yanitskiy 3cc065b252 fix BSC_Tests_LCLS: do not use t_def_TestHdlrPars directly
As stated in the comment near the t_def_TestHdlrPars definition,
valueof() shall not be used for getting a value of this template.
The f_gen_test_hdlr_pars() function should be used instead.

All LCLS testcases violated this, and started to fail since
recently after patch [1] has been merged:

  "MSC_ConnectionHandler.ttcn:820 : Either imsi or imei must be set!"
      BSC_Tests_LCLS.ttcn:743 BSC_Tests_LCLS control part
      BSC_Tests_LCLS.ttcn:262 TC_lcls_gcr_only testcase

Use f_gen_test_hdlr_pars() as suggested.

Change-Id: I69ab8699b0be80b12e2df590d9170a743a00d035
Fixes: [1] b27653c6b6
2023-01-06 21:42:38 +07:00
Pau Espin 3c63053fe8 bsc: Support running several MGW node emulations
Change-Id: Ic84726c09ad3c6bea3ce6f0198db862d7dbb6dd3
2022-10-20 19:00:11 +02:00
Vadim Yanitskiy e5d393c556 BSC_Tests: add support for per-TRX RSL connections
So far it was possible to communicate with multiple BTS instances,
however we were limited to only one IPA/RSL connection per BTS.
Communicating with additional TRX instances requires establishing
additional per-TRX IPA/RSL connections.  This patch extends the
testsuite infrastructure, so that it becomes possible to have
up to 4 individual TRX instances for each BTS.

* Introduce record 'BtsParams', store per-BTS params in an array.
* IPA_RSL_PT: test_CT.IPA_RSL[NUM_BTS] -> test_CT.IPA_RSL[NUM_BTS][NUM_TRX].
* BTS_State: test_CT.bts[NUM_BTS] -> test_CT.bts[NUM_BTS][NUM_TRX].
* f_init_bts_and_check_sysinfo() accepts number of TRX instances.
* f_init_bts() accepts number of TRX instances to configure.
* f_ipa_rsl_start() accepts a BtsTrxIdx param.

* Introduce record BtsTrxIdx allowing to specify BTS/TRX index values.
* f_ipa_tx(), f_exp_ipa_rx() accept a BtsTrxIdx param (default {0, 0}).
* f_est_dchan[_dyn]() accept a BtsTrxIdx param (default {0, 0}).
** and store the given BtsTrxIdx in returned DchanTuple.
* f_chreq_act_ack() accepts a BtsTrxIdx param (default {0, 0}).
* f_expect_chan_rel() accepts a BtsTrxIdx param (default {0, 0}).
* f_exp_ipa_rx_nonfatal() accepts BtsTrxIdx (default {0, 0}).
* f_exp_chan_rel_and_clear() uses BtsTrxIdx indicated in the given DchanTuple.

* Fix CTRL/statsd expectations in TC_stat_num_bts_connected_[123].
* Fix CTRL expectations in TC_ctrl_trx_rf_locked.

The major limitation is that MSC_ConnHdlr components still have no
access to additional TRX instances - this can be implemented later.

Change-Id: Ic0fd97234464ef624010a5f01189aa61f3393b84
Related: SYS#5460
2022-06-07 09:50:10 +00:00
Vadim Yanitskiy fc63164bac library/RSL_Types: use OCT4 for local/remote address fields
This way functions like f_inet_addr() and f_inet6_addr() can be
used directly without converting between bytes and integers.

Change-Id: I389a8cb95c025c9dddc751789223621c15d9b48f
2021-07-05 12:09:07 +00:00
Neels Hofmeyr f246a925e8 bsc: allow multiple MSCs
Similar to the MSC tests, have several g_bssap and mp_bssap_cfg.
Prepare for MSC pool tests.

Replace g_bssap with a g_bssap[NUM_MSC] array.
Replace mp_bssap_cfg with an mp_bssap_cfg[NUM_MSC] array.

Requires patch I1986e4ef43beee161c82193694421b56136c1afe in docker-playground
to match the new required BSC_Tests.cfg format.

Related: OS#3682
Change-Id: Ibb36695b7c31f7b04eec6c5d59522fc0779b3c2f
2020-06-14 11:01:34 +00:00
Harald Welte 34b5a95d09 cosmetic: Update copyright statement, license notice and SPDX
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
2019-05-27 10:00:06 +00:00
Harald Welte 6811d10af7 Rename BSSMAP_Emulation -> RAN_Emulation
So far, BSSMAP_Emulation supported only a transport over BSSMAP.
However, we soon intend to merge support for RANAP in order to
simulate RANAP/Iu connections as well as BSSMAP.  Let's start
by renaming some of the existing types/functions/ports/modules
without introducing any functional changes just yet.

Related: OS#2857, OS#2856
Change-Id: Iecbcb0c6c136baad9460eca40606bb4010d8882d
2019-04-21 17:44:59 +02:00
Harald Welte 924b6ea17b bsc: replace octet string with decmatch when matching RR RELEASE
The 'decmatch' keyword allows us to match the decoded version of some
octetstring, which is very useful in the situations where we have
the L3 message only as octetstring but want to check if it matches
some L3 template.

Change-Id: I0a91e067f7e8062bf991fef8b0d4d8da740bfafc
2019-02-05 17:45:29 +01:00
Harald Welte cc32ed9096 BSC_Tests: Don't make invalid assumptions about RR RELEASE
The RR RELEASE message does not always have to be '060D00'O,
which constrains it to:
* not having any optional IEs
* not having a cause value != 00

Let's relax the matching to accept any RR RELEASE message, whatever
the cause may be, and whether or not there are any optional IEs at the
end.

At the same time, also remove some copy+pasting but rather have one
template that gets used everywhere.

Change-Id: I4b9d078c9b66f040fe673b5d957cf8e2c6d5892c
2019-02-05 15:05:26 +00:00
Max 2253c0bd1d BSC LCLS: add bts-loop tests
Add basic establishment and teardown tests for 'bts-loop' mode of LCLS:
* add explicit vty init for desired LCLS kind
* add necessary IPA RSL MDCX functions
* explicitly pass LCLS kind as a parameter to shared
  functions (defaulting to 'mgw-loop')

Change-Id: I40e786b430591899c722d99d685db26efa868508
Related: OS#3659
2018-11-19 05:54:31 +00:00
Max b1599b11e3 BSC LCLS: restructure tests
Move duplicated code into separate functions to simplify adding test
cases which do not use MGW MDCX methods for closing the loop.

Change-Id: Idf9fc8e639b0ece662ab26c481899ef39fb7edfe
Related: OS#3659
2018-11-18 20:03:25 +00:00
Max fc337ca0b1 BSC LCLS: explicitly check for RSL_IE_CHAN_NR
Check that channel number IE is present in the received message. This
fixes following warning:

The value returned by function `@RSL_Types.f_rsl_find_ie' is not used

Change-Id: Icc6824d7acef809d76c70b5ff060a8261a82e2be
Related: OS#3659
2018-11-06 19:11:34 +01:00
Max d4e569605d cosmetic: fix typos
Change-Id: I6e75af46e134d33f752214988054105aba91366c
2018-11-06 17:09:50 +00:00
Philipp Maier 55f27f53ae BSC_Tests_LCLS: try call legs with different codec/rate
since the local MGW may not support transcoding, osmo-bsc should
avoid to LCLS call legs that use different codec/rate. This test
attemts to set up a call with different codec rate and checks if
those legs do not get LCLSed

Change-Id: I91b132306e530ad9ca03fb4a34012381be6b0b52
Depends: osmo-bsc I157549129a40c64364dc126f67195759e5f1d60f
Related: OS#1602
2018-07-10 15:33:53 +02:00
Philipp Maier 61f6b573b2 BSC_Tests: Also test LCLS with halfrate codecs
At the moment LCLS is only tested using GSM-FR. There are not LCLS
tests that test with GSM-HR yet. Lets make GSM-HR available and see
what happens when we run BSC_Tests_LCLS.TC_lcls_gcr_bway_connect
on HR instead of FR.

- set channelType depending on g_pars.ass_codec_list.codecElements[0]
- add testcase TC_lcls_gcr_bway_connect_hr

Related OS#1602
Change-Id: I2421519a642bdb7453ae4a9058e177845690a489
2018-07-09 11:37:21 +02:00
Harald Welte 935fbe336a bsc: Don't expect BSC to release SCCP in LCLS.TC_lcls_connect_clear()
While osmo-bsc was still affected of OS#3331, it would release the SCCP
connection from the BSC side.  This is illegal as per 3GPP spec and
has meanwhile been fixed in osmo-bsc master.  However, the testcase
BSC_Tests_LCLS.TC_lcls_connect_clear() relied on the broken behavior,
let's fix that.

The testcase now releases the SCCP connection from the simulated MSC
side in response to the BSSMAP Clear Complete from the BSC.

Change-Id: Ic3e1f8729a093b04941ec7ca72664d53adb21229
2018-06-11 15:22:59 +02:00
Harald Welte ff579f90e5 LCLS: Introduce a copy+pasted f_connect_handler() function
... using the original one is hitting a ttcn3_compiler bug in
TITAN 6.3.1, see https://www.eclipse.org/forums/index.php/m/1789918/

Change-Id: I7c2dfd3c6e63b54c019fba0c07a1bb777d68f6b5
2018-06-03 10:34:22 +00:00
Harald Welte cc0b014903 bsc: Add LCLS related test cases
This is an early WIP, we actually will need to establish two calls/legs
before the BSC is able to locally correlate them.

Related: OS#1602
Change-Id: Ie6d0b9c38027abf65c7c564fc79b889d013fa6a7
2018-06-03 10:33:41 +00:00