Commit Graph

3421 Commits

Author SHA1 Message Date
Vadim Yanitskiy 59f292dbb3 [WIP] BSC_Tests: add TC_assignment_crcx_nack
Change-Id: I3cfa86c9a338f5c2b8ab6ff824e546dc1642d448
Related: OS#5572
2022-06-28 04:00:12 +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
Pau Espin ee961c77fd DIAMETER: Send QoS AVPs in Gx CCA
This way we can trigger code paths in GGSN/PGW parsing those.

Change-Id: Ib758d4e3acc331954aca6423372410cb1e341ebd
2022-06-07 08:15:19 +00:00
Pau Espin 6477d7358a DIAMETER: Introduce and rework some AVP templates
All the AVP ecosystem in DIAMETER is quite a mess. There's AVPs defined
in several different specs, sometimes even with the same name and
different AVP code and vendor.
Hence, as we add more templates it becomes important to start using the
prefix in order to differentiate where they come from.

Change-Id: Iec7c51dae136629d6b754de4dd798e988ac51f6b
2022-06-07 08:15:19 +00:00
Vadim Yanitskiy 6be4cf414b BSC_Tests: fix TC_lost_sdcch_during_assignment (SCCPlite)
When running ttcn3-bsc-test against osmo-bsc in SCCPlite mode,
TC_lost_sdcch_during_assignment fails with the following output:

  Local verdict of MTC: fail reason: "Timeout of T_guard"
  Final verdict of PTC: fail reason: "Unexpected DLCX received"

One key problem is that in f_TC_lost_sdcch_during_assignment() we
expect to receive a DLCX message on port MGCP, but somehow it gets
caught by the as_Media_mgw earlier than we attempt to receive it.

* Fix this race condition by activating the as_Media_mgw with
  fail_on_dlcx := false, so that it does not catch DLCX messages.

Another problem is that for SCCPlite we're running the MGCP_Emulation
component with multi_conn_mode=true, so that all MGCP messages are
arriving at port MGCP_MULTI (not MGCP) wrapped into MGCP_RecvFrom.

* Expect the DLCX message on either of the two ports depending
  on the value of g_pars.aoip (AoIP or SCCPlite mode).

This change makes BSC_Tests.TC_lost_sdcch_during_assignment pass.

Change-Id: If4807d3d7d196682f7f22732ad47bcbb72858ed3
2022-06-04 22:14:01 +06:00
Vadim Yanitskiy 69170519b0 BSC_Tests: fix a race condition in TC_imm_ass_pre_[ts,chan]_ack
These test cases sporadically fail on Jenkins and 9/10 times on my
machine.  The problem appears to be that we are sending both the
RSL CHANnel ReQuireD and the VTY command simultaneously, and the
later may be handled earlier than the former by osmo-bsc.

Ensure that the RSL message is handled first by sending the VTY
command after we have received the RSL CHANnel ACTivation message.

Change-Id: I38cd31041741b69eb15098a089b4d4b6b918ffd4
2022-06-03 14:12:14 +06:00
Vadim Yanitskiy bf2aa4999f library/RSL_Types: fix wrong comment near tr_RSL_MsgTypeT
Change-Id: Ic10e324375d1495d94352e7229e6be481106e8bb
2022-06-01 00:29:56 +06:00
Vadim Yanitskiy 329d7ee41b bsc/osmo-bsc.cfg: change logging level nm info -> notice
Stop spamming logs with tons of DNM messages (state changes, events).
GSMTAP emits all these messages (including 'debug' ones) anyway.

Related: I49352b3caf9f6bbdd594cfcdea54038fc0eaa874 (docker-playground.git)
Change-Id: I9e60ea0968a44aa29753226626864ac9f4c1f8ab
2022-05-29 20:29:50 +06:00
Pau Espin d7963bb037 mgw: Introduce test TC_two_crcx_mdcx_and_iuup{_rtp}_rfci_unordered
Related: SYS#5969
Change-Id: I2523f18a0fdba87f4e13a2ce3c5da482c4af2e3c
2022-05-26 21:08:16 +00:00
Neels Hofmeyr 61f9dc5a70 bsc: test lchan rel during LCS Loc Req
Test this scenario:

Emergency call is started;
Location Request is started to locate the emergency;
lchan releases early for any reason;
(Do not send Clear Request immediately);
Location Request is completed, locating the emergency.

Related: SYS#5912
Related: Ib44dd05b0adee84234f671313b156ff6625357cc (osmo-bsc)
Change-Id: Idea690a4aa4aecbe4642a16e96d086cc0538564a
2022-05-26 19:29:58 +00:00
Pau Espin 6ed763001d Allow Setting IuUP_Cfg from test using RTP_Emulation
Change-Id: I4e8296dae40277be51974338bc0d21c939eec149
2022-05-26 18:27:39 +00:00
Pau Espin 52ee518e28 IuUP: Encode Initialization according to cfg
Change-Id: I1dec3a8dcc829ad2c308636b697b089e873fd824
2022-05-26 18:27:39 +00:00
Pau Espin 5b4f2c691f IuUP: Improve enc/dec of PDU Type 14
Related: SYS#5969
Change-Id: I33e8a82e654b5afef8bc468cf6b1fff8fa9637ce
2022-05-26 18:27:39 +00:00
Pau Espin 74d5dadc8a stp: Fix sporadic failure in TC_ipa_to_m3ua_ni
It was spotted that from time to time the test set NI international
instead of national. This is presumable due to a race condition between
VTY and messages being received and forwarded.
Let's delay resetting the VTY config after the message is recieved, to
avoid the race conditions between them.

Change-Id: I3ef08447d2e36b6948d3db4ec9d1459beebc9384
2022-05-26 12:52:07 +00:00
Pau Espin 52562c9ca1 ggsn: test Gy Volume-Quote-Threshold feature
Change-Id: If10171589e915db8e78278d2d802e38c66b37687
2022-05-25 16:13:56 +02:00
Pau Espin cba0f6d292 ggsn/pgw: Fix Gy CCR Reporting-Reason expectancies
The Reporting-Reason can be in different places depending on its values.
In the case of TERMINATION, we expect it to be FINAL so we know its
location.

Change-Id: Id33b9bb2f7b469e03a0761dc8807770cfdf77fcc
2022-05-25 14:13:02 +00:00
Eric Wild c01eada147 tcpdump capture script: check permissions to fix running in a netns
This might be all caps (=ep), or a list of all caps.

Change-Id: I75f7af6cc67e96ffb7b002591f7f7d1da9b5a51d
2022-05-24 08:32:52 +00:00
Eric Wild 85cc161c0d msc tests: fix test so they don't depend on previous test runs
The test currently implicitly check the vlr state left by preceding tests.

Change-Id: Iebaecd28a426b15baf4729f40b46dd33da79cbae
2022-05-24 08:32:45 +00:00
Pau Espin 2fde1efd8e pgw: Validate charging reported values
Change-Id: I5024abc672bf92d41027c4c78d2925d0537bb470
2022-05-23 11:38:05 +02:00
Pau Espin 8fa2284189 ggsn: Validate charging reported values
Change-Id: I497309bb0b30c61bdb00e0c08f18294ecd4dd485
2022-05-23 11:35:37 +02:00
Pau Espin 733369ab20 cosmetic: ggsn: document and clean up section in GT_CT
Change-Id: I8bafb546d5d8b819cb0962b50049005ff2b85cb4
2022-05-20 18:39:55 +02:00
Pau Espin d6b51330ab ggsn: TC_act_deact_retrans_duplicate: Fix case where initial seq_nr is 65535
Change-Id: I2a7a399cf962311aaf7270260cb2e4e00e5a676a
2022-05-19 17:48:49 +02:00
Pau Espin 82a7f7033a ggsn: Fix seq_nr overflow
As seen running a test:
GTP_Templates.ttcn:87 Dynamic test case error: The first argument of function int2oct(), which is 65536, does not fit in 2 octets.

Change-Id: Icbaf42879bade6f5b4e39144ec123bc1b3f893f8
2022-05-19 17:41:40 +02:00