Commit Graph

1606 Commits

Author SHA1 Message Date
Vadim Yanitskiy 061c36d22b library: GTPv1C: make ts_GTPC_SGSNContextAck more compact
Change-Id: I9b0c948f295fd73fad79c8d09b45fd992c90a015
2024-04-19 09:56:44 +00:00
Pau Espin 95ad6a0112 SIP_Templates: Make tag collisions harder
It was spotted during some test runs that the same tag was assigned to 2
different components. Let's make this way more difficult by adding some
time to it. Asterisk uses longer strings for instance, since 32bits is
the minimum.

Change-Id: Iba26259fd48da1c2558451fe5f7014151d4935c8
2024-04-18 20:17:42 +02:00
Philipp Maier 4a19b474a9 HTTP_Adapter: add HOST field to header lines.
In HTTP 1.1 (this is what the HTTP_Adapter uses), the Host header field
is mandatory, see also: RFC 2616, section 14.23.

Related: SYS#6824
Change-Id: Id4b2220da4b2b5fbe74cdc2776cf66d6b34ddbcf
2024-04-18 12:06:45 +00:00
Vadim Yanitskiy fdde16846b library: GTPv1C add ts_MM_ContextGSM
Change-Id: I483fdd0dee6e0ee92fcee798d8e85a80d1e0be8b
Related: SYS#6603, OS#6294
2024-04-18 09:56:49 +00:00
Vadim Yanitskiy 1e869a26a6 library: cosmetic: fix code formatting
Change-Id: Ic87f6e8dcb8e507d21082f28217c015ff2e5204b
Related: SYS#6603, OS#6294
2024-04-18 09:56:49 +00:00
Pau Espin 601b5cddc9 Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn
This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I54eff3eea60ed0624919baebfe0ff7393414d6b8
2024-04-18 11:07:08 +02:00
Pau Espin 830061d271 Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn
This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I105844d2bcab6c24624be1224c1ba78b69d4b44c
2024-04-18 11:07:08 +02:00
Pau Espin 47384ba910 ggsn: TC_gy_charging_volume_quota_threshold: Fix Gy Threshold/Quota expectancies
open5gs got the Gy Thresholds fixed recently
(e078b33f0c4d6f34d8991f8ad211dd2d9ea977a0).

AS shown in 3GPP TS 29.244 C.2.1.1 diagram, in Diameter Gy the value
sets the trigger for the "remaining credit", not the "used credit".
"ThresholdPFCP = Quota - ThresholdGy"

The test needs to be adapted since it was wrong too.

Change-Id: Ia283ad4919813241e3c33465ba4be2d2e33f5e54
2024-04-16 11:06:55 +00: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
Neels Hofmeyr d076e93507 ran-emu: allow receiving Paging without a TMSI
Fix access of non-present tMSI.* if tMSI == omit, allowing to match
incoming Paging with a UnitData receiver that has no TMSI.

Change-Id: I1bdf3488be0f8d4f0905665c4ba642f9468b9777
2024-04-14 13:10:09 +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
Pau Espin 32167d8052 asterisk: Introduce tests TC_internal_call_all_*registered
Related: SYS#6782
Change-Id: Id06dedb3aac4f31f06281661391bf50640f6369a
2024-04-11 10:54:38 +02:00
Pau Espin 7011bf47c5 asterisk: Introduce test TC_internal_call_momt
Lots of infrastructure added to allow call establishment and hang up
between 2 users connected to Asterisk.

SIP_Tests is updated to accomodate for necessary changes in
SIP_Templates used by Asterisk_Templates.

Change-Id: Ic5827a3e94b06fbc57f6405bf0f0aa6598c5d1fe
Related: SYS#6782
2024-04-10 14:02:11 +02:00
Pau Espin e94a64834d {SIP,Asterisk}_Tests: Mark all components alive
This fixes some dynamic errors occuring due to messages arriving while
tests is being torn down.

Change-Id: I60642071758ad1203196eddd3bbacb84f4dcf9fb
2024-04-10 13:37:58 +02:00
Pau Espin 6331f5c033 SIP_Emulation: Match empty port as default port 5060
Change-Id: I8415571a5bdc99e8cc007bb4b57bcb73b7afd4fb
2024-04-08 21:34:48 +02:00
Pau Espin 0169e6038d SIP_Emulation: Fix SIPEM_register when several conns are active
"Dynamic test case error: Port CLIENT_PROC has more than one active
connections. Message can be sent on it only with explicit addressing.".

Change-Id: Ibf868394ce2c495a78ab943ddec278a45bf71088
2024-04-08 21:02:52 +02:00
Pau Espin 65dde83956 library/SIP_Templates: Fix wrong method name in tr_SIP_REGISTER
Change-Id: Ieec2124417a3294cfb469180f44285e880a46177
2024-04-08 18:17:15 +02:00
Pau Espin 05eaa1a531 asterisk: Implement and test SIP Digest Authorization
Related: SYS#6782
Change-Id: Ib469f1906927a3f246876040086ff115fbf4c032
2024-04-08 17:36:18 +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
Pau Espin 37ee0ed83c Introduce Asterisk_Tests testsuite
Add initial infrastructure to run tests against an Asterisk process.
An not-yet-finished draft test doing registration is submitted to
validate communication towards Asterisk works.

The testsuite will be improved in follow-up commits, but this way other
people can already start using it and we can set up the dockerized setup
+ jenkins jobs to run it nightly.

Related: SYS#6782
Change-Id: I66f776d5df6fb5dc488d9e589b84a6b2385406e8
2024-04-02 08:22:08 +00:00
Pau Espin fb34d863c3 SIP_Templates: Rework templates to make them more extensible
The existing template system in SIP_Templates made it difficult to craft
specific templates, since it was usually skipping several layers of
fields when passing parameters.

This commit reworks some of those templates, adds news templates, and
cleans formatting for others, as a preparation for further work which
will be done when adding Asterisk_Tests testsuite.

Change-Id: Ifd14213e9c2b8f5061f828a63ef47844828d94ea
2024-04-02 08:22:08 +00:00
Pau Espin 6052a342fe SIP: generate seq_nr within allowed range
Change-Id: Iea5f4568af1bd795db57d2b77e82d976edc9e337
2024-04-02 08:22:08 +00:00
Vadim Yanitskiy 7093a5d9a2 msc: as_{iu_release,clear_cmd}_compl_disc: remove no-op timer arguments
Change-Id: I1d3dcf4399dccd353702e4d6c53fe8e26e16ea9b
2024-03-27 16:55:40 +07: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
Pau Espin a16a6b667b Move f_addrstr2addr() to library/Misc_Helpers.ttcn
This function can easily be reused in other testsuites supporting both
IPv4 and IPv6 addresses.

Change-Id: I4243ec5551f128629b6504ccc59efeb456a6855d
2024-03-22 11:27:19 +01:00
Pau Espin a907b9f1c9 MGCP_Templates: Avoid extra indenation for most of the whole file
Change-Id: I9338c73db94a1ed3e2945bc40a46573c4a674ba3
2024-03-22 11:27:16 +01:00
Pau Espin 06fba9c8a7 pgw: Set Gy CCA Result-Code based on settings
This allows the test to change the Result-Code being transmitted during
Gy CCA at any time.

Related: SYS#6845
Change-Id: I2c3b1057908c1c76a55c41a7f45728a0fdee3cf0
2024-03-19 13:11:34 +01:00
Pau Espin 9b3d06297d DIAMETER_ts32_299_Templates.ttcn: Define Result codes specified in TS
Change-Id: I6c102e6a10469d0d054cb55f7d2100c8887ab6e0
2024-03-18 21:04:15 +01:00
Pau Espin aca4c29e72 epdg: TC_hss_initiated_update_user_profile: test SWx PPR -> S6b RAR propagation
Related: OS#6400
Change-Id: I064ee9e18809a507d0185f640b4a972ee5a2ce3f
2024-03-18 17:29:15 +00:00
Pau Espin 93cbc99011 epdg: Introduce test TC_hss_initiated_update_user_profile(_unknown)
This test so far only validates the SWx interface during the procedure.
It can be extended at a later time when implementing propagation of the
procedure to other interfaces in osmo-epdg.

Related: OS#6042
Change-Id: Ic7c19a3fe7b2b1411414fb6b78ab9a665a1aa42b
2024-03-18 17:29:15 +00:00
Vadim Yanitskiy 3f5b693401 library: add templates for L1CTL_{DATA,TRAFFIC}_CONF
Change-Id: I914555ac8bf2784c14e1b5564b116221ecc7b539
2024-03-18 16:41:17 +00:00
Pau Espin a7823b96cb epdg: Introduce test TC_hss_initiated_deregister_permanent_termination
Change-Id: I50daa7a04e0f19dbf987a8baba7a979a353089a3
2024-03-14 11:44:22 +01:00
Pau Espin d9ff19ee73 epdg: Introduce test TC_hss_initiated_deregister_new_server_assigned
Related: OS#6042
Change-Id: Ia5bf7708d11421710f3a88669d94c4f01060cdd6
2024-03-14 11:43:58 +01:00
Philipp Maier 964533e20d library: add HTTP_Server_Emulation
We already have an HTTP_Adapter, which plays the client role. Now let's
add an HTTP_Server_Emulation, that will allow us to play the server role
as well.

Related: SYS#6563
Change-Id: Ie9a3b31a047b617ae69b7a65e1d69b8d3da863e5
2024-03-11 15:24:31 +01:00
Philipp Maier 08902cf05d library: add SGP.32 and SGP.22 ASN.1 specification, encoder and templates
This patch adds the eUICC related SGP.32 and SGP.22 ASN.1 specification
along with templates and related encoder/decoders (_EncDec.cc).

The collection of templates is not comprehensive, which means that there
are only templates available for a subset needed to implement testcases
for an IPAd.

Related: SYS#6563
Change-Id: I9df8caa98aeb6953a738660a758c92249832d780
2024-03-11 15:03:00 +01:00
Philipp Maier fca4e4f5d5 GTP_Emulation: fix typo
Change-Id: I66685e0e4da97eda2bd5f4573c0994444824993f
2024-03-11 15:03:00 +01:00
Philipp Maier 522905986a PFCP_Emulation: fix typo
Change-Id: I0114aeafb0c4fe821f6b5ea7b264c2a5c055033e
2024-03-11 15:03:00 +01:00
Pau Espin b8cc610d8b epdg: Introduce test TC_authinfo_fail_resync
Related: OS#6396
Change-Id: I2769d331740324200b4512a154e1321bd5825b04
2024-03-08 19:55:53 +01:00
Pau Espin b81c5da337 GSUP_Templates: tr_GSUP_SAI_ERR: Allow passing extra params like MSG_CLASS
Change-Id: I817b079ed380514e067bda1e7f3f7c6177ef314b
2024-03-07 12:18:28 +00:00
Pau Espin 6601f22705 epdg: Introduce test TC_authinfo_MAA_unknown_user
Related: OS#6391
Change-Id: Ie4d9d019ed56401e7e19197b4a777a1e6a55e7ee
2024-03-06 18:26:14 +00:00
Pau Espin 009ab6fe1c epdg: Transmit MIP6-Agent-Info AVP in S6b SAR
Inform the AAA-server about the selected PDN-GW.
Change-Id: Ia0f00a00b6474e19bb4cdc77724c75a55ef5c1f9
2024-03-05 14:44:23 +01:00
Pau Espin 9b2ebc005f epdg: Add missing Non-3GPP-User-Data AVP to tx Swx SAA
Change-Id: I05bbf076464f9110ee68c46e309d150207f8bfcd
2024-03-05 14:42:08 +01:00
Pau Espin 7337d45f06 DIAMETER_Types: generate types for RFC4004
RFC 4004 contains MIP-Home-Agent-Address AVP, which is part of
MIP6-Agent-Info AVP in RFC 5447.

Change-Id: I66cae565d332d88f24c4ee94459770f9d24c16af
2024-03-05 14:23:57 +01:00
Pau Espin 5154e357e4 Small improvements to DIAMETER_ts29_272_Templates.ttcn
* Move Service-Selection template to the TS 29.272 since it belongs
  there.
* Set some parameter types to "template (value)" which makes it easier
  for users, since both a template and a value can then be passed.

Change-Id: Ic57b2c5ec0a953f9a1751d4ce4ad441daafd3c87
2024-03-05 13:28:58 +01:00
Pau Espin 5f5dbfe7fa DIAMETER_Types: Generate types for 3GPP TS 29.273
The ddf file is added at the end of the list since it depends on tons of
other RFC and 3GGP TS specs, see for instance TS 29.372 Table 8.2.3.0.

Change-Id: I17f7f025ff31d9ce619cd23bfa5f1af282969dbf
2024-03-05 12:52:48 +01:00
Pau Espin 5b28c96469 DIAMETER_Types: Move RFC ddf files earlier in the dependency list of files to generate
A ddf file for TS 29.273 will be added soon to the list, which depends
on several RFCs. Move RFCs earlier in the list since this is a more
generic file than a 3GPP one.

Change-Id: Idcbdfd97332195af05928c81068f6a4779ac306e
2024-03-05 12:50:54 +01:00
Pau Espin e16e928f14 ggsn_tests: Split out generic ICMP(v6) related templates and functions
Change-Id: I53a5da05caeef4cdd59778840a6f4eed489f1b93
2024-03-04 21:47:55 +00:00
Pau Espin 65a7f762ef GTPv2_Emulation: Add support to handle GTPv1-U
Change-Id: I34c744015c09a387cbf736063303bdb61ca4744e
2024-03-04 10:22:31 +00:00
Vadim Yanitskiy f197ed2dfd library/M3UA: support TCP transport, implement desegmentation
Change-Id: If1dcdb185d08a08dc5a06c37d9d6ffe7d6da9325
Related: libosmo-sccp.git I8c76d271472befacbeb998a93bbdc9e8660d9b5d
Related: SYS#5424
2024-03-01 11:57:00 +00:00
Pau Espin 4b090c95d5 Split GTP_CodecPort/GTP_Templates into C and U variants
The Types are already split in the dependent modules in GTPC_Types and
GTPU_Types.
There's no point in keeping them together in the same file since those 2
protocols are mostly independent.
Furthermore, testsuites using GTPv2C + GTPv1U don't need GTPv1C.

Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d
2024-03-01 10:28:22 +00:00