Commit Graph

3507 Commits

Author SHA1 Message Date
Vadim Yanitskiy 9e0139ba6d library/RSL_Types: account lengthof params in ts_RSL_MultirateCfg
In TTCN-3 it's not possible to store templates in records, so in
f_assignment_codec() we match received RSL_IE_MR_CONFIG against the
value (not template!) stored in g_pars.expect_mr_conf_ie.

Because of that, the length field is not being calculated by TITAN
for us, so we need to calculate it in ts_RSL_MultirateCfg ourselves.
Automatic length calculation only works during encoding/decoding
and when matching against a receive template.

Change-Id: I595be86d69913ba25e965a5a5c6977e00c342e60
2022-09-14 17:48:38 +07:00
Neels Hofmeyr bacb74f241 hnbgw: test PS RAB Ass both with and without PFCP
Add mp_enable_pfcp_tests. When true, osmo-hnbgw-with-pfcp.cfg needs to
be used.

Related: I39b9632f8524a9f3455c1a2d7611bfe8ba07c2fd (osmo-hnbgw)
Related: I02b60941343000a4618e95f56326bec170c32bfe (docker-playground)
Related: SYS#6093
Change-Id: I511e758807e0512c18f3f9e0a8c4699b9a3f5992
2022-09-14 10:42:36 +00:00
Vadim Yanitskiy 0345d20778 library/RSL_Types: add params argument to ts_RSL_MultirateCfg
Change-Id: Ia85339a9c268abc84f9b4228f8d418f1dac786e6
2022-09-14 16:47:18 +07:00
Vadim Yanitskiy b9bf00f96a BSC_Tests: fix TC_assignment_osmux_cn: use c_mr_conf_5_90
Currently this testcase fails:

  RSL MR CONFIG IE does not match expectation.
  Expected: { other := { len := 2, payload := '2804'O } }

Change-Id: Icc5381eccb924803b1117b46d2b4c47cee6dabd7
2022-09-14 16:47:18 +07:00
Vadim Yanitskiy 36fe958279 BSC_Tests: use c_mr_conf_5_90 in TC_assignment_codec_amr_startmode_cruft
This way it's easier to see that the only difference from other
tests using c_mr_conf_5_90 is the ICMI field set to false.

Change-Id: If7b491fa55a9366520c2d665a700c5badb187fae
2022-09-14 16:47:18 +07:00
Vadim Yanitskiy 5949470f1a BSC_Tests: cosmetic: s/mr_conf_amr_5_90/c_mr_conf_5_90/
* This is a global constant, so prefix with 'c_' for consistency.
* The RSL_IE_MultirateCfg is all about AMR, remove redundant 'amr'.

Change-Id: I72405b7139fcfd0dbe90afc469ed4db71b43a87c
2022-09-14 16:47:18 +07:00
Vadim Yanitskiy f14e696656 library/RSL_Types: s/amr_codec_modes/codec_modes/ in RSL_IE_MultirateCfg
The RSL MultiRate configuration IE is all about AMR (Adaptive Multi
Rate) codec, so there is no need for 'amr_' prefix in field names.

Change-Id: If63ee50e8681ad4e0a202f142f2fca2268d55079
2022-09-14 16:47:18 +07:00
Vadim Yanitskiy fcce70596a BTS_Tests[_VAMOS]: use default param values for ts_RSL_MultirateCfg
There is no real need to pass the multi-rate parameters explicitly
in each invocation of ts_RSL_MultirateCfg.  The exact multi-rate
configuration does not matter in scope of BTS specific tests.

Change-Id: I24117af8c5b7b11fe4b8f24fca5279ad97b46fab
2022-09-14 16:47:18 +07:00
Vadim Yanitskiy 4d85208f01 fixup: bsc: Add testscase & infra to validate Osmux support BTS<->BSC
The per-BTS VTY command 'osmux (on|off|only)' was added to osmo-bsc.git
recently, and is not available in -latest yet.  Use it conditionally.

Change-Id: Id501d3f4b5eb18b096d8baffcb5f38e583f7a3d8
Fixes: I6e82eb9d995de988b812001e1c4cf6923509de66
2022-09-14 16:44:15 +07:00
Pau Espin 39bfa0298b bts: Add testscase & infra to validate Osmux support BTS<->BSC
Related: SYS#5987
Change-Id: I1af23c7a60b05edc3b544f1fea0023f48e89f7a7
2022-09-13 11:20:11 +00:00
Pau Espin 29c6dfb46d bsc: Add testscase & infra to validate Osmux support BTS<->BSC
New TC_assignment_osmux_bts is added which tests Osmux used only
BTS<->BSC.
Existing TC_assignment_osmux is renamed to TC_assignment_osmux_cn,
and a new TC_assignment_osmux is added which tests using Osmux on both
sides (towards BTS and CN).

Related: SYS#5987
Change-Id: I6e82eb9d995de988b812001e1c4cf6923509de66
2022-09-13 11:20:11 +00:00
Pau Espin f0b9fa0574 hnbgw: Introduce test TC_hnb_reregister_reuse_sctp_assoc
Change-Id: I7386bd4e786daf2688a68ab174a9d4f0b093a741
2022-09-12 21:28:15 +02:00
Pau Espin 83a4961753 hnbgw: Start only needed amount of HNBs emulations
Change-Id: Id0e1c7423f016989de997e2be10516f4413ac245
2022-09-12 21:11:05 +02:00
Pau Espin bcf135a0d0 bts: Fix BTS_Tests_VAMOS tests using AMR
Recent commit forgot to add the required new params to VAMOS tests.

Fixes: 091c530555
Change-Id: Ia382e200b51a7ddb99dc2583b538432740fd298c
2022-09-08 13:24:29 +02:00
Pau Espin 5bd8e88195 Osmux_Emulation: Add DATA port
Similar to what's already present in RTPEM_Emulation, this allows tests
to retrieve the Osmux messages received.

Related: OS#5987
Change-Id: Id9aa3a0a02ef5a5e39b4df8a1c165f35255829ab
2022-09-07 11:29:14 +02:00
Pau Espin 091c530555 bts: Test AMR in TC_speech_rtp_tch{h,f}()
Related: SYS#5987
Requires: osmocom-bb.git Ib80be434c06d07b3611bd18ae25dff8b14a7aad9 (trxcon)
Change-Id: I8cf7792a00b0a858f6a02bf5cb0d283484b820eb
2022-09-07 11:28:19 +02:00
Pau Espin 1a8f8f8ab6 library/AMR: Add RTP AMR helper structs and functions
Change-Id: I40cd999badeeefa38a393af9008d8ce047e3c778
2022-09-07 11:28:03 +02:00
Pau Espin 440e1dcb34 bts: Pass AMR codec info over L1CTL and RSL
Related: SYS#5987
Depends: osmocom-bb.git Change-Id Ia20bc96e39726a919a556c83c8be48cb31af7331
Change-Id: I3db7f6a4b7819b16ada83862f2a5409db4fa21f9
2022-09-07 10:46:17 +02:00
Pau Espin 71ed463957 Move AMR defintions out of OSMUX_Types to its own file
This way they can be used without the need to import OSMUX related
modules.

Change-Id: I0edfbb7359516ba77180afab18c3e1ffb2d0c927
2022-09-07 10:46:17 +02:00
Pau Espin f7634dc706 BSC: Implement RSL_IE_MultirateCfg and use it in BSC_Tests
Change-Id: I0a5ddce570c0fd70f096d897b0b609d20b552ff7
2022-09-07 10:46:13 +02:00
Pau Espin 8539312f8f cosmetic: RSL_Types: Fix trailing whitespace
Change-Id: I664cc5a00240a308df5ed36feafe0779be152ec0
2022-09-02 17:57:11 +02:00
Pau Espin 17da32340e cosmetic: L1CTL: Fix trailing whitespace
Change-Id: I9d0446c21e1331c426bca0dad434f32de0ff0d38
2022-09-02 17:06:31 +02:00
Vadim Yanitskiy 095b32d497 bts: update expected-results.xml
Change-Id: Ifcd8601d1aadce78a1b0a0ed814ae9e77e8497aa
2022-08-30 19:46:15 +07:00
Vadim Yanitskiy 5f6dd352ea BSC_Tests: fix race conditions in TC_chan_alloc_algo_ass_dynamic
In cases a), b), c), d), and e) we're sending one or more Measurement
Reports via the A-bis/RSL, and then immediately triggering a traffic
channel assignment by calling f_TC_chan_alloc_algo(), which sends an
Assignment Request via the A interface.

The above-mentioned messages are sent immediately all together, so it
may happen that the BSC handles the Assignment Request earlier than
the Measurement Report(s).  In this case there will be no RxLev
samples, so the BSC would fall-back to ascending allocation order.

Recently we saw this race condition actually happening on Jenkins:

https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test-sccplite/1583/

Let's introduce an artificial delay before sending the Assignment
Request, so that the BSC has enough time to process received MRs.

Change-Id: I2fd6508488e935d208a7aba8e2f215b1cc14ad32
2022-08-29 15:39:06 +00:00
Vadim Yanitskiy 8b4e046b5d BTS_Tests: add TC_{chan_act,encr_cmd}_a54 to control
Both testcases were introduced in 2021 [1], however they're not
executed on Jenkins because they're not present in control section.

Fixes: [1] I38e8a1cf15eb41a621b457b39024283a767c94be
Change-Id: Iebf6d14321b54e7ef261443aece03296540ebe92
2022-08-27 19:24:32 +07:00
Daniel Willmann 28209ecdac hnbap: Use protocolExtensions := * in tr and omit in ts templates
Change-Id: Ic8f9afc9d74507f7d73f52cefc92ed1c2dc4b1bc
2022-08-24 13:57:52 +02:00
Daniel Willmann c79679a2de hnbgw: Add test to check for duplicate hnb registrations
Change-Id: Ib20d07ffabb91dfa82c212aaa363cafc7496bba8
Related: OS#6084
2022-08-24 10:06:34 +02:00
Daniel Willmann 6d2d8885c8 hnbap: Add tr_HNBAP_HNBRegisterReject
Change-Id: Ide006cac4fcdc062614f53fb95970feb51d63731
Related: OS#5656
2022-08-24 10:00:49 +02:00
Pau Espin 4d0886d77d OSMUX_Emulation: Add special error case for port events
This way it's easier to quickly spot there was a problem with the socket
connection.

Change-Id: I962bf4837a9e359576c42a51a9919891186c7100
2022-08-20 08:11:27 +00:00
Pau Espin ef046b39bf OSMUX_Emulation: Use Misc_Helpers.f_shutdown() everywhere
Change-Id: Id8f104a4123fcfbc96ab07f2e9343369946e3334
2022-08-20 08:11:27 +00:00
Vadim Yanitskiy d079b3fa33 deps: use titan.TestPorts.UDPasp from ECLIPSEGITLAB_REPOS
This change basically reverts [1].  Oliver's patch allowing to set
SO_REUSEADDR, which is needed for D-GSM mslookup mDNS testing, has
been merged upstream.  No need to depend on our own fork anymore.

Change-Id: Idf96a64f3d5f7928ed0fb81f4a91e469df3a9adc
Related: [1] Ie7e1c3dbd67dba9079a5768e442faffc936fd7fa
Related: SYS#4618
2022-08-18 12:37:27 +00:00
Neels Hofmeyr a56e8fdc2d hnbgw: test PS RAB GTP mapping
Related: SYS#5895
Change-Id: I93c4689ddc016eb4eb25f8cbdd0142936c6f972b
2022-08-16 15:42:51 +02:00
Neels Hofmeyr a2d1d7a211 add library/PFCP_*, deps/PFCP
Will soon be used by new subdir 'upf' (test osmo-upf),
and by 'hnbgw' (test GTP mapping via UPF).

Related: SYS#5599
Change-Id: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
2022-08-16 13:42:10 +00:00
Neels Hofmeyr 13b83db5db update various expected-results.xml
Change-Id: I850b79526145307246bca40c70ed8e4d586d8c68
2022-08-12 02:31:23 +00:00
Neels Hofmeyr e81ef42d05 msc: f_tc_mt_t310: detect MNCC failure explicitly
Helped me find a failure cause: instead of T_guard timeout, immediately
show an unexpected MNCC event.

Related: SYS#5066
Change-Id: I49a15142a4b6c51ca767a884c0574f96e01d7cb1
2022-08-12 02:30:54 +00:00
Neels Hofmeyr d8a4aee1c6 msc: f_tc_mt_t310: allow CRCX in either order
continued from Id0c98bc267daff352fc7db7712f967111970fd4d

Upcoming changes to osmo-msc move the CN side CRCX to an earlier point
in time, reversing that order. Introduce an 'interleave' to not care
about the ordering of MGCP and BSSAP messages.

Related: SYS#5066
Related: Ie433db1ba0c46d4b97538a969233c155cefac21c (osmo-msc)
Change-Id: I0ec348df08aa49ed58b3465de51b259fb74c0aea
2022-08-12 02:30:54 +00:00
Pau Espin 9b94149ef9 bsc: Set g_osmux_enabled_cn directly in the test
We want to add more options later on, and we don't want to be passing
all of them as params. Let's simply set the global fields directly in
the test and let f_init() use the confgured values.

Change-Id: I27b685c2c22cf876b5eba79cf8ad151a2643ecb1
2022-08-10 18:47:33 +00:00
Pau Espin f967afc2ec bsc: Rename s/use_osmux/use_osmux_cn/
That config is used to control the use of osmux between BSC<->MSC. Since
we'll add support for Osmux in BTS<->BSC, we want to test that in a
separate way. Let's rename it so that we can add a "use_osmux_bts" later
on.

Change-Id: I3bde4e6772c18043dd763d7747b5dbe40e0da3b8
2022-08-10 18:47:33 +00:00
Vadim Yanitskiy a2cd893d3d BTS_Tests: fix TC_rsl_ms_pwr_dyn_{up,ass_down,max}: reply received SACCH L1H
As was explained in [1], until recently we relied on trxcon sendig
dummy RR Measurement Reports with patched L1 SACCH Header values.
Now trxcon does not patch it for us, so we need to send Uplink
SACCH blocks with the correct L1H ourselves.

Revision 2 of [1] was successfully tested and proved to fix the
above-mentioned testcases.  However during code review I was asked
to make the statements sending Uplink SACCH blocks self-explanatory.

In revision 3 of [1] I modified the code to call f_send_meas_rep(),
which was introduced in [2], which as stated in the commit message
is using g_pars.l1_pars.{ms_power_level,ms_actual_ta} instead of
the values from received L1H.  Of course this does not work.

Add and use f_send_meas_rep_l1h(), which allows to send the given L1H.
Take a chance to add a log() statement, so that we can see what we Tx.

Change-Id: Ia79a0a7b06394bd34d0f40226cf40e6e8bd2ba35
Fixes: [1] I31dd6b9026d04403092256176f67785a0a6486ad
Related: [2] Ia5d0315e053702df5fa8dad8c6c66c11c9f3edcb
Related: OS#5635
2022-08-10 18:14:11 +07:00
Vadim Yanitskiy e2003d0c9c BTS_Tests: use f_send_meas_rep() in f_TC_ms_pwr_ctrl_{constant,pf_ewma}
Change-Id: Id80317d1e9de3873ab2d26470a3552b4f2b539b1
2022-08-10 17:38:07 +07:00
Vadim Yanitskiy 8a1685d549 BTS_Tests: populate SACCH cache in f_TC_ms_pwr_ctrl_{constant,pf_ewma}
There is a time window between activation of a dedicated channel and
receipt of a L1CTL_DATA_REQ with the first RR Measurement Report, in
which the L1 may need to start transmission on Uplink SACCH.

In this case the L1 is using a dummy SACCH block with hard-coded L1
SACCH header values and hard-coded Measurement Results.

Until recently we relied on implementation specific behavior of trxcon
patching the L1 SACCH header in hard-coded dummy SACCH block.  This
behavior was changed, so TC_ms_pwr_ctrl_{constant,pf_ewma} started to
fail.  Let's properly populate the SACCH cache to fix these TCs.

Change-Id: I89eb90815e86db466ea626f4c25f2634c1d942d5
Depends: osmocom-bb.git I0f467fc07cf844cc73465f235b36ba7d00788c9f
Related: OS#5635
2022-08-09 15:44:17 +00:00
Pau Espin f14e3ec864 bsc: Fix CBSP expectancies when receiving ETWS write-replace response
BSC_Tests_CBSP was sending an ETWS message but using non-ETWS templates
to match the response, which may differ from an ETWS one  (for instance,
ETWS related messages have no channel_ind).

Change-Id: I42941655081af6d5b04b1e061e6259d8dee94665
2022-08-09 12:51:59 +02:00
Vadim Yanitskiy 7c29c4e2c1 BSC_Tests: add TC_chan_alloc_algo_ass_dynamic
This test case verifies the new channel allocation mode, which
is expected to switch between ascending and descending modes
dynamically based on the following two configurable parameters:

* Uplink RxLev threshold (and min number of samples),
* C0 (BCCH carrier) channel load threshold.

The test case scenario includes:

Case a) Unknown Uplink RxLev => fall-back to ascending.
Case b) Not enough RxLev samples => use ascending.
Case c) Uplink RxLev below the threshold => use ascending.
Case d) Uplink RxLev above the threshold => use descending.
Case e) Uplink RxLev above the threshold, but C0 load is not.

Change-Id: Ia522f37c1c001b3a36f5145b8875fbb88311c2e5
Related: SYS#5460
2022-08-08 20:22:17 +00:00
Vadim Yanitskiy 1a16d31b12 BSC_Tests: add TC_chan_alloc_algo_{a,de}scending
The aim of these new test cases is to verify both ascending and
descending modes of the BSC's channel allocator.  Both tests are
using BTS2, which has 4 TRX instances.

The common test scenario can be described as follows:

1. Establish an SDCCH channel, send some dummy payload on it.
2. Send a BSSMAP Assignment Request for a TCH/F channel.
3. Expect RSL CHANnel ACTIVation for a TCH/F channel.
4. Respond with RSL CHANnel ACTIVation NACK (*).
5. Expect a BSSMAP Assignment Failure.

These steps are repeated several times.  Note (*) that for the
sake of simplicity, I am aborting the assignment procedure by
sending a NACK, so that the requested logical channel becomes
BORKEN and behaves like an occupied one until the A-bis/OML
link is re-established.  This reduces the overall complexity.

Change-Id: Ic74a9cd264320a9a17648f9331b67fb2c2404122
Related: SYS#5460
2022-08-08 20:22:10 +00:00
Neels Hofmeyr 9c83eeb438 msc: add MSC_Tests_Iu.control to MSC_Tests.cfg
Also run the Iu tests for osmo-msc.

Same as we have in docker-playground.git/ttcn3-msc-test/MSC_Tests.cfg

Related: SYS#5066
Change-Id: Ied0449fd0328ee57b66e3cff9d34b0e1d27b9fb4
2022-08-07 15:48:17 +02:00
Neels Hofmeyr 02d513efd8 msc: call: allow using MGW conn IPs in either order
So far, the first CRCX dispatched by osmo-msc is used for the RAN side,
and the second one for the CN side. Upcoming changes to osmo-msc move
the CN side CRCX to an earlier point in time, reversing that order.

Allow both RTP addresses from the two MGCP CRCX OK to appear in the
Assignment Request message to RAN, so that the test succeeds for both
the current osmo-msc and the upcoming patch (see below).

Related: SYS#5066
Related: Ie433db1ba0c46d4b97538a969233c155cefac21c (osmo-msc)
Change-Id: Id0c98bc267daff352fc7db7712f967111970fd4d
2022-08-07 15:48:17 +02:00
Pau Espin a8cc0d4db0 cbc: Add expected-results.xml
Change-Id: I9bf2c513a30c943bf87b47154a10147dc49c3d02
2022-08-05 22:31:33 +02:00
Pau Espin e71951343f cbc: Introduce test TC_cell_failure_restart_active_{cbc,mme}
These tests are currently failing since osmo-cbc doesn't support
reloading cells yet.

Related: OS#5641
Change-Id: I7b1c5275eff56888268601b481e8f8c1dd1bb1b0
2022-08-05 22:31:33 +02:00
Pau Espin 45ef775232 cbc: Introduce test TC_cell_failure_restart_idle_mme
Related: OS#4945
Change-Id: Ie0ab3d4fbe1d9a824b1f69ceacbf7dfd4f0d9728
2022-08-05 22:31:33 +02:00
Pau Espin 715d678033 cbc: Introduce test TC_cell_failure_restart_idle_bsc
Change-Id: Ia868bf739c29d5b4548bbd1417c352ee6400f501
2022-08-05 22:31:33 +02:00