Commit Graph

1339 Commits

Author SHA1 Message Date
Harald Welte a013e68fc9 HNBAP, RUA and RANAP protocol codecs
This patch introduces protocol codecs for the HNBAP, RUA and RANAP
protocols, which is mandatory for testing IuCS, IuPS or Iuh in
the future.

As Eclipse TITAN ASN.1 only supports the BER codec and the above
protocols all use APER, we need to use an external transcoder from
APER to BER and vice-versa.  This was implemented using a proprietary
ASN.1 compiler / trnaslator which sysmocom is packaging as
libfftranscode, which is made available as binary package
for Debian 9 at https://ftp.osmocom.org/binaries/libfftranscode/

Related: OS#2856, OS#2857, OS#2858
Change-Id: If4a72de9bc54d6e6a7daaca78a4d4aa5684203a5
2019-04-25 20:07:11 +00:00
Harald Welte 3e16b4d2f3 RAN_Adapter: Support build without IPA / BSSAP support
Change-Id: I5370f0ea6f2f6cfdc3370a6f3d3bf2e6c32af4d2
2019-04-25 20:07:11 +00:00
Harald Welte 3ca0ce13b2 RAN_Adapter: Rename functions from f_bssap_* to f_ran_adapter_*
Change-Id: I73818247f1dfc71c8ece11660e6c18f5f153d186
2019-04-25 20:07:11 +00:00
Harald Welte 2fce7887f4 RAN_Emulation: Modularize protocol support
The RAN_Emulation currently unconditionally provides BSSAP and MGCP support.
Let's re-structure the code so that support for those protocols is now
possible to enable/disable at compile time.

This patch is in preparation of introducing RANAP support in RAN_Emulation.

Change-Id: Id53ba3ff05f9946230e0e4a759245de14a0f9fbd
Related: OS#2856
2019-04-25 20:07:11 +00:00
Harald Welte 8a397ae7ba msc: Add testcase for UMTS AKA over GERAN TC_lu_imsi_auth3g_tmsi()
Change-Id: I10cc7ed214e83b4624587c60f332034d3f19b22d
2019-04-25 20:06:50 +00:00
Harald Welte c1f937a15b msc: f_mm_auth(): Add support for UMTS AKA
Change-Id: Id57adcebd63a06cfa555824e493561fe08f13d6d
2019-04-25 20:06:50 +00:00
Harald Welte 645a151f69 sgsn: Add test cases to verify SABM handling on LLGMM + LL5
As OsmoSGSN doesn't implement ABM, the correct resposne to any SABM
is DM.

RelateD: OS#3953
Change-Id: Ib0d371a3356d6cb481b794945476ab40f5e0f02a
2019-04-25 20:06:15 +00:00
Harald Welte a05b807922 sgsn: Add TC_llc_null to test if SGSN survives a LLC NULL packet
This test case reproduces a bug in OsmoSGSN where it would crash
as a result to sending LLC NULL frames.

Change-Id: I38326f2ebaaff009d4357edad9511ce2ce7736fd
Related: OS#3952
2019-04-25 20:06:15 +00:00
Harald Welte ceaff26682 LLC_Templates: Add templates for NULL and DISC
Change-Id: Ia5b350990379bba1677a0c1c99cf37e6651ba84d
2019-04-25 20:06:15 +00:00
Harald Welte 2216b75a58 deps/Makefile: Use osmocom fork of LLC protocol module
Change-Id: I8b9f107f0a99dcbd8148a3d431a101d194dfe788
2019-04-25 20:06:15 +00:00
Harald Welte f7a5c3ca02 LLC_Templates: Add SABM, UA, FRMR, DM templates
Related: OS#3953
Change-Id: Idb40dcd53310b76ea9df6c0090e31175a4382460
2019-04-25 20:06:15 +00:00
Philipp Maier d95f340a01 BTS_Tests: wait until BTS supplies stable signal
When running tests with real hardware it is important to wait for some
time (3 sec. should be enough) before exiting f_init(). This is to
ensure that the BTS supplies a stable carrier before the test proceeds.

Change-Id: Ib78633a33a15cd40514e15b6ebf9a0a8fb7b9c68
Related: OS#3863
2019-04-24 14:55:19 +02:00
Philipp Maier 12567e45c2 BTS_Tests: default value for mp_ipa_up_timeout too low
The default value for the module parameter mp_ipa_up_timeout is set to
10 sec. Given that the sysmobts needs around 10-11 sec. to perform one
restart cycle this is to low and causes tests to fail occasionally. Lets
increase the default value to 15 sec to get reliable.

Change-Id: I5bb290d00a02a25672305688352a03f3bf484ff3
Related: OS#3863
2019-04-24 12:26:43 +02:00
Vadim Yanitskiy 51cbc104c6 BTS_Tests.ttcn: add TC_pcu_ext_rach_content() for 11-bit RACH
According to 3GPP TS 04.60, section 11.2.5a, the extended (11-bit)
Access Burst on RACH/PRACH is used by the MS to indicate its EGPRS
capability. One of the alternative synch. sequences (see 3GPP TS
05.02, TS1 and TS2) shall be used.

Add a test case to verify extended (11-bit) RACH decoding.

Depends: (OsmocomBB) I36fd20cd5502ce33c52f644ee4c22abb83350df8
Change-Id: I8fe156aeac9de3dc1e71a4950821d4942ba9a253
Related: OS#1854
2019-04-23 14:49:36 +00:00
Vadim Yanitskiy 5c83679e39 library/L1CTL_Types.ttcn: add L1CTL_EXT_RACH_REQ message
According to 3GPP TS 04.60, section 11.2.5a, the extended (11-bit)
Access Burst on RACH/PRACH is used by the MS to indicate its EGPRS
capability. One of the alternative synch. sequences (see 3GPP TS
05.02, TS1 and TS2) shall be used.

Change-Id: If037cb2f2687697f168d10a033eeb20d20183328
Related: OS#1854
2019-04-23 14:49:36 +00:00
Vadim Yanitskiy 4e79ff5eac library/L1CTL_Types.ttcn: fix: add missing L1CTL_BURST_IND message
Change-Id: Ibf75792be70f694bca9222ec6568371475d193bb
2019-04-23 14:49:36 +00:00
Harald Welte f9abf8d26c MSC_Tests: Allow test cases to specify RAN index
This allows to start ConnHdlr on specific RAN connections, i.e.
on different emulated BSCs (and soon RNCs).

Change-Id: I3d7ec567a7b69d8c6f79d26971bf1c94e077d5f5
2019-04-21 17:44:59 +02:00
Harald Welte a89fecf08c f_perform_lu(): Use f_expect_clear(), reduce code duplication
Change-Id: I64b183ad6615f2b0b9565a711de87fe4249625a1
2019-04-21 17:44:59 +02:00
Harald Welte e035e3e182 Add f_expect_paging() rather than using tr_BSSMAP_Paging directly
this will ease the introduction of RANAP support

Change-Id: I213303337373c349676be4f8ac4175acdc701e47
2019-04-21 17:44:59 +02:00
Harald Welte 6811d10af7 Rename BSSMAP_Emulation -> RAN_Emulation
So far, BSSMAP_Emulation supported only a transport over BSSMAP.
However, we soon intend to merge support for RANAP in order to
simulate RANAP/Iu connections as well as BSSMAP.  Let's start
by renaming some of the existing types/functions/ports/modules
without introducing any functional changes just yet.

Related: OS#2857, OS#2856
Change-Id: Iecbcb0c6c136baad9460eca40606bb4010d8882d
2019-04-21 17:44:59 +02:00
Harald Welte 408a7ef9fc BSC_ConnectionHandler: Define SDP template for CN-side CRCX
Change-Id: I90546249c41de8f99ce4a558e76cb46597413518
2019-04-21 17:44:59 +02:00
Harald Welte ddf011ec4f sip: Add TC_mo_setup_disc_late_rtp for OS#3518
Related: OS#3518
Change-Id: I9d5752e01d6995eff67463c51deaacedc5dcabe7
2019-04-19 15:53:32 +00:00
Daniel Willmann abc73e1291 BSSMAP_Emulation: Check for ==/!= null instead of isvalue()
Related: OS#3932
Change-Id: I2434c776c6a4ee83e97bc04e7cbbaf1b546731c0
2019-04-15 17:28:06 +02:00
Alexander Couzens c7dddbd7d0 Ensure BcdMccMnc is encoded as 24.008 10.5.5.15
PCU is using BcdMccMnc as it's encoded as 24.008.
But SGSN code is using it as it would be byte by byte
sorted.

Fixes: OS#3878
Change-Id: Ie8f67f16f18e4c5090bc5a4c46a866a7e7e00206
2019-04-12 15:10:24 +00:00
Neels Hofmeyr 1623774b68 msc: expect only one Paging on failed MT SMS
An MSC might decide to repeatedly retry Paging if it failed the first time, but
osmo-msc currently has no such mechanism. Instead, it so far had a bug that
retriggered a failed Paging from a start in a situation where there are SMS
pending for only one subscriber, and sending the SMS fails. osmo-msc patch
I24bf9f1c1167efe1080ae4cf47ed2ef0bd981e49 changes this behavior to accept a
Paging failure and not launch the same SMS again numerous times.

Adjust the tests to this new behavior.

Depends: I24bf9f1c1167efe1080ae4cf47ed2ef0bd981e49 (osmo-msc)
Change-Id: I7dce12942a65eaaf97f78ca69401c7f93faacb9e
2019-04-12 05:45:01 +02:00
Neels Hofmeyr 8256ed2aa9 msc: clear the failed SMS when a test is done
If an MT SMS is triggered and not handled in the test, it is so far left behind
when the test ends. That causes Paging to retrigger for that SMS at any later
point during subsequent test runs, causing stray bogus test failures.

Actually remove the SMS from the SMS database and the queue with a new VTY
command: The vty command to clear failed SMS from the db is added in osmo-msc
I637cbd7adc075a192f49752b38779391472ff06d

Depends: I637cbd7adc075a192f49752b38779391472ff06d (osmo-msc)
Change-Id: I4ff05187131e93f5bc58dc7ea44546f770e5b4c1
2019-04-12 05:41:50 +02:00
Philipp Maier 628c005164 MSC_Tests: Add testcase to simulate VLR/HLR failure (SGsAP)
Currently we do not simulate a situation where the HLR is unreachable to
the MSC. Lets add a test wehere the HLR is disconnected and an LU via
SGsAP is tried. The SGs interface should then carry out a reset
procedure.

Change-Id: I830d0b936cbe9d73d1e0b1f4792c2be3d0b08cb9
Related: OS#3859
2019-04-09 17:36:57 +02:00
Philipp Maier c09a13116a MSC_Tests: allow disabeling GSUP
The GSUP link between testsuit and osmo-msc is currently on by default
and can not be disabled. However, there may be situations where a
missing GSUP connection must be simulated. Lets add add a parameter to
disable GSUP if necessary.

Change-Id: I7c86aa0a906a0d7e8be765f9109a65b4b4387bc6
Related: OS#3859
2019-04-09 16:05:26 +02:00
Philipp Maier d3e0bfa737 SGsAP_Templates: Remove invalid template.
The Template tr_SGsAP_RESET_IND is invalid since it requires vlr and mme
name at once, which is not a valid constellation in the real world. Lets
have two separate templates, one for MME and VLR, just like we have it
already with the ts_ versions of the templates.

Change-Id: Ifdf6030bb42ebd99c2030d600e87127e3619d7ad
Related: OS#3859
2019-04-09 15:37:44 +02:00
Philipp Maier d08e7e7fd3 MSC_Tests: fix TC_sgsap_expl_imsi_det_noneps
When a subscriber is detached from non eps services, it gets fully
detached from 2G, which means that the VLR is supposed to remove the
subscriber. Lets check if the subscriber is in deed no longer known by
the VLR.

Change-Id: I2ec3f548dfcf5a9b99f10214a8bfd0c6978e253b
Related: OS#3614
2019-04-02 16:03:42 +02:00
Philipp Maier fc19f17542 MSC_Tests: add testcase TC_sgsap_impl_imsi_det_eps
We have a testcase that sends an explicit (UE-Initiated) imsi detach
from EPS services. Lets also cover the case for an implicit
(Network-initated) detach.

Change-Id: I63ebc32ae457dd74214d4abee4f511cde28de4a7
Related: OS#3614
2019-04-02 16:03:42 +02:00
Philipp Maier 5d812707de MSC_Tests: add testcase TC_sgsap_impl_imsi_det_noneps
We have a testcase that sends an explicit (UE-Initiated) imsi detach
from non EPS services. Lets also cover the case for an implicit
(Network-initated) detach.

Change-Id: I76049e6717680c54c18f97b7cd51944901a81ae7
Related: OS#3614
2019-04-02 16:03:42 +02:00
Philipp Maier 948747b385 MSC_Tests: add function to check if a subscriber is in VLR
The control interface of osmo-msc is able to return a list with all
active subscribers from the VLR. Lets add a function, so that we can
check from TTCN3 if a specified subscriber is known by the VLR or not.

Change-Id: I7661ae55afe34795c3701d59795331b32d64c988
Related: OS#3614
2019-04-02 15:38:31 +02:00
Vadim Yanitskiy 06e53c5999 HLR_Tests.ttcn: suspend some compilation warnings
In the most use cases of f_SS_expect() we are not interested in
GSUP_PDU returned by this function. Calling it without storing
the returned value causes TTCN-3 compiler to complain:

  warning: The value returned by function
           `@HLR_Tests.f_SS_expect' is not used

Let's make use of previously unused variable 'res', and save
the returned GSUP_PDU to make the TTCN-3 compiler happy.

Change-Id: Ifda42aa18af8076013b436364513296b2b008731
2019-03-29 16:44:11 +00:00
Daniel Willmann 53cccab4e9 bsc-nat: Add sample bsc-nat config for test
Change-Id: I0ab3a4fb66201cd134238f5efcf6ff80033011e3
2019-03-29 11:12:14 +00:00
Daniel Willmann c07f6f5f24 bsc-nat: Use id when creating components
Change-Id: I2c130d74405cef2b9aa1f9c0a2122fd70aa9cc62
2019-03-29 11:12:14 +00:00
Daniel Willmann d764dd9939 bsc-nat: Add default module parameters
Change-Id: I800ebe0f33cf7c86eea65d2e186c6af12fee6db7
2019-03-29 11:12:14 +00:00
Daniel Willmann 909523e141 bsc-nat: Use BSCx as token for BSC no x
Change-Id: I27cf1a2f5c8a55eb9883ac9430e73c95dded9b7b
2019-03-29 11:12:14 +00:00
Daniel Willmann 991fd78860 bsc_nat: Wait for bsc-nat to connect to MSC before connecting the BSC
Change-Id: Ic02ce9bd46cab7e6d4833b1d838c334e377f7d50
2019-03-29 11:12:14 +00:00
Daniel Willmann aa17059b32 bsc-nat: Fix errors due to bit rot
Change-Id: I79f3b1b74c9f6f8769a5d71fde04847435f3f345
2019-03-29 11:12:14 +00:00
Daniel Willmann 0c6f34cf8f Rename IPA_Test->BSCNAT_Tests and get proper cfg files
Change-Id: I937d2aa1abfcb302dfb529ac8be75dcd269c46e2
2019-03-29 11:12:14 +00:00
Daniel Willmann 94e4e80ec0 mgw: Ensure TC_selftest passed if no error is encountered
Change-Id: Ie1601d57ac5bf9ddf99cbbd1cdb91160dc47c84d
2019-03-28 13:08:10 +01:00
Harald Welte 7fd25cfbfd pcu: Add TC_pcuif_suspend() to test PCU->BSSGP SUSPEND processing
The PCU is supposed to forward any RR SUSPEND received by the BTS
on dedicated channels and pass it to the SGSN via BSSGP.  This provides
knowledge to the SGSN that the MS is not reachable via PS/TBF anymore
until it completes its CC dedicated mode transaction and RESUMEs.

Change-Id: Iaf35e0c1087413db1dc7d169fa716df14c78f5db
2019-03-27 11:17:49 +00:00
Harald Welte 3d1fd5feef PCU: make f_bssgp_establish() run on BSSGP_Client_CT
This means it can be used in different/other scenarios, e.g.
with tests that use PCUIF directly.

Change-Id: I1aa5dc090aac78a85a85ac190343befb0199a093
2019-03-27 11:17:49 +00:00
Harald Welte 4bff40ad04 PCUIF: Add templates for PCU_IF_MSG_SUSP_REQ
Change-Id: Ib7661790b9531be829ee550ce889151ebe1885ac
2019-03-27 11:17:49 +00:00
Harald Welte 797ab3a91c pcu: Fix MCC/MNC handling: use 'F' between MCC and MNC in 2-digit case
Change-Id: Ifdb64c501095839e86894716769adb53e3c17382
2019-03-27 11:17:49 +00:00
Harald Welte 23989a64da Osmocom_Gb_Types: Add more templates for BSSGP SUSPEND/RESUME
Change-Id: Ife25401043d565e52a73206c562bbb68bcfdbafa
2019-03-27 11:17:49 +00:00
Harald Welte b16516c0af GSM_RR_Types: Add enc_RoutingAreaIdentification()
This allows us to encode a stand-alone RAID as needed in some places.

Change-Id: I28222304b2bac893b216c47e6dc002886fab6406
2019-03-27 11:17:49 +00:00
Harald Welte 001b0dad5f BSSGP_Emulation: Handle incoming BVCI=0 messages
Like BVCI=PTP, the BVCI=0 messages must be dispatched by their
TLLI, but using the BSSGP_SP_SIG port instead of BSSGP_SP.

Change-Id: Ic456d43ec07600162991698ec3d75d36785b2fb8
2019-03-27 11:17:49 +00:00
Harald Welte 0466d16d42 pcu: move f_pcuif_tx() to PCU_Tests_RAW as it runs on RAW_PCU_CT
Change-Id: Ic60a7fc657df17ff2d3a889501f0576b98f1f4ad
2019-03-27 11:17:49 +00:00