Commit Graph

28 Commits

Author SHA1 Message Date
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 99b7d40e7b hnbgw: f_iuh2iu_disconnect: allow more time
Increase timeout for expecting an SCCP RLSD from osmo-hnbgw.

Affects tests
HNBGW_Tests.TC_ranap_cs_mo_disconnect
HNBGW_Tests.TC_ranap_ps_mo_disconnect

Rationale:

For the case

 RUA --id-Disconnect--> HNBGW  ----release-SCCP---- CN

the tests expect behavior not exactly specified.
3GPP TS 48.006 9.2 Connection release:

 The MSC sends a SCCP released message. This message shall not contain
 any user data field.

So what we should expect is this:

                           HNBGW                    MSC
 RUA --id-Disconnect-------> | ---Data-Form-1(!)---> |  Iu-ReleaseComplete
                             | <--Released---------- |  (no data)

Instead, we expect the HNBGW to immediately send a RLSD to the MSC:

                           HNBGW                    MSC
 RUA --id-Disconnect-------> | ---Released---------> |  Iu-ReleaseComplete

osmo-hnbgw is being fixed in that respect: it will soon give time for
the CN to send an SCCP RLSD, and only if that times out will osmo-hnbgw
send an SCCP RLSD to the CN.

So HNBGW_Tests.ttcn should still ensure that osmo-hnbgw will eventually
send an SCCP RLSD if the CN fails to do so, but it should allow more
time to accomodate the release timeout.

Related: osmo-hnbgw I6ff7e36532ff57c6f2d3e7e419dd22ef27dafd19
Related: SYS#6297
Change-Id: Ibf6eaeb1b82d43e4f208f64a71f2f6e889883a11
2023-03-05 18:06:46 +00:00
Neels Hofmeyr f74a6df3a1 hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR
osmo-hnbgw will deprecate the 'sccp cr max-payload-len' config option.
To still trigger the 130 byte limit that is now enforced in
libosmo-sigtran, enlarge the NAS PDU.

So far the limit set via VTY was 0 bytes, which will no longer happen in
osmo-hnbgw after I18dece84b33bbefce8617fbb0b2d79a7e5adb263.

Related: OS#5906 SYS#5968
Change-Id: I174b2ce06a31daa5a129c8a39099fe8962092df8
2023-02-15 03:34:06 +01:00
Neels Hofmeyr 72a8d62dd3 hnbgw: add HNBGWVTY to ConnHdlr
Change-Id: Ic325fd5eb5134529012856c08336633c1413284d
2023-02-01 15:38:36 +00:00
Neels Hofmeyr 6a423f4f67 hnbgw: drop duplicate import
Change-Id: Ib24ecca40679fd80be2555ada208121d730c1904
2023-01-26 13:57:35 +01:00
Neels Hofmeyr 1e31146d11 upf/PFCP: do not imply f_inet_addr()
PFCP_Templates.ttcn is not the place to do the conversion between string
and OCT4.

When I wanted to use an OCT4 address in some ts_PFCP_* template, it
dawned on me that it is stupid to convert the OCT4 to a string, just so
that the ts_PFCP_* template converts it back to OCT4.

Related: SYS#6192 SYS#5599
Change-Id: Ib068831787f4256f70a2189a5f36ca1ea1f40c9e
2023-01-17 19:46:05 +00:00
Pau Espin acf4f225bd hnbgw: Introduce test TC_hnb_register_duplicate_reuse_sctp_assoc
Change-Id: I09ce08917b590ecd6fdf93f8b564a0d53900c871
2022-09-27 14:33:40 +02: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
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
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
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 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
Eric Wild 6e511ce624 fix sgsn and hnbgw test issue introduced in 49888a65dc
ranops was not isvalue because bssap_reset_retries was not set and not
explicitly omitted either, so the ran adapter decided not to create a
ran emulation...

Change-Id: Ib2d3f1fbcfbd53af1e627bd2cf36c3153fa7d012
2022-04-02 19:38:52 +00:00
Daniel Willmann 9e789bec1b ranap: Allow RAB ReleaseList inside RabAssReq template
Related: OS#5152
Change-Id: If5dabf24ab410ef95f92be1cb865ac06330b495e
2022-02-22 17:22:54 +01:00
Daniel Willmann 37c877fd1e hnbgw: Test behaviour when CRCX times out
Change-Id: Iba219641498aeacbba742de926cd7f15e3fe9d06
Related: OS#5152
2022-02-22 17:22:54 +01:00
Daniel Willmann 3e15b7b41a Add test for RABAssingResponse with FailedList
Change-Id: I043014929de5145f06d0a650f36d59c15e0d4044
Related: OS#5152
2022-02-22 17:22:54 +01:00
Daniel Willmann 7af5a2a5c1 hnbgw: Fix encoding of AssignmentRequest with RABs to be released
Also change the name to avoid mistaking it for a RABReleaseRequest

Change-Id: Ifb52ed9e5559e9566b0d7a02246fdf29ff0b6dce
2022-02-18 17:12:07 +01:00
Daniel Willmann 19b8d909e5 Add hnbgw tests
Some tests for osmo-hnbgw with mgw support:
* hnb register
* ranap connect/disconnect
* rab assignment/release

Change-Id: I0a2fb795aec83337eda8d9972e6ff264ead61076
2022-02-16 13:13:43 +00:00