Commit Graph

3642 Commits

Author SHA1 Message Date
Pau Espin db247f8318 cbc: Support mme/bsc sctp/tcp server mode
Related: OS#4945
Change-Id: I9fa4ddfa18ac85644f219874e6b2166e1795e3a9
2022-08-02 11:50:54 +02:00
Pau Espin 7e45128ec0 cbc: Add Tguard
Change-Id: I92b0a2ec931cefed34a33bd90cbc5c97d0aec540
2022-08-02 08:37:16 +00:00
Pau Espin ae2e51557f cbc: Send Write-Replace-Warn-Ind after ACKing the request
This way we can test how does osmo-cbc behave when receiving such
message.

Related: OS#4945
Change-Id: Ifcdcddc7dccb5439126a5fa29bb540669ed25908
2022-08-02 08:37:16 +00:00
Pau Espin e14c2087cf cbc: Change default cbsp/sbcap ports to allow multiple bsc/mme
The BSC/MMEs ports are applied in osmo-cbc.cfg similarly in sequential
order.

Change-Id: Ib443aba9396aebe0a56b1a79719bbcf66302a1aa
2022-08-02 08:37:16 +00:00
Pau Espin 1976346cb7 cbc: Enable MMEs and BSCs selectively
Let's only create BSC handlers (no MM handlers) in tests validating CBSP
specific features.
A new test is added to specifically validate scenarios with both an MME
and BSC attached to the CBC.

Change-Id: I79ee41f183ef49e9fd606d2a3efa2767628bf142
2022-08-02 08:37:16 +00:00
Vadim Yanitskiy c78aeb7cc6 BTS_Tests: increate Tguard to 30.0s for TC_rsl_ms_pwr_dyn_up
A comment in f_TC_rsl_ms_pwr_dyn_up() states:

> By default, the MS power loop gets triggered every 4th SACCH block (1.92s).
> We need 9 * 4 dB steps to get from 0 dBm to 33 dBm, so 9 * 1.92s total.
> Add an extra offset to avoid race conditions: +1.92s.

so the alt statement is expected to block for 19.2s, while the guard
timer is set to 20.0s by default.  This is not enough, given that
f_TC_rsl_ms_pwr_dyn_up() also needs to wait for the first SACCH block
before entering the alt statement.

Let's give it more time to run in order to avoid sporadic failures.

Change-Id: Ib7de8383c95ac9e00560f786ec4c56f79f7d81bc
Related: OS#5635
2022-08-01 12:37:19 +00:00
Vadim Yanitskiy e3351bb2ad BTS_Tests: tune back to CCCH/BCCH in TC_sacch_chan_act_ho_[a]sync
Sending L1CTL_DM_REL_REQ does not make the L1 tune back to CCCH/BCCH.
We need to send a L1CTL_FBSB_REQ after releasing a dedicated channel
if we want to establish another one.  This is essential when running
tests using Calypso PHY, and will be required once we have proper
trxcon_fsm implementation [1] merged.

Related: [1] osmocom-bb.git Ifaf63ead9dd180181358e771367b2a686ba159ca
Change-Id: I65fb243a62fc7670b43f467d6b79268cdfb98f36
2022-08-01 12:37:19 +00:00
Vadim Yanitskiy 2534135632 BTS_Tests: f_est_rll_mo(): add waiting timeout (2s)
This helps to find where the problem is a lot quicker.

Change-Id: I71ab69d85f453964749270d970c55e6f577a73a1
2022-08-01 12:37:19 +00:00
Vadim Yanitskiy 68c4cff30e library/GSM_RR_Types: make ts_SacchL1Header easier to use
Move parameter 'fpc' at the end and assign false by default, so that
there is not need to pass false.  We never set it to true anyway.

Change-Id: I8a0ef562c2426a637fbb9fe3d50711ee7738d04f
2022-08-01 12:37:19 +00:00
Pau Espin 3dfa807769 cbc: Fix use of incorrect variable in loop
This went unnoticed before because all tests were running with both bsc
and mme set to 1.

Change-Id: I978c92819cb4e218c95bc719ade71787dc474b23
2022-07-29 16:29:55 +02:00
Pau Espin 4ff118a230 cbc: Handle each CBSP and SBc-AP on a separate component
* Each BSC_ConnectionHandler emulates a BSC and handles one TCP/CBSP
  conn.
* Each MME_ConectionHandler emulates an MME and handles one SCTP/SBc-AP
  conn.
* ECBE related functionalities are moved to its own file
  ECBE_Components.ttcn.
* CBS_Message is moved to its own file since it is used by all modules.

Related: OS#4945
Change-Id: Ia0300a2ae69bdf604373dbc484537958413c79a2
2022-07-29 13:04:36 +00:00
Pau Espin 78d80e7469 sbcap: Expect IE Send-Write-Replace-Warning-Indication
Since osmo-cbc.git I563e7d1c999f14b8197bb41e85b7bcf6262fe2a0, Write
Replace Warning Indication is sent, so expect it.

Change-Id: I84e3ae7a532a8a76ac1c26d357da7eaa73f39374
2022-07-28 12:39:39 +02:00
Pau Espin e736981121 cbc: Fix f_sbcap_tx_write_replace_warn_resp()
The line was wrongly removed when pushing a new version of the patch for
review submission.

Fixes: 7c13cb7e0f
Change-Id: If99ff5b83e8f0c577e60e0406b001a3753213deb
2022-07-20 18:17:05 +02:00
Pau Espin 7c13cb7e0f Support for SBc-AP protocol as used on the MME-CBC interface
This requires a recent libfftranscode (>=0.5) with SBC-AP support.

The asn files are obtained from 3GPP TS 29.168.

Related: osmo-cbc.git Ib278bc1d1a74459814016fef7a8fe21cc29d46c9
Related: docker-playground.git 5f3c78105836d1f2c229655df3f537a73ab6e12a
Change-Id: Ia6743e0a3e7974a5f2dd3ecf74ec331f646f6bc2
Related: OS#4945
2022-07-18 11:20:14 +02:00
Oliver Smith bf458d5f9f checkpatch.conf: ignore imported sbcap *.asn files
Prepare to import files to library/sbcap, which we don't want to be
linted in Ia6743e0a3e7974a5f2dd3ecf74ec331f646f6bc2.

Change-Id: I3ab3253753d32a266bdaf32fb247c2c0139d40d3
2022-07-18 08:56:46 +00:00
Pau Espin 528f5affda bsc: cbsp: Expect one Reset/Failure Ind for each Bcast Msg Type
As described in 3GPP TS 48.049:

7.8.2: "The RESTART message is sent once per broadcast message type as
 indicated by the Broadcast Message Type IE."
7.9.2: "The FAILURE message is sent once per broadcast message type as
 indicated by the Broadcast Message Type IE."

Related: osmo-bsc.git Change-Id I6668b55868cf534a3b59da5e11542abb8131d604
Related: SYS#5910
Change-Id: I05da2f61d26a1124d30793184d81aabf212cddda
2022-07-15 14:51:48 +02:00
Pau Espin 696fbe75a2 bsc_cbsp: Support receiving CGI as cellID in CBSP Reset and Failure Ind
New versions of osmo-bsc send CGI instead of LAC+CI, which provides more
information (PLMN).

Related: SYS#5910
Change-Id: I48e86150f499f0f458f75f132087319d80f86448
2022-07-15 14:51:43 +02:00
Philipp Maier 13aff99872 MGCP_Test: add testcase TC_e1_dlcx_wildcarded
We are currently testing the behaviour of wildcarded DLCX on the virtual
trunk. Lets run a similar test on the E1 trunk as well.

Change-Id: I6cfbd24982d1e72206f8237b2eaea52cdaebf9dc
Related: OS#5572
2022-07-11 19:14:59 +00:00
Philipp Maier 6c740e8d52 MGCP_Test: fix TC_dlcx_wildcarded
When the final condition of the testcase is verified through statsd,
there may be still (invalid) data from a previous measurement in the
statsd pipeline, querying the stats once before verifying the actual
stats fixes the problem.

Change-Id: I5fe18e433b32c364778b515ed37fcbcf443b3cb3
Related: OS#5572
2022-07-11 19:14:59 +00:00
Pau Espin ac71dbb1e5 cbc: Refactor and split f_cbsp_write()
Change-Id: I827fad869c6ca5ce80dd39d30c2e3393b2394217
2022-07-08 17:14:45 +02:00
Vadim Yanitskiy 52aee747b4 BSC_Tests_CBSP: fix f_exp_rsl_etws(): add some guard time
Recently I noticed sporadic CBSP test case failures on Jenkins:

  Timeout waiting for RSL_OSMO_ETWS_CMD (disable)
    BSC_Tests_CBSP.ttcn:1209 BSC_Tests_CBSP control part
    BSC_Tests_CBSP.ttcn:1056 TC_cbsp_emerg_write_bts_cgi_cchan_disable

The related timeout is set to 5.0 seconds in f_exp_rsl_etws(), what
matches the Warning Period IE sent in CBSP WRITE-REPLACE message.

Adding a debug log printing T.read on receipt of RSL_OSMO_ETWS_CMD
reveals that we're cutting it too close: the message arrives just
a few milliseconds before the timeout expires.

  f_exp_rsl_etws(): T := 4.999196s, remaining 0.000804s
  f_exp_rsl_etws(): T := 4.998683s, remaining 0.001317s
  f_exp_rsl_etws(): T := 4.999344s, remaining 0.000656s

Let's increase the timeout value (+0.5s) to avoid sporadic failures.

Change-Id: Ia40a268f9780ffbcfa2bb962d7c1ac25d16193de
2022-06-28 23:40:36 +07:00
Vadim Yanitskiy d3bef0a0a0 BSC_Tests_CBSP: cosmetic: move T.start closer to the alt statement
Change-Id: Ib84fadad77b908f0bb71d6fdefda2513ee510ce1
2022-06-28 23:16:07 +07:00
Vadim Yanitskiy 87ebd0bd16 library/MGCP_Templates: add send template ts_MgcpResp_Err
Change-Id: Ib0462228cece29952c91b4d18ebe2d89fed70c03
Related: OS#5572
2022-06-28 03:58:38 +07:00
Pau Espin d5496adfdb bsc: Call f_shutdown_helper() in BSC_Tests_CBSP tests
This should avoid some sporadic failure sptted during tear down.

Change-Id: I5ddce5cfcbfb057b4559a5d5a710d218bae1d8fe
2022-06-23 18:47:31 +07:00
Vadim Yanitskiy 65d879d957 bsc: release dchan in TC_cbsp_emerg_write_bts_cgi_dchan
A follow-up patch is adding BSC_Tests.f_shutdown_helper() calls to all
CBSP testcases, what makes TC_cbsp_emerg_write_bts_cgi_dchan fail due
to talloc count mismatch.  All dchans need to be released to avoid this.

Change-Id: I8b707c821693f930ab10bd8feea08ba5007da967
2022-06-23 18:47:31 +07:00
Vadim Yanitskiy 5eb06a3865 bsc: make BSC_Tests_CBSP module a friend of BSC_Tests
This allows BSC_Tests_CBSP to import friendly API from BSC_Tests.
The line importing stuff from BSC_Tests BSC_Tests_CBSP.ttcn is moved
on top for consistency with an existing friend - BSC_Tests_VAMOS.

Change-Id: Ie0bb5c2e33aadd4858f0f6d001468985c40ab152
2022-06-23 18:47:26 +07:00
Pau Espin 9d8b6bf717 cbc: Introduce f_shutdown_helper() and call it in every test
Change-Id: I95e6f8a5a5c35d35662950e1105bdb17d2ca00de
2022-06-23 18:34:27 +07:00
Pau Espin 51dca9fa15 ggsn,pgw: Expect Multiple-Services-Indicator AVP in Initial CCR
Multiple-Services-Indicator AVP is only meant to be sent in CCR Init.
Let's not expect it in Update nor in Termination CCR, open5gs stopped
sending it there recently in 9948fba05afb8e1b118f0c29a84ffe38c0f21b75.

Change-Id: Ic4d6be4bf28c65817ce912a8be10937db0b5dba9
2022-06-21 17:07:20 +02:00
Pau Espin 07746ad99e cbc: Improve CBSP port configuration
Previous -1 was taken by TTCN3 as default port (9999). Let's keep it
excplictly as 9999 by default to avoid changing docker-playground.git.

Change-Id: Ia7c599faa2101180089085c6cf5d483d2325ecac
2022-06-17 20:28:22 +00:00
Pau Espin 2b33d4e2d3 bsc-cbsp: Test BTS Failure+Restart when BTS becomes (un)available
Related: SYS#5910
Change-Id: I35ddde7bc2e39d35c301f1153416b549ba1630cd
2022-06-17 20:27:07 +00:00
Pau Espin f2c701df80 cbc: Fix trailing whitespace
Change-Id: Ie54a6f6b9aea84ae1ec67ca34a34dd171f2e0177
2022-06-16 19:00:47 +02:00
Pau Espin 7b23060141 SABP: Add regen_makefile.sh
Other similar libraries also have it.

Change-Id: I74b31c041b254713b95821ff166640465ccd1409
2022-06-15 16:28:23 +02:00
Pau Espin 3cfb6c35c2 Move SABP_Selftest.ttcn under library/sabp
Same as we already have for RANAP.

Change-Id: If04d973a393153a7cd15429d036f60adeea4b5f9
2022-06-15 16:20:11 +02:00
Pau Espin 3caeebc95e Move all SABP files to library/sabp/
Let's have all SABP related stuff together in one subdir, not some under
the subdir and some directly under library/.

Change-Id: Ibfd0287194c87dcc240590e0835d6205ead194f9
2022-06-15 16:20:11 +02:00
Pau Espin b6300d1ee2 Move RUA_Emulation under library/rua/
Let's put it under library/rua to have all RUA_* files together.

Change-Id: I22bc9b53675e1f8e6b7cd834b743aa90304b522e
2022-06-15 16:20:11 +02:00
Vadim Yanitskiy 31778dd5b7 BSC_Tests: fix race conditions in TC_imm_ass_pre_{ts,chan}_ack_dyn_ts
The TC_imm_ass_pre_chan_ack_dyn_ts sporadically fails on Jenkins.
Similar to [1], this is happening because the VTY command setting
the 'immediate-assignment' strategy back to 'post-chan-ack' is
being sent/processed earlier than the CHANnel REQ message.

TC_imm_ass_pre_ts_ack_dyn_ts is likely affected too, also fix it.

Change-Id: I1e38142d29d0fa2946a858eac13319aa05b42aa3
Related: [1] I38cd31041741b69eb15098a089b4d4b6b918ffd4
2022-06-15 02:08:46 +07:00
Vadim Yanitskiy cd948e4d22 BSC_Tests: remove redundant f_init()/f_sleep() calls
Calling f_init() more than once does not make sense.

Change-Id: I625763b03c78835f6c4a80edd40cb3572411f7a2
2022-06-14 20:52:03 +07:00
Pau Espin def56579c2 hnodeb: Test passing unordered list of RFCIs
This feature is available since Audio SAPI version 1, which was
recently added. Let's update the test to cover this feature.

Related: SYS#5516
Change-Id: Ib8961630a1ebe6f6bfee5af0889aa129e491cb2b
2022-06-13 20:52:15 +00:00
Pau Espin 4759074556 hnodeb: Update primitives to audio SAPI version 1
Audio SAPI version 1 has been added recently in osmo-hnodeb.git
I860d18b80c1041bf63a1570d435e0568c0f6b01b.
Let's update our HNBLLIF emulation to support and use it.

Related: SYS#5516
Change-Id: I9af56f5e6a70b350f2fffa2e04be384d101b52ed
2022-06-13 20:52:15 +00:00
Neels Hofmeyr eec123542e bsc: add config files for sccplite BSC tests
Helps running sccplite tests locally.
Config files adapted from docker-playground/ttcn3-bsc-test/sccplite/

Change-Id: Ia92b4a7fda2195ce6e6aaf0bccd808df40057896
2022-06-13 19:16:18 +00:00
Pau Espin 80d4b4fc12 bsc: Fix IPA_CFG_PORT handling several connections
Recent commit changing the layout of bts/trx port config made
IPA_CFG_PORT be connected severa times when calling f_ipa_rsl_start()
for each BTS/TRX.

Let's have separate ports per BTS/TRX as done in other ports in the
test_CT component.

This avoid this error when calling f_ipa_rsl_stop():
"""
Dynamic test case error: Port IPA_CFG_PORT has more than one active
connections. Message can be sent on it only with explicit addressing.
"""

Change-Id: I916186c87c398ebb2d7f82f73b94de75034e346d
2022-06-10 18:51:58 +02:00
Pau Espin 85e1853029 hnodeb: Allow setting hnbllif sapi versions
Version 1 of audio SAPI will be used in follow-up patch.

Related: SYS#5516
Change-Id: I24d757d3dfa4148537db49d70c525e1a81836426
2022-06-09 14:37:08 +02:00
Pau Espin c22fb5fc07 hnodeb: Fix passing pars to f_start_handler()
isvalue() returns false when the template is not omit, which is
unexpected in this code path. Let's explicitly test against "omit" here.

Change-Id: I05bb47dc12b4544a6f2d4fc1fadc9e68da374f8b
2022-06-09 14:37:08 +02:00
Neels Hofmeyr 82e79b095d hnbgw: fix id string s/HBGW/HNBGW
Change-Id: I5935208843851fdac3536269617b56e8459b578d
2022-06-08 12:09:26 +00:00
Neels Hofmeyr 799cc24c9b hnbgw: drop unused hexstrings
Change-Id: Ic589f2f48da79302f88724a708b43a4cfa865890
2022-06-08 12:09:26 +00:00
Neels Hofmeyr f0b9ed14bd hnbgw: test SCCP CR without payload
Various tweaks are required to allow RAN_Emulation to handle, and also
to expect, an SCCP CR that has no payload data.

Related: SYS#5968
Related: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328 (osmo-hnbgw)
Change-Id: I827e081eaacfb8e76684ed1560603e6c8f896c38
2022-06-08 12:07:55 +00:00
Pau Espin 7d58b0817e GTP: Send more QoS IE fields by default
This way we trigger more code paths in the GGSN_Tests IUT, like parsing
the QoS IE. This is interesting because the QoS IE has quite a complex
encoding, specially the MBR/GBR part. Those fields in turn are also
modified during the answer based on AVPs received during Gx set up of
that session.

Related: SYS#5984
Change-Id: Id195eedf530e2eff753d057ce2302dfb5275bfcd
2022-06-08 11:44:40 +00:00
Vadim Yanitskiy 9d06c638db library/StatsD_Checker: make logging messages more readable
Change-Id: I0484f36184fe3724c57cedcf203894d701b91605
2022-06-07 14:56:16 +00:00
Vadim Yanitskiy 7a3d293c62 BSC_Tests: configure 3 additional TRX instances for BTS2
Change-Id: Ie1241c54abac9a56906c525155cbf7482bca738e
Related: Iba4fbd5c9ed59783df4ac64e68b2beef73a812ff
Related: SYS#5460
2022-06-07 09:50:10 +00: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