Commit Graph

3939 Commits

Author SHA1 Message Date
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
Oliver Smith c4a0c3c2df msc: add helper func f_set_cpars_csd()
Prepare to add new CSD related tests that also need to configure the
call parameters for CSD.

Related: OS#4394
Change-Id: I49c29af736cc37c393cecde4c45c4ffd41322bf7
2023-08-25 09:34:22 +00:00
Oliver Smith 90f31bbd4b msc/BSC_Conn…: ass req/compl: check/use CSD codec
Verify that the MSC sends the CSData codec in the Assignment Request and
send this codec in the Assignment Complete towards the MSC.

Related: OS#4394
Change-Id: I7906e6fdb82c27f071aa55f2f73ba4108bfb46db
2023-08-25 09:34:22 +00:00
Philipp Maier 46059f081c MME_Tests: add testcase TC_s1ap_reset
There is currently no testcase that makes sure that the S1AP reset
works.

Related: OS#5760
Change-Id: I23f4d5f2c39790b6cb0dacaec1e31912177af3ec
2023-08-22 14:39:41 +00:00
Philipp Maier 957d4a9587 BTS_Tests: rewrite outdated comment
We are no longer "appending" imsi digits. This is now done properly
using a struct but let's still mention what we use the IMSI for.

Related: OS#5927
Change-Id: I3d943cd96e1d9627ad68e3439b2a649baa5785f1
2023-08-22 15:08:10 +02:00
Philipp Maier e683828c34 PCUIF_Types: get rid of _DT, _dt (Direct TLLI)
Since we now no longer refer to TLLI when we mean "message ID" (msg_id),
we should also remove the "_DT" / "_dt" suffix from structs and define
constants and replace it with "_2" if required.

Depends: osmo-pcu.git If641b507dcb6b176109c99dce7cff2a7561364b0
Related: OS#5927
Change-Id: I15e754ce3ceed92a517586a073d3e3ed008b5eef
2023-08-22 10:33:56 +00:00
Neels Hofmeyr d019cc071f hnbgw: TC_apply_sccp()
Change-Id: Ia1ff0cb56893edf045ea3cb3233882ca93445d21
2023-08-19 01:59:27 +00:00
Neels Hofmeyr 8f5c80d070 rua: also match on RUA Disconnect without RANAP payload
Add tr_RUA_Disconnect_opt_ranap that matches RUA Disconnect with and
without RANAP payload.

Use this in RUA_Emulation as_main_rua(), to trigger a RUA_Disc_Ind to
the CLIENT also for Disconnect without RANAP data.

Rationale:

This patch exists for the line

  RUA.receive(RUA_Disc_Ind:?);

in the TC_apply_sccp patch Ia1ff0cb56893edf045ea3cb3233882ca93445d21

In upcoming HNBGW_Tests.TC_apply_sccp, I want to test for an ungraceful
RUA Disconnect, which is sent without a RANAP payload. But
tr_RUA_Disconnect only matches when a RANAP Message IE is present. In
consequence, RUA_Emulation ignores "empty" RUA Disconnect, and my test
case cannot verify that the RUA Disconnect occurred. Fix that.

Change-Id: Ia0b89e9198794d196a88040ee89bdf24f3b08ae0
2023-08-19 01:59:27 +00:00
Neels Hofmeyr 02040fdc3d rua: RUA_Disc_Ind only when CLIENT is connected
Only dispatch RUA_Disc_Ind to CLIENT when CLIENT is connected.

Reason:

If a test does not care much about conn cleanup, it may cause a
situation where the CLIENT has already disconnected when osmo-hnbgw
sends a RUA Disconnect. A disconnected CLIENT port will cause the final
verdict to become 'error'. Instead, if the CLIENT is already
disconnected, just don't bother, and allow tests to still pass.

This will become necessary, because:

So far a RUA Disconnect without any RANAP payload is not detected by the
RUA emulation. But patch Ia0b89e9198794d196a88040ee89bdf24f3b08ae0 will
fix it, so that *every* RUA Disconnect causes a RUA_Disc_Ind sent to the
CLIENT. From then on, we will see a bunch more RUA_Disc_Ind at the end
of tests. Some of those happen *after* the client already disconnected,
causing tests to error that have been passing for a long time.

Change-Id: Ia1403f39cfdc75139922292a3eace7a69a64a576
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 c8172bda14 RANAP_Templates: drop unused arg from ts_RANAP_Paging()
Change-Id: I7e4bbdba34d2f0af9044050fff19ced5ea969ae9
2023-08-19 01:59:27 +00:00
Philipp Maier 19797d6745 PCUIF_Types: remove unnecessary members from record PCUIF_data_cnf_dt
The record PCUIF_data_cnf_dt was added when the first experiments
with Ericsson RBS base stations were made. It is essentially a copy of
record PCUIF_data, where the mamber "data" was replaced with a member
"msg_id" (which was originally called "tlli"). Since we didn't know
back then which parameters we would still need at some later point we
kept all the other parameters. However, to this day we never used the
parameters below fn. Even fn was only used for logging purposes, but is
now also unused.

Let's remove all those unused members.

(Since all removed members are at the tail of the struct,
compatibility with other programs that use the PCUIF should not break.)

Related: OS#5927
Change-Id: Ie17d73d4c4bf2921800f87f6d6be7c05ce3a291d
2023-08-17 17:01:55 +02:00
Philipp Maier 83697dd286 PCUIF_Codec port, do not return fn in f_PCUIF_tx_imm_ass_pch
The function f_PCUIF_tx_imm_ass_pch() retuns the frame number, that is
sent back from osmo-bts via PCUIF / gsm_pcu_if_data_cnf_dt. Since we are
about to remove this field from gsm_pcu_if_data_cnf_dt, lets no longer
access it here as well. Also the return code is never used anywhere in
the tests. (In osmo-pcu the fn parameter was used for logging only, in
osmo-bts it was set to constant 0)

Related: OS#5927
Change-Id: I0e5bad7a0d74e5032f2818f6fdf5b9b2ecb531cc
2023-08-17 16:29:11 +02:00
Philipp Maier a6708cf613 PCUIF: rename tlli to msg_id
To confirm downlink IMMEDIATE ASSIGNMENT messages, we use the TLLI as an
identifier and the related record member is also called "tlli".
Unfortunately this is misleading since the message identifier does not
necessarly have to be a TLLI. It is just an implementation detail that
osmo-pcu uses the TLLI as a message identifier.

To make that clear, lets rename the tlli member (and variable and
parameter names where it is passed on) to "msg_id".

(Since this change only renames variables and struct members it will not
break compatibility with other programs that use the PCUIF)

Related: OS#5927
Depends: osmo-pcu.git I4a25039dfe329e68879bc68936e49c4b190625e6
Change-Id: I1db29d5b1920e351c452b798c3260654c2cbe0cb
2023-08-17 14:12:14 +00:00
Philipp Maier 7e9acc3c4e SGSN_Tests: add RIM ROUTING ADDRESS field in request
When sending the RAN INFORMATION REQUEST on GTP-C, we do not add a RIM
ROUTING ADDRESS + RIM ROUTING ADDRESS DISCRIMINATOR field. Those fields
are optional but commonly added so that the SGSN does not have to
disassemble the RAN TRANSPARENT CONTAINTER to know the destination
address.

see also: 3gpp TS 29.060, section 7.5.14 and
          3GPP TS 23.060, section 8.1.5.2.2

Change-Id: Id944c66f28d787a18c6c6f7c9dc885997d83e94c
Related: OS#6095
2023-08-15 09:42:51 +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
Philipp Maier a9306201f0 MME_Tests: add testcase TC_RIM_RAN_INF
The proposed testcase models a full RIM RAN INFORMATION REQUEST that
originates at the eNB (S1AP), is forwarded by the MME towards GERAN
(GTP) and goes back towards the MME (GTP) and is eventually forwarded
by the MME back to the eNB (S1AP).

Related: OS#5760
Related: OS#5759
Change-Id: I22d5aaab64df2824099977fb574afb86a4b7e91f
2023-08-09 11:33:55 +02:00
Philipp Maier 653a01455e GTP_Templates: Add templates for RIM ROUTING ADDRESS
The IE types RIM_RoutingAddress and RIM_RoutingAddress_Discriminator
have not coresponding templates yet.

Related: OS#6095
Change-Id: If79f94ac3b7ec9a76763141ee2d8cac50c69d60b
2023-08-09 11:33:55 +02:00
Philipp Maier 578894949c GTP_Templates: add template restriction qualifiers
The GTP Templates lack the template restriction qualifiers (present,
value, omit) in many places.

Related: OS#6095
Change-Id: Ic439b4ae85b417fde0ddfb8fa00758d6486b57c8
2023-08-09 11:30:00 +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 7afb13f2b0 ctrl: f_counter_name_vals_get_n(): add start_idx, for hnbgw
Allow starting with a specific 'msc' / 'sgsn' instance without having to
read all the lower numbers along. For HNBGW_Tests.ttcn.

Change-Id: I9b74a1df9e115883b4b0ac0f606a370c6aca7f40
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
Philipp Maier f7cb0bb67e GTP_Templates: add decoder/encoder functions for RIM_Routing_Address_GTPC
When forwarding RAN TRANSPARENT CONTAINERs containers on GTP-C, the
sender adds a RIM ROUTING ADDRESS and a RIM ROUTING ADDRESS
DISCRIMINATOR. The RIM ROUTING ADDRESS is represented as an
octet-string, so we need encoder/decoder functions for it.

Related: OS#6095
Change-Id: I45d1f5b019f3847fd611c38dc19d78d6fe027c5a
2023-08-07 14:59:19 +02:00
Philipp Maier 5515715ebc BTS_Tests: fix log line (AGCH->PCH)
The testcase TC_pcu_data_req_imm_ass_pch uses the PCH to transmit the
IMMEDIATE ASSIGNMENT message but the log line mentions the AGCH.

Related: OS#5927
Change-Id: I7cb8d91f2c3f92009d33134167eab856ee02fdab
2023-08-03 12:14:26 +02:00
Philipp Maier a4f465a4a4 PCUIF_CodecPort: mention channel (PCH) in log lines
Related: OS#5927
Change-Id: I8a304acfc8894e6b31617756f43632a9c4dd5d23
2023-08-03 12:06:06 +02:00
Philipp Maier 9aeafbd8d4 BTS_Tests: fix comment
The testcase is about PCH, not AGCH

Related: OS#5927
Change-Id: I5c2aa1aab261a0f4bfb24b4be7af29c1d814d37a
2023-08-03 11:46:20 +02:00
Philipp Maier 2291bf6cb6 BTS_Tests: call f_pcu_data_req with correct timeslot
We are calling f_pcu_data_req() with SAPI PCU_IF_SAPI_AGCH or SAPI
PCU_IF_SAPI_PCH and use ts_nr 7.

In this particular case, the parameter ts_nr has no effect (see pcu_sock.c in
osmo-bts.git). However, to prevent confusion, lets use ts_nr 0 since AGCH and
PCH are actually is on TS 0 (on TRX 0).

Related: OS#5927
Change-Id: I20566de992809d6c857c9062bf0fb799efa43e45
2023-08-03 11:46:20 +02:00
Pau Espin 85ad3d01c7 pcu: Introduce test TC_dl_multislot_tbf_ms_class_unknown
Related: OS#6118
Change-Id: I9af8792fe4c44b5dd1aab5a2d4b7d3c2a2366d12
2023-07-31 09:14:41 +00:00
Pau Espin 1de8df76d7 pcu: TC_dl_multislot_tbf_ms_class_from_sgsn(): Properly wait for USF
Change-Id: I34b31c292c00b6880311906ce6713a8e3c69a0d2
2023-07-31 09:14:41 +00:00
Pau Espin bd849ccd16 pcu: Split f_ms_tx_ul_data_block() into helper functions
This allows shrinking some tests which wish to send specificaly crafter
LlcBlocks (since the way LlcBlocks are created for f_ms_tx_ul_data_block
only allows sending data related to the same upper LLC PDU)

Change-Id: I81176fa5c7caa2535bcc97eec26833579933ed7a
2023-07-31 09:14:41 +00:00
Andreas Eversberg 5ada75dd89 ASCI: Add GCC and BCC service requests to BSC_ConnectionHandler.ttcn
Related: OS#4854
Change-Id: Ic4875fde45dfc8d6928a48c0f6edc91d994bfa97
2023-07-28 15:15:51 +02:00
Andreas Eversberg e5a6ef1d31 ASCI: Rename handoverRequest to n_connect in RAN_Emulation.ttcnpp
The expectation table is used to deliver new connections with Handover
Request as well as with VGCS/VBS Setup and VGCS/VBS Assignment Request.
"handoverRequest" is renamed to "n_connect".

Related: OS#4854
Change-Id: I941c5db5235785841f3368ef908a409bbb12150e
2023-07-28 15:14:48 +02:00
Andreas Eversberg d9a348c3ac ASCI: Allow incoming VGCS/VBS connections at RAN_Emulation.ttcnpp
Similar to Handover Requests the RAN Emulation can accept new SCCP
connections with VGCS/VBS Setup message and VGCS/VBS Assignment Request
message. The point code for the incoming connection can be registered
in the same way as for the Handover Request.

In order to allow multiple connections with the same point code, the
table entry in the ExpectTable must be released after receiving the
message. VGCS/VBS calls have multiple connections to the same BSC.
This patch does not break existing MSC handover tests.

Related: OS#4854
Change-Id: I3fc0c5efe7d9f270804e7295aeb65cfe7898bd7e
2023-07-28 11:28:13 +02:00
Andreas Eversberg 7452806626 ASCI: Add missing codec list to *_BSSMAP_VGCS_VBS_AssignmentFail templates
Relates: OS#4854
Change-Id: I5f67c676035eaa9d61f7b123995770fd61eadaff
2023-07-28 11:28:13 +02:00