Commit Graph

74 Commits

Author SHA1 Message Date
Pau Espin fa2095bcfb hnbgw: TC_hnb_register_duplicate: Fix 2nd HNB_REG_REQ containing different LAC
Change-Id: I7f5d8d8403211488966fc30bf4d82e894664df51
2024-04-16 18:08:15 +02:00
Pau Espin e9c6c7b97e hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the one in docker-playground
Change-Id: I02338c4bc43e04d47c92c484532fcc48edf0222d
2024-04-16 18:08:11 +02:00
Pau Espin b6be06a70c hnbgw: Add new recent tests to expected-results.xml
Change-Id: I317773de2a38b37e5b8c7f12ff4be9c4a9b8fbce
2024-04-16 13:58:29 +02:00
Pau Espin 831cb69a93 hnbgw: Provide proper params to set StatsD local ip/port
The StatsD init() function parameter names were misleading
(prefixed "dst_" while they are actualy "local_" ones).
As a result, the hnbgw test was passing the wrong values to it.

Change-Id: I213173c99ec314c2eebfb8836c4d3467b3a7f818
2024-04-16 12:42:30 +02:00
Harald Welte 904b5f1a56 hnbgw: Implement validation of [some] counters
Let's use the StatsD_Checker to verify that counters increment when
we expect them to.

Change-Id: Ib0e2dd23802b18f4bd417150d0b62954b1d459a4
2024-04-13 16:26:10 +00:00
Harald Welte 7a9e79645c hnbgw: Use iddentical LAC/RAC/SAC values
Let's not use different values on RANAP and HNBAP, but derive on from
the other.

Change-Id: If4d82dc350c072e3528097d850304514adf65340
2024-04-13 16:26:05 +00:00
Harald Welte f95ab2d0a0 hnbgw: Test normal and abnormal RAB release
Change-Id: I7b57d4f9bd39820829ae9d52ae6e2f098e75de71
2024-04-13 16:26:05 +00:00
Harald Welte 1818834e6f hnbgw: Use "NAS/Normal" as default release cause
We shouldn't run all of our tests with a rather exotic release
cause value (O&M intervention) but assume a normal/orderly NAS
triggered release, unless a specific test case explicitly tests
an abnormal release cause.

Change-Id: I8ddd1dccc5637431e3a8c6e607e0e45faa82b5b5
2024-04-13 16:26:05 +00:00
Harald Welte 0d4a843fd3 hnbgw: Make RAB release cause configurable
Change-Id: Ie072dafbc3378739d41411632e33a8a1ec1ed572
2024-04-13 16:26:05 +00:00
Harald Welte f60044d44b hnbgw: Add TC_ue_register_tmsi_lai for UE Registration without IMSI
Change-Id: I1712a3db791c07767eba10fcea3ce15b898670df
2024-04-04 02:48:16 +02:00
Harald Welte af3e21687a hnbgw: Introduce tests about UE registration
We didn't have any test coverage for HNBAP UE registration so far.

Let's start with two basic tests:
* normal / successful case
* abnormal case: UE Register without prior HNB Register

Change-Id: Ice2743d376ab8041646259fa25117d6fd0e8c2fd
2024-04-02 20:22:14 +00:00
Harald Welte 3f216c5cee hnbgw: Qualify RAC/LAI/SAI to RANAP_IEs module
This is in preparation of importing HNBAP_IEs which introduces types of
the same name.

Change-Id: I2fb7ca8dfc2011c727633e795a9d16856825379d
2024-03-29 11:16:18 +00:00
Harald Welte d71d5969ba hnbgw: Rename f_hnbap_register to f_hnbap_hnb_register
There's HNB and UE registration; let's make clear which it is.

Change-Id: I171f0385389c5f50dc7ad28525deef396fff5fbf
2024-03-29 11:16:18 +00:00
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
Harald Welte 556e4d2dbc various: update expected-results.xml
Change-Id: I21052636bf892e5da86ef736d16035ec324aedbe
2024-03-04 19:09:58 +00:00
Pau Espin af74650899 hnbgw: Introduce test TC_rab_assign_mgw_iuup_addr_chg
Change-Id: Ibfc37118ed3a67e4ca3f417273bedba127be7639
Related: SYS#6657
Related: OS#6127
2023-12-04 12:17:07 +01:00
Pau Espin 0c35a6363b hnbgw: Allow announcing a different mgw-local IuUP address after MDCX
This will allow emulating an MGW deciding to change its local IuUP IP
address due to received remote address in MGCP MDCX, and announce the
changed address back in MGCP MDCX. A test validating this scenario
against osmo-hnbgw will be added in a follow-up patch.

Related: SYS#6657
Change-Id: Ia724e0363a8bab56f5d31e7f7f7a127af584f935
2023-12-04 12:17:07 +01:00
Pau Espin 264679fa7c hnbgw: Rename record CrcxResponse->MgwResponse
The previous name is misleading, since they are also used during MDCX.

Change-Id: I1ffcb1100b0f92f7175ff08f9d4df49c0cf596b5
2023-12-04 11:16:41 +00:00
Pau Espin b85ac2ffe2 hnbgw: Rename mgcp conns to reflect each side peer
Change-Id: Ie68d0397a56d48223fb4b1ffe1710f988518257f
2023-12-04 11:16:41 +00:00
Neels Hofmeyr 6ce7d07623 hnbgw: fixup for osmo-hnbgw-with-pfcp.cfg
Drop a config line that should not be committed; it was added during
local testing of logging patches that are still unmerged.

Change-Id: Ie29c0e0d80c9318c104fe884868a30c17b6997bb
2023-11-22 21:49:20 +00:00
Oliver Smith aa919b40f1 hnbgw: run TC_second_rab_assignment on nightly
Fixes: OS#6253
Change-Id: Id09b1a22dbd391c19ecfe34af990ec1ef3bb5089
2023-11-15 06:20:13 +00:00
Oliver Smith 0bc9e96b22 hnbgw: osmo-hnbgw.cfg: reduce X31 to 5s
Set X31 to 5s as expected by the testsuite. The config files changed
here are not used by jenkins, but are used for manual testing by some
developers.

Previous patch ee4ce863 ("hnbgw: Introduce mp_hnbgw_timer_x31") already
sets the timer in one of the configs, move it to the end and add the
comment to make it consistent here and with the configs in
docker-playground.

Related: docker-playground I223d38e9ec2ca0f9f2ce2ac5311932789f328c9a
Change-Id: I1c275a1d10cfe0fe67d71e900881b0c4891af0be
2023-11-09 10:57:06 +01:00
Neels Hofmeyr c3c01d37a3 add HNBGW_Tests.TC_second_rab_assignment
Related: SYS#6624
Related: osmo-hnbgw I25bf19981cd75a87a7ceb3382dae1ec626ae475c
Change-Id: Iadaba0e5e82ad6d163ad509904ede213e2462d5c
2023-11-07 04:18:38 +01:00
Pau Espin ee4ce863e3 hnbgw: Introduce mp_hnbgw_timer_x31
The default value of the timer changed recently, and made some tests
which were using some timer hardcoded values fail.
Add this configurable option to adapt the test behavior to the
osmo-hnbgw configuration. This way we can also set it to lower values in
order to avoid waiting too much time.

Change-Id: I176ef96e193f2ca39077bcee3a2187768ddb45ce
2023-11-03 19:43:20 +00:00
Oliver Smith 7bb63cf0a8 library: deduplicate f_logp
Change-Id: Ie84a8a75e9f162fcbef0d07d0bc75e47a5303fa3
2023-10-23 09:10:33 +00:00
Neels Hofmeyr d019cc071f hnbgw: TC_apply_sccp()
Change-Id: Ia1ff0cb56893edf045ea3cb3233882ca93445d21
2023-08-19 01:59:27 +00:00
Neels Hofmeyr b1bf16db35 hnbgw: add mscpool paging tests
Change-Id: If4bbd5c970108b01e8556fa7744ff627db75fb13
2023-08-19 01:59:27 +00:00
Neels Hofmeyr 467eb7e4a0 hnbgw: attempt to fix sporadic test failures
Give some more wait time for RANAP RESET after f_cn_nr_init().
Intended to fix sporadic failures of HNBGW_Tests...
- TC_rab_assign_mgcp_to
- TC_ranap_cs_mo_disconnect

Change-Id: Ia5144dbbc5168b3707e714e12b805f5d640fa774
2023-08-10 03:40:40 +02:00
Neels Hofmeyr 7d0e680d99 hnbgw: add CN pool tests
docker-playground.git needs a config file change to be committed at the
same time as this patch, see 'Related'.

Depends: osmo-ttcn3-hacks I94aa0b2adfc48b98cb4b1efe595c2432fc603d6c
Change-Id: I027a059faed3f140f8801f84338956cd004043b5
2023-08-08 04:47:06 +02:00
Neels Hofmeyr 3d5a0da49b hnbgw: CN links: implement 'allow attach'
Prep for I027a059faed3f140f8801f84338956cd004043b5

Change-Id: I5c9db4b31298ca9855b4390481a709f863459172
2023-08-08 04:47:06 +02:00
Neels Hofmeyr ffcb889b0b hnbgw: add CTRL port
Change-Id: I4c06e1fda135d87ce52151fd574f481cd414722f
2023-08-08 04:47:06 +02:00
Neels Hofmeyr 333ea39e6b hnbgw: call f_start_hnbs() by default
Most tests need to run f_start_hnbs() directly after f_init(), so make
that the default behavior.

The three tests that don't want f_start_hnbs() to run now pass a new
arg, f_init(start_hnb := false).

Change-Id: I2b29ce66aee0b2d57fa26e6110f06292c481ab6b
2023-08-08 04:47:06 +02:00
Neels Hofmeyr 057ecbafe3 hnbgw: do not duplicate MSC_RanOps
Change-Id: I556eb4293f51b56a526d4e60c3ac2aa357a8d3e7
2023-08-08 04:46:49 +02:00
Pau Espin 6c87ad95e2 hnbgw: Introduce module parameter mp_validate_talloc_asn1
This allows selectively disabling ASN.1 memory checks, which still fail
in current osmo-hnbgw-latest.

Change-Id: I5c18cf2d6797bcf0bef13d71ab0b69f1403b474f
2023-07-18 13:28:49 +00:00
Pau Espin 578fa193ae */osmo-stp.cfg: Explicitly define role & sctp-role
It was recently decided it's a good practice to always specify the role
 and sctp-role for all ASPs configured in the VTY, since it's an
 important configuration providing feedback on the network setup
 expectancies.

Change-Id: If48ca06f2cc3c0986daa5f6264d80138d468332a
2023-07-11 11:48:41 +00:00
Neels Hofmeyr 7a48df158a hnbgw: prepare cn pool: add multiple MSCs and SGSNs
Change-Id: Ia29565cabc072de9aa46565b57232e1eda65874f
2023-07-10 15:34:57 +00:00
Neels Hofmeyr 75d905bbc7 hnbgw: verify empty talloc asn1_context at end of tests
This allowed me to find massive memory leaks in osmo-hnbgw: at the end
of each test, run f_shutdown_helper(), and in it query 'show talloc' for
an empty asn1_context.

Hence verify that all the scenarios run in these ttcn3 tests have no
asn1 de/encoding memory leaks.

Change-Id: I2948ee6f167369a2252f85b493e9653b93c7e4e9
2023-07-10 15:34:57 +00:00
Neels Hofmeyr fffe79b868 hnbgw: tweak HNB name sent in HNBAP HNB Register
It helps when each distinct HNB has a different name showing in the
osmo-hnbgw.log.

Change-Id: I560415caba591a3f1139897c6ca4d31566f4c178
2023-07-10 15:34:57 +00:00
Neels Hofmeyr 497216f7de hnbgw: fix PLMN in g_hnb_cfg
To get 001-01, we need to encode the placeholder 0xf nibble.

Since recently, osmo-hnbgw cares about the PLMN in messages, in specific
cases: in upcoming CN pool tests, the PLMN is part of the algorithm that
picks the CN link. So let's encode 001-01 correctly.

Change-Id: I5299c521479dc25ea0f82d7d294d53942960d2cf
2023-07-10 15:34:57 +00:00
Neels Hofmeyr b869dc895a hnbgw: comment
Change-Id: I8de926f5c05a83e15dd03a40638caceb5fedb4e2
2023-07-10 15:34:57 +00:00
Neels Hofmeyr cf6dc49a2c hnbgw: drop dead code from MSC_UnitdataCallback
This RANAP RESET code...

a) is not used:
osmo-hnbgw has only recently started sending RANAP UnitData by its own initiative.
Until very recently, osmo-hnbgw has only responded to receiving a RESET, with an ACK.
It has never sent a RESET message to the peer, here titan.

b) makes no sense implementation wise:
RANAP RESET handling is actually implemented in RAN_EMulation.ttcnpp.

c) makes no sense protocol wise:
The UnitDataCallback happens when osmo-hnbgw sends a RANAP UnitData to
titan: if at all, the only logical response would be a RESET ACK
message, not a RESET message.

Change-Id: Ie7b9022e991b63b945c7ec6e5c9f7c4eb5da4d7e
2023-07-10 15:34:57 +00:00
Philipp Maier 6c5ba075aa HNBGW_Tests: use realistic codec name and payload type in MGCP
When we respond to the MGCP requests from OsmoHNBGW, we use codec name
"FOO" and payload type 23 in the SDP part of the response. This is
obviously an invalid codec and osmo-mgcp-client will not tolerate this
anymore. Let's use a more realistic payload type and codec name, like
112 and "VND.3GPP.IUFP"

Change-Id: Ib53ff7a878087b497e6ff27f786c9ab1297f3d5f
2023-07-04 16:53:40 +02:00
Neels Hofmeyr 59517227de hnbgw: give RAN startup some time
We have sporadic test failure, because the test starts to send RUA
messages before the CN link was able to perform a RANAP RESET + ACK
procedure.

Since recently, osmo-hnbgw is stricter on RANAP RESET: it will only
start passing RUA connections to the CN when the CN link has seen a
RANAP RESET ACK (from either side). So now, when the test is too quick,
its first RUA message is dropped on the floor, and the test fails, since
the RANAP never turns up on SCCP.

This is a quick hack, better would be to wait for some signal from the
RAN_Emulation when we are ready.

This jenkins trace shows that the RUA InitialUE happens about 200 ms
before RESET ACK is complete:

 Time                Protocol Info
 04:02:17.088852     RANAP    Reset
 04:02:17.105820     RANAP    Reset
 04:02:17.899887     RANAP    (RUA) InitialUE-Message (DTAP) (Unknown)
 04:02:17.905122     RANAP    Reset
 04:02:17.906043     RANAP    SACK (Ack=2, Arwnd=106496) ResetAcknowledge
 04:02:17.906056     RANAP    SACK (Ack=5, Arwnd=106436) ResetAcknowledge
 04:02:18.081522     RANAP    Reset ResetAcknowledge
 04:02:18.082829     RANAP    SACK (Ack=4, Arwnd=106496) ResetAcknowledge

https://jenkins.osmocom.org/jenkins/job/ttcn3-hnbgw-test/512/artifact/logs/hnbgw-tester/HNBGW_Tests.TC_rab_assign_mgcp_to.pcap.gz

Change-Id: Icbe7220112fbfe4ff5a5e1b9b65eeec428e51530
2023-06-23 05:06:30 +02:00
Neels Hofmeyr 3a9140e5dc hnbgw: use f_shutdown_helper() everywhere
I hope that this helps with sporadic test failures because of RANAP
RESET happening during test shutdown.

Change-Id: Ie2088bc8786742a1dffb0132f4b162fb2649fb9b
2023-06-23 05:02:11 +02:00
Neels Hofmeyr f2c95021e8 hnbgw: add TC_sccp_cr_limit: test CR data length cutoff
Depends: If35697234796af8943691b2de62218e7dc93a08c libosmo-sccp
Change-Id: Ia68dad973ef18513b52f5accb5264c557c7295ea
2023-05-01 02:22:32 +02:00
Neels Hofmeyr 6549928fe0 hnbgw: wait longer for PFCP Assoc
Since I introduced stricter timeouts on PFCP messages in
    hnbgw: add f_pfcp_expect()
    commit 6bbfe057af
    Change-Id I2117475b695d486b1204d61e5bb21120a6187354
the HNBGW tests with PFCP support fail often:

The Assoc Setup resending timeout (X26) is configured to 5 seconds, and
the timeout to wait for this is also 5 seconds. Every once in a while
they happen to miss, causing a test failure.

Increase the initial Assoc Setup Req timeout to 15 seconds to avoid
sporadic failures.

Change-Id: I4b9af224e2346a4735f3d4e01b234acf56c5f3ff
2023-04-25 02:34:46 +02:00
Neels Hofmeyr dc416c97b3 hnbgw: add f_bssap_expect()
End the guessing when seeing "timeout of T_guard": set a precise failure
verdict when an expected RANAP/SCCP ("BSSAP") message did not arrive as
expected.

Change-Id: I51c60ed8fcef83c98e6c62c9f62a8c3c665de860
2023-03-28 02:26:06 +00:00
Neels Hofmeyr 6bbfe057af hnbgw: add f_pfcp_expect()
End the guessing when seeing "timeout of T_guard": set a precise failure
verdict when an expected PFCP message did not arrive as expected.

Change-Id: I2117475b695d486b1204d61e5bb21120a6187354
2023-03-28 02:26:06 +00:00
Neels Hofmeyr 735b6563ec hnbgw: add f_rua_expect()
End the guessing when seeing "timeout of T_guard": set a precise failure
verdict when an expected RUA message did not arrive as expected.

Change-Id: I29e6b7659ba53efee9f676197b502f79780ead7e
2023-03-28 02:26:06 +00:00
Neels Hofmeyr a1af9460ea osmo-hnbgw-with-pfcp.cfg: improve logging
Change-Id: Iaf4e8993f9d3b41f74145291940ca59947f9d171
2023-03-14 21:59:37 +01:00