Commit Graph

1588 Commits

Author SHA1 Message Date
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
Pau Espin 7b2cc9219a epdg: Introduce test TC_s2b_CreateSession_rejected
Related: OS#6371
Change-Id: Ide1df9e359b12094f82e54a7824c83f515aedcc3
2024-03-01 10:28:22 +00:00
Pau Espin e1f7a8c324 GSUP_Emulation: Update internal tables to allow 256 sessions
Other Emulations like GTPv2 and DIAMETER already support that number of
sessions. Increase it to the same number in GSUP_Emulation to allow
handling a high amount of concurrent sessions while testing ePDG.

Change-Id: I9ce650140fc372debc85b603a20bbe9ea165c972
2024-02-28 14:15:19 +01:00
Pau Espin 4ecc808f1d pgw: Introduce test TC_s2b_createSession_v4_apco
Make sure APCO IE is properly handled and answered back.

Change-Id: Ib01fe0512866924a5afc4d6719ceacb0b4b54df2
2024-02-28 12:54:21 +00:00
Pau Espin 518e24b861 pgw: Introduce test TC_s2b_createSession_v4_no_apco
This test allows initial testing of a session creation through the S2b
interface (emulating an ePDG).

A follow-up test will be added to test the APCO IE (feature which
open5gs-smfd still doesn't support).

Change-Id: I38e469edf0e00feca5a648035b64645e2c905937
2024-02-28 12:54:21 +00:00
Pau Espin 355a133048 PGW_Tests: refactor/improve several parameters to accomodate for different GTPv2C interfaces
So far we were only testing s5/s8 interface, but we'll want to test s2b
soon.
This commit is a mixture of refactorings and code improvements as a step
towards testing S2b interface.

Change-Id: I22b3e18d02ca828e2ea43bde2e0a602db236cf50
2024-02-23 17:44:17 +01:00
Pau Espin f29258602e epdg: Make sure PCO is forwarded from strongswan to PGW and back
Related: OS#6369
Change-Id: Ie01d6e88b3ccc55fecc97c2ba75bb31bba5b9ef7
2024-02-22 20:12:37 +01:00
Pau Espin cacd707fbf GTPv2_Templates: Allow specifying APCO IE in CreateSessionReq/Resp
Change-Id: I860a9424d6109434a953b1aa39d1fa6035fc7e94
2024-02-22 20:12:04 +01:00
Pau Espin ce1d3cb08c gsup: Add PCO IE
This commit adds a new file PCO_Types.ttcn which allows generically
encoding decoding PCOs.

Change-Id: I9a1ae74712d6e8e0cd524ccd7fc2529b1a15dd97
2024-02-21 20:00:24 +01:00
Pau Espin 78598b51ed epdg: Validate assigned PDP Address and APN
Change-Id: I440a7379c6dab5448d4c57c498ad9d086d0c456b
2024-02-14 19:23:59 +01:00
Pau Espin 8586b2675a epdg: Fix UsernMame being NAI instead of IMSI in S6b AAR
Change-Id: Ifa5b262db40b649c6dfe7b5ac43098208b3e8300
2024-02-09 18:12:21 +01:00
Pau Espin c2cfd550db epdg: Add PDP-Info IE to GSUP Auth Info Req
Strongswan already has this information during first IKE_AUTH message,
see 3GPP TS 24.302 7.2.2.1.

Change-Id: I42e4dc4bbcef969aae5867dbb103f8a5db157c89
2024-02-07 17:53:24 +01:00
Pau Espin 14abac5302 epdg: Introduce test TC_ho_lte_to_wifi
This test emulates a UE doing handover to ePDG, when it may create extra
dedicated bearers.

Change-Id: Ibdfeda1fa5d7016b1952d64b306cd501cb33f61b
2024-02-07 16:36:35 +00:00
Pau Espin cbe6eba269 epdg: Expect GSUP CancelLocationReq as consequence of DeleteBearerReq
Change-Id: Ibc37a9ef53315edab18f7b97a55cf504a40a4bf1
2024-02-07 16:36:35 +00:00
Vadim Yanitskiy 090759a297 library/L1CTL_Types: add definition of L1CTL_GPRS_UL_BLOCK_CNF
Change-Id: I772bb0ace0efbc7e7fe788fd49218fe398097943
Related: osmocom-bb.git I56e0b5631c7446390adbfc5664e56f56ebb88cc1
2024-02-05 21:43:05 +07:00
Pau Espin 4944a5cee6 epdg: Test UE-initiated Detach Procedure
Related: OS#6333
Change-Id: I19114c69119e42622f323378dd356217d107cb32
2024-01-31 19:27:55 +01:00
Pau Espin a518d05e9b GSUP: Fix spare and pdp_type_org fields swapped in PDPAddress IE
A recent commit added records to separate 2 binary octets into known
fields, but 2 fields filling 1 byte were actually written swapped. Fix
it now.

Fixes: 7b7a1e8ed1
Change-Id: I884bddb0e1e5f1cfc5615c11d6c7d602d0df9224
2024-01-30 12:35:35 +01:00
Pau Espin 1cbbf9edb6 NS_Emulation: expect altstep timeout entry only if timer is running
Should fix the following log message:
NS_Emulation.ttcnpp:784 Timeout operation on timer Tns_alive failed: The timer is not started.

Change-Id: If1fae965659f73fde2508b0e9158099025fa65f2
2024-01-30 11:15:48 +01:00
Pau Espin f7926c070a BSSGP_Emulation: expect altstep timeout entry only if timer is running
Should fix the following log message:
BSSGP_Emulation.ttcnpp:1118 Timeout operation on timer g_T1 failed: The timer is not started.

Change-Id: Id7d1b76a6bc1fc2f0f4896c59673c01293b526e9
2024-01-30 11:12:47 +01:00