Commit Graph

4075 Commits

Author SHA1 Message Date
Pau Espin 4379992323 deps/Makefile: Update titan.ProtocolEmulations.SCCP ref after osmocom fork rebase
The osmocom git fork containing an extra patch has been rebase to
current upstream master, which now contains a fix for LUDT(S) messages
which will be required in a follow-up patch.

Related: OS#6185
Related: SYS#6566
Change-Id: Id8b7ab652b656841a9b73d40d79077a47f45e735
2023-09-20 17:37:02 +00:00
Philipp Maier 4222f479a2 PCU_Tests: use PCUIF v.11 exclusively
OsmoPCU has support for PCUIF v.11 for quite some time now. Let's
upgrade the testsuite as well.

Related: OS#5927
Change-Id: I6c4042f2224cd48aecc1b1499226f7d23caddd4f
2023-09-19 13:10:25 +02:00
Neels Hofmeyr fb7f43b8ad sip: pass CallPars into f_TC_*()
Move composition of CallPars out of all f_* functions into their TC_*
functions, so that future tests can reuse the f_* functions with
different CallPars.

An upcoming patch wants to call f_TC_mo_success_rel_sip() with different
CallPars.

Change-Id: Icdcaa7a8a0fadcd6f5715ad052e286b904ded570
2023-09-15 14:53:06 +00:00
Neels Hofmeyr c35b657916 sip: tweak failure reporting for SIP messages
Help developers by logging message matching failures in detail.

Change-Id: Id48016657ebb83953fe74f65332f318edf8f75e6
2023-09-15 14:53:06 +00:00
Neels Hofmeyr d3cca1dffc sip: drop unused var
Change-Id: Id09760238c0e46de2c06e2cc5e7cfd1ffe84cb64
2023-09-15 14:53:06 +00:00
Neels Hofmeyr baf0272d81 sip: tweak log msg
Change-Id: Icf8a88306bf08d6e0d2c62f6c09ce89b36a40254
2023-09-15 14:53:06 +00:00
Pau Espin 8d000b7773 PCUIF_Types: Use mp_pcuif_version := 11 everywhere
Since osmo-bts 1.7.0 & osmo-pcu 1.3.0, which were just released
PCUIF v11 is supported, so use it by default.

Change-Id: I8e5f44fc1d613c12eaf984dff860ee6f05c2c171
2023-09-14 17:31:58 +02:00
Philipp Maier f74f319ea5 TC_s1ap_attach: setup S11 interface, catch Create Session Request
The testcase TC_s1ap_attach is not complete yet. Since the testsuite
lacked the S11 interface, it was not possible to develop the testcase
beond the S1AP/NAS-EPS Security Mode Command. However, the S11 interface
is now available to the testsuite, so let's show that it works by
catching the Create Session Request. Let's also put a TODO that the
testcase needs to be completed still.

Related: OS#5760
Change-Id: I6350a3d5cab33fa4f43e4cdcbd7bf3241821d233
2023-09-12 09:26:44 +00:00
Neels Hofmeyr 932f6133ba MNCC_EncDec.c: fix missing SDP in enc of mncc_rtp
Change-Id: Ice4e9ac63d9d8c8bff33298eb1e1dcb413179cc9
2023-09-07 05:14:50 +02:00
Pau Espin 7aa4ad8b67 dia2gsup: Introduce new error scenario tests
Related: OS#5757
Change-Id: Ic870a2c1de74bee3f7d8e26874635d58469ccbea
2023-09-06 12:48:53 +00:00
Alexander Couzens 25d284995d HLR_Tests: add testcase for multiple APNs in subscriber data
With a new HLR version there are multiple APN possible in the
Subscriber Data (PDP Info).

Related: SYS#6391
Change-Id: I8d0c08272bc239370e800d6014ab9c68087b8989
2023-09-05 18:44:00 +00:00
Alexander Couzens 4cbd207a09 hlr: implement str2apn() to convert an apn as string into octetstring
APN are encoded by splitting each domain part by the dot and prefix
each element by a 8bit length.
E.g. internet -> \x08internet and internet.foo -> \x08internet\x03foo

Change-Id: I607969cd58110d4d5ff1b828e64cf2b5031868ac
2023-09-05 18:44:00 +00:00
Vadim Yanitskiy f8ee84c22b Revert "BTS_Tests: execute TC_dyn_osmo_pdch_{tchh,sdcch8}_race_act last"
This reverts commit 46f199271e.

Crashing the IUT is no longer the case, so return these back.

Change-Id: I004b55a79a04a20209d8a91e1f307f55c2b6ea13
2023-09-05 16:10:48 +07:00
Vadim Yanitskiy 981bc2cccb BTS_Tests: add TC_data_rtp_tch* for CSD
Change-Id: I9a0dc0fcf722f862d8dcf04660d4448662210f44
Related: osmo-bts.git I08ffbf8e79ce76a586d61f5463890c6e72a6d9b9
Related: osmocom-bb.git I0d7389a9a5f7019b9316ab1c0115797ff54a0e41
Related: OS#1572, OS#4396
2023-09-04 20:27:44 +00:00
Vadim Yanitskiy fde1b81183 BTS_Tests: decouple payload generation from f_rtpem_activate()
This function is going to be used by the upcoming testcases for CSD
specific channel modes.  Generating the Rx/Tx payload(s) now becomes
the duty of the calling function.  So far the only user of this API
is f_TC_speech_rtp(), so move the speech payload generation there.

Change-Id: I9e823c33b1dbbadd57bc63df25b8ddf368d76232
Related: OS#1572
2023-09-04 20:27:44 +00:00
Vadim Yanitskiy 4d728c9670 BTS_Tests: f_rtpem_activate(): make RTP payload type configurable
Change-Id: I84f576f578ffc48c8b5e545bc1700000eb693efb
Related: OS#1572
2023-09-04 20:27:44 +00:00
Vadim Yanitskiy 15034cb552 library: RTP_Emulation: implement new RTPEM_MODE_LOOPBACK
Change-Id: Iee8f736e1eebc357fc997353ee4b629d24dc09e7
Related: OS#1572
2023-09-04 20:27:44 +00:00
Philipp Maier ac791564f1 GTPv2_Emulation: improve accessibility of unit-data (TEID0)
When GTPv2 unit-data is passed around, there is always the problem that
it is routed to the MTC_CT (TEID0). The reason for this is that GTPv2_Emulation
cannot determine a specific receiver component because unit-data does
not contain any addressing fields that would identifiy a specific vc_conn.

In GTPv2_Emulation there is already a mechanism implemented that detects
responses by their sequence number. Untfortunately this does only work
when the vc_conn has send a unit-data message before so that the
sequence number of the response can be guessed.

In case the first messages comes from the IUT, there is no way to
determine the receiving vc_conn, so this message is then routed to the
MCT_CT (TEID0). This can be a problem for testcases that run from inside
a ConnHdlr componet.

The solution that is proposed in this patch uses a mechanism that allows
to create an expectation for a specific messageType. When the GTPv2_Emulation
sees a unit-data message with the expected messageType, it will forward
it to all ConnHdlr (vc_conn) components that have registered for this
messageType previously.

Related: OS#5760
Change-Id: I02bb74d7bd547347168b5c64ee6512c71e8fd960
2023-09-01 17:23:45 +02:00
Philipp Maier 26a09f39bd MME_Tests: add new testcase TC_s1ap_tau_unknown_guti
A tracking area update that contains an OldGUTI (TMSI) that is unknown
to the MME should be rejected.

Related: OS#5760
Change-Id: I9306fea69ac930b9642528e2fd32a7091147081e
2023-09-01 17:23:45 +02:00
Philipp Maier c1d9ef06e2 NAS_Templates: add template for Tracking Area Update Reject
Change-Id: Id64e8a28e47235766efbef6df0114c3024cc2f47
Related: OS#5760
2023-09-01 17:23:45 +02:00
Philipp Maier ce50b12034 MME_Tests: remove unused timer variable
The Timer T in TC_RIM_RAN_INF is not used, let's remove it.

Related: OS#5760
Change-Id: I3d18cda38789e5a42536fd17b6641efa725f757b
2023-09-01 17:23:35 +02:00
Philipp Maier f155f6fb10 NAS_Templates: add template for Tracking Area Update Request
Change-Id: I66843f30f70d73ff233b0da0680cbaba08838227
Related: OS#5760
2023-09-01 17:23:25 +02:00
Philipp Maier 64bfc89a4f NAS_Templates: add template for NAS key set identifier
Related: OS#5760
Change-Id: I2df0c9d1bf4bf0073b5f7b77708b8de59f96a639
2023-09-01 17:23:25 +02:00
Philipp Maier 9e79658067 NAS_Templates: add template for EPS update type
Related: OS#5760
Change-Id: I6ffac88cc1d3967dc8000e17a65cdba79a013cf7
2023-09-01 17:23:25 +02:00
Philipp Maier 3e582453f4 NAS_Templates: add templates for EPS_Mobile_ID_IMSI/IMEI/GUTI
We do have ts_NAS_MobileId_IMSI/IMEI/GUTI, those can not be used when
crafting EPS messages. However, we can use them to craft
ts_EPS_MobileId_IMSI/IMEI/GUTI templates.

Related: OS#5760
Change-Id: I1adf8c652530904a8e9bd988e78c995c75bb49ab
2023-09-01 17:23:25 +02:00
Philipp Maier 68cf947ca7 NAS_Templates: fix ts_NAS_GUTI
The template ts_NAS_GUTI permutates the MCC/MNC digits in a weird way,
which seems to map to a format that is not used anywhere else. Also the
template is not used anywhere yet.

Let's not permutate the MCC/MNC digit, instead let's put a comment that
makes clear which format has to be used.

Change-Id: I9546993987b873e8ae921664238b234608e37bba
Related: OS#5760
2023-09-01 17:23:25 +02:00
Philipp Maier 9abb8c920b MME_Tests: Add S11/GTPv2 interface
The S11 interface is used by the MME to talk to the SGW-C. At the moment
we do not simulate the S11 interface in our testcases. This is in particular
a problem for TC_s1ap_attach, which needs to answer the Create Session
Request, comming from the MME in order to continue.

As a first step, lets add evrything that is required to run an S11
interface in the testsuite.

Change-Id: I545dd6cef3cef7283f2e04c2406a2703c2fdd01a
Related: OS#5760
2023-09-01 17:23:25 +02:00
Philipp Maier b11ee50717 GTPv2_Emulation: make sure g_uecups_conn_id is populated.
In function f_init, we activate altstep as_uecups_ind at the end of the
function. In as_uecups we use the template generator function
tr_UECUPS_RecvFrom_R(). In this function we use g_uecups_conn_id, which
is only populated when use_gtpu_daemon is set to true. When
use_gtpu_daemon is false g_uecups_conn_id will be <unbound>, which leads
into an error.

Related: OS#5760
Change-Id: Ifc2e8d9de13d5d183d6f052b2092c356ab4973d1
2023-09-01 14:14:42 +02:00
Harald Welte 5b2ce618b1 stp: Don't expect a fixed SLS in IPA -> M3UA case
We are about to introduce a feature for SLS "randomization" in osmo-stp,
so let's modifiy our STP tests to permit any SLS in the M3UA messages
after IPA -> M3UA conversion.

Change-Id: Ib70322b80a72e3e7dc3155bca9e67b03efb413e0
Related: SYS#6543
2023-09-01 08:29:01 +00:00
Pau Espin 0d138c6f25 GTP_Templates: Fix several template type incongruencies
This fixes following error while running test
GGSN_Tests.TC_pdp46_act_deact_apn4:

"GTP_Templates.ttcn:315 Dynamic test case error: Restriction `omit' on
template of type octetstring violated."

Change-Id: I3846d2a077e4bc53a772e354fcc3c38ca952b38f
2023-08-31 16:23:20 +02:00
Pau Espin 28dba3aa6e dia2gsup: initial refactoring
Do some refactoring to the core infrastructure of the tests before
adding new testsi. Among others:
- Move Tguard to main component
- Avoid having to call f_init_handler in each handler (do it
  automatically during f_start_handler()).

Change-Id: I4a1bf6ca03549688704815e3fec4e5152d0181a6
2023-08-31 11:50:47 +00:00
Philipp Maier 4e76926683 PCUIF_Components: fix confirm member in record BTS_CCCH_Block
The record BTS_CCCH_Block has an optional field "confirm". However, this
field is not marked as optional. Also f_BTS_CT_handler should make sure
that this field is populated with "omit" when it is not present.

Related: OS#5927
Change-Id: Ifcbb72c22b93855bed89f4970cf63bd2d6fcd128
2023-08-30 15:40:15 +02:00
Vadim Yanitskiy d0859cf8f0 PCUIF: fix coding of 'lqual_cb' field in PCUIF_data
This patch fixes BTS_Tests.TC_pcu_data_ind_lqual_cb, which is currently
failing due to incorrect decoding of the 'lqual_cb' field:

  "Link quality -32512 does not match expected value -256"

The COMP attribute is documented in TITAN's reference guide,
see 4-ttcn3_language_extensions.adoc#attributes for more info.

Change-Id: I79b8cd41010f212898fbf39c4c600ace69603e79
Related: OS#5954
2023-08-30 09:19:22 +00:00
Andreas Eversberg 1733de3393 ASCI: Add tests for voice group/broadcast calls at MSC
Related: OS#4854
Change-Id: I4bbe739ea55ecf9f7ebf9ee413df69f29aa642f8
2023-08-30 09:18:55 +00:00
Philipp Maier ca5da3767c PCUIF_Components: add compatibility for PCU_IF_SAPI_AGCH_2
When we receive a PCUIF_DATA_REQ, f_BTS_CT_handler will mangle the
incoming message for us. The resulting BTS_CCCH_Block that is sent up to
the component not only contains the PCUIF message, but will also have
the already parsed MAC block attached. This currently only works for
PCU_IF_SAPI_PCH and PCU_IF_SAPI_PCH_2 but not for PCU_IF_SAPI_AGCH_2.

Let's add compatibility for PCU_IF_SAPI_AGCH_2.

Related: OS#5927
Change-Id: Ife67bde444d957822a953391b80d01d49fff064b
2023-08-29 13:18:03 +02:00
Philipp Maier 436e8b84d0 BTS_Tests: add new testcase TC_pcu_data_req_imm_ass_agch
In PCUIF v.11 we support getting confirmations for IMMEDIATE ASSIGNMENT
messages that are sent through the AGCH.

Related: OS#5927
Change-Id: Iec00d8144dfb2cd8bcee9093c96a3cc98aea6458
2023-08-29 13:18:03 +02:00
Philipp Maier 779a5e5f33 BTS_Tests: use f_PCUIF_tx_mac_block_agch in TC_pcu_data_req_agch
The testcase TC_pcu_data_req_agch uses SAPI PCU_IF_SAPI_AGCH. Since we
now have a function f_PCUIF_tx_mac_block_agch() to send MAC blocks over
the AGCH using the recently introduced SAPI PCU_IF_SAPI_AGCH_2, lets use
this function instead.

Related: OS#5927
Change-Id: I341bbd01e8132fab913d307bfb4b2fb873cdde3c
2023-08-29 13:18:03 +02:00
Philipp Maier 896cbc9859 PCUIF: Add support for PCU_IF_SAPI_AGCH_2
In PCUIF v.11 it will be possible to get confirmations for IMMEDIATE
ASSIGNMENT messages sent through the AGCH.

Related: OS#5927
Change-Id: I40e05a2e68cca77d3c2f41df9af8d35762488abf
2023-08-29 13:18:03 +02:00
Philipp Maier 0221248078 PCUIF: use confirm flag in struct gsm_pcu_if_pch
In the recent PCUIF change of osmo-pcu (see Depends) a confirm flag
is added to struct gsm_pcu_if_pch. This flag tells the receiving end
(OsmoBSC or OsmoBTS) that the sending of the received MAC block has
to be confirmed towards the PCU. OsmoBTS and OsmoPCU now rely on the
conformation flag.

Let's update the BTS_and PCU testsuites accordingly.

Related: OS#5927
Depends: osmo-pcu.git Ia202862aafc1f0cb6601574ef61eb9155de11f04
Change-Id: I7017ca20ca7e0b77d0f363121e4f17280e39e8ac
2023-08-29 13:18:03 +02:00
Philipp Maier d501ee8c7a GPRS_Components: remove excess new-line
Change-Id: Id039755d0136276ec2fb8f6d370a4415a8d3e17e
2023-08-29 13:18:03 +02:00
Pau Espin 8dcb0610a1 DIAMETER: Origin-State-Id in DWR and DWA messages is optional
Change-Id: I02e6f97a308f1752711aafed39c1d7534a382c70
2023-08-29 10:56:19 +00:00
Andreas Eversberg 1a8ed1e421 ASCI: Update commit hash of titan.ProtocolModules.MobileL3_v13.4.0
After fixing GCC and BCC transaction ID, the new head is:
b6602eb357673f097ea1a1d22edd568ecd239da1

Related: OS#4854
Change-Id: I2833750a8cf1def74f92a5a50f0d271891cee05f
2023-08-29 11:11:16 +02:00
Vadim Yanitskiy 0e5693f034 library: L1CTL: add 'start_fn' field to UL/DL TBF CFG.req messages
Change-Id: I800e4813671e92f6010945d58dfe6297302c6f13
Related: osmocom-bb.git Ibb6a05165fe1c81268fb0e3674adae4065e78171
Related: OS#5500, OS#6147
2023-08-27 14:10:53 +07:00
Harald Welte c98d9a9692 dia2gsup: Introduce initial testsuite
This testsuite contains 1 working test so far.

Related: OS#5757
Change-Id: Ia3db9fd62249777cd7c63f6c4af1568c79468728
2023-08-26 07:27:15 +00:00
Pau Espin db017f49ae DIAMETER_Emulation: Support forwarding messages identified by ete_id to a client component
This is useful in the scenarios where the client component submits a
IMSI-based transaction such as AIR, but its answer (AIA) contains no
IMSI (as per what's specified in TS 29.272 5.2.3.1). As a result, the
received AIA message would be enqueued in the DIAMETER_UNIT.

With this new feature, the test can create an expect using the
End-to-End Identifier of the message it is going to transmit, and
receive the answer in the same DIAMETER_CLIENT port the request was
transmitted, even if it contains no IMSI.

Related: OS#5757
Change-Id: I25e44146d2c49e308c1fb490b499e70ac6045f2f
2023-08-26 07:27:15 +00:00
Pau Espin 7bedcf84f8 diameter: Fix order of AVPs in tr_DIA_AIA
Put them in the order they are specified and transmitted in the wire.

Change-Id: Ib7ced55a5986e4b9b69529622625ae3694a4d44d
2023-08-26 07:27:15 +00:00
Oliver Smith caa36c958d msc: TC_ho_inter_msc_out_csd: new test
Related: OS#4394
Change-Id: Id45a634888776265a88d607080b951a2cc33820d
2023-08-25 13:18:45 +00:00
Oliver Smith be922911d7 Cosmetic: msc: f_tc_ho_inter_msc_out: fix indent
Change-Id: Ie648a485991aff0c28182955a7df2d1505457978
2023-08-25 13:18:45 +00:00
Oliver Smith 44424db278 msc: TC_ho_inter_bsc_csd: new test
Related: OS#4394
Change-Id: I391856282d046e915c374e0efb06d4da870bff1f
2023-08-25 13:18:45 +00:00
Philipp Maier 21bac7a52f GTP_Templates: fix wrong function name
The decoder function that decodes the RIM ROUTING ADDRESS should be
called dec_RIM_Routing_Address_GTPC and not dec_PCUIF_pch_dt

Change-Id: I4235bc727bf8e71d1ef4a43c830706b6e1c826c9
2023-08-25 10:12:04 +00:00