Commit Graph

83 Commits

Author SHA1 Message Date
Vadim Yanitskiy 13c26f9279 BTS_Tests: move ts_RRM_GprsSuspReq to L3_Templates.ttcn
Change-Id: Ib1aa0053cfca8ccd6ff613ab3b1c4f5afbd27534
2020-07-04 21:39:47 +07:00
Neels Hofmeyr 4f11841173 bsc: add MSC pooling tests
The MSC pooling feature is implemented in osmo-bsc
Ifbdea197b26e88751a391c8a80c41f04e7d5e047.

A VTY command ('mscpool roundrobin next') that allows deterministic testing is
added in I2155d906505a26744966f442ffb1e87a6a9b494c.

osmo-bsc.cfg changes needed for these tests to succeed are in docker-playground
I1986e4ef43beee161c82193694421b56136c1afe

The new tests will fail until the above have been merged.

Change-Id: I21cbab193cd0de2e5692665442eae113d5f61904
2020-06-18 11:54:47 +00:00
Neels Hofmeyr 1661781611 fix f_enc_IMEI_L3() oddevenIndicator
f_gen_imei() calls f_enc_IMEI_L3() with a 14 digits argument, but the IMEI_L3
template used is hardcoded to 15 digits. So the oddevenIndicator must always
indicate odd, not depend on the digits argument.

f_gen_imei() should probably also compose a Luhn checksum, leaving that to
another patch.

Found by using the new osmo_mobile_identity API in osmo-msc, which is stricter
about odd/even and filler digits than our previous implementations.
See osmo-msc Idfc8e576e10756aeaacf5569f6178068313eb7ea .

Change-Id: Iaa9ba1214c4c15fd9620e68fe2e842fdf52912c0
2020-06-14 10:52:48 +00:00
Pau Espin e8d7d16f13 Split templates in RLCMAC_{CSN1_}Types into their own _Templates file
RLCMAC blocks have a lot of fields and we will potentially require lots
of different templates, as well as functions to handle related structs.

Change-Id: I9c6597178168aa3848b21930f33be698dd2ce545
2020-04-29 19:07:38 +02:00
Pau Espin 8f24571e56 pcu: Introduce test TC_mo_ping_pong_with_ul_racap
Test sending MS RA capabilities through Packet Resource Request to
update GPRS multislot class.
EGPRS multislot will come in a later commit.

Change-Id: I5026d8b78a3fb82093956b65989d18fa6f6d5424
2020-04-28 16:01:18 +00:00
Pau Espin 55cb2ce675 L3_Templates.ttcn: Fix trailing whitespace
Change-Id: I46ff86b981ef649c89073f155566af35848aef8d
2020-04-22 17:09:25 +02:00
Vadim Yanitskiy fb3edf951d library/L3_Templates: remove tr_PAGING_REQ1_MI1_TMSI, use existing MI templates
Change-Id: Id35477ffc4a914e71100f129bbc4833b48ed5da4
2020-03-30 14:47:08 +07:00
Vadim Yanitskiy cc4623dff2 library/RSL_Types: use MobileIdentityLV for MS Identity IE
Change-Id: I5436dcbbc961d5b572e10e4f1a3f806d252d7818
2020-03-28 06:21:02 +07:00
Vadim Yanitskiy c94c572698 library/L3_Templates: add more templates for Mobile Identity IE
Change-Id: Ife954becab8c51605da05618a721541e7a4de319
2020-03-28 05:17:23 +07:00
Vadim Yanitskiy 98bb2d5eea library/GSM_RR_Types: do not duplicate Mobile Identity records
All the records related to Mobile Identity IE (see 3GPP TS 24.008,
section 10.5.1.4) are defined in [1], so there is no real need to
dumplicate them. Moreover, most of the related templates in
library/L3_Templates.ttcn are based on these records.

[1] titan.ProtocolModules.MobileL3_v13.4.0/src/MobileL3_CommonIE_Types.ttcn

Change-Id: I27c2743c59db770d6f7e9447dc8c1f539b228ced
2020-03-28 03:29:22 +07:00
Vadim Yanitskiy e9e9301e87 library/L3_Templates.ttcn: fix length matching in tr_RP_ERROR_MT
Change-Id: Id5a4210a9f256f8bd7b0048fd65610de8c378bb9
2020-01-15 16:08:31 +00:00
Vadim Yanitskiy 322c79367b PCU: fix: actually match IMSI in Packet Paging Request
Change-Id: I0afdd53fd5d2a89e139f65a7aec412a2e12511cc
2020-01-03 22:20:50 +00:00
Alexander Couzens bfcb320be5 L3 Templates: PDU_L3_MS_SGSN: export ptmsi in template signature
Iu packets needs to contain an ptmsi as tlv in difference to Gb.

Change-Id: I7ba51a28524261dd1c7f4f2586ee6ebc970ea944
2019-09-11 06:19:10 +00:00
Harald Welte 187f7a99c1 bsc: Test that ETWS Primary Notification are sent via dedicated channels
When the BSC receives an ETWS PN via CBSP, it must send it through all
established dedicated channels of the matching BTSs.

Related: OS#4046

Change-Id: Ib057bd251604e9bae968e71de245b3bbf737a356
2019-09-07 08:38:00 +02:00
Oliver Smith af2f1f8d89 library: allow "?" in tr_ML3_MT_MM_ID_Req again
Fix MSC test TC_lu_by_imei, which uses tr_ML3_MT_MM_ID_Req with the
default "?" (AnyElement) parameter. It was failing with the following
runtime error:

Dynamic test case error: Performing a valueof or send operation on a non-specific template of enumerated type @L3_Templates.CmIdentityType.

Fixes: 3289845913 ("L3_Templates: add enum CmIdentityType")
Related: https://www.eclipse.org/forums/index.php/t/1099816/
Change-Id: Ie7fbe52ac3c0c8f233680dcc311febec77d2ed0b
2019-07-22 11:35:23 +02:00
Oliver Smith 3289845913 L3_Templates: add enum CmIdentityType
Change-Id: Ibe50669663e641cdfd6a88f22c5404e2d90323b7
2019-07-10 02:01:46 +00:00
Oliver Smith b4bf2b2438 Cosmetic: L3_Templates: fix comment: fro -> for
Change-Id: I239bbf21202300ac9883b5a0b5608d10db0fd721
2019-07-10 02:01:46 +00:00
Oliver Smith 745ed95c4c L3_Templates: fix IMEI length: 14 (not 15)
The right length is 14. The 15th additional checksum digit is not
intended for digital transmission.

A good overview of the IMEI/IMEISV structure is here:
https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity#Structure_of_the_IMEI_and_IMEISV_(IMEI_software_version)

Related: Iaf2569c099874b55acbd748b776394726cc5ce54 (osmo-msc)
Change-Id: I7121f29a90f19d92c7bf26f26e76f1978c648459
2019-07-09 11:25:40 +00:00
Harald Welte 34b5a95d09 cosmetic: Update copyright statement, license notice and SPDX
Some of our files didn't have a copyright notice at all, let's add
it.  Also, update the notices in other files and ensure a SPDX
identifier is present in all but the most trivial files.

Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd
2019-05-27 10:00:06 +00:00
Neels Hofmeyr 0ac6315212 msc: add inter-BSC and inter-MSC Handover tests
Change-Id: I7d76c982ad4e198534fa488609c41e8892b268ab
2019-05-09 00:55:11 +02:00
Neels Hofmeyr 2ca1ab492a msc: mo and mt voice call tests: add lots of missing parts
Both f_mo_call_establish() and f_mt_call_establish() were testing barely half a
voice call setup.  For example, f_mo_call_establish() used to be satisfied with
just two CRCX, but no actual RTP connections being made.

Add numerous MNCC and MGCP messages more closely resembling an actual call.

The main reason is to achieve a state that passes both current osmo-msc master
as well as the upcoming inter-MSC Handover refactoring.

Add log markers to f_*_call_*(): often when a test halts, it is not at all
clear why. With these log markers it is saner to figure out what has happened
and what hasn't.

Change-Id: I162985045bb5e129977a3a797b656e30220990df
2019-05-07 01:20:09 +02:00
Harald Welte 9978710c4b bsc: Test CSFB "Fast Return" in new TC_chan_rel_hard_clear_csfb
When a MSC releases a connection using the BSSMAP CLEAR CMD, it can
specify that this call was part of CSFB.

The BSC is then supposed to add a special IE to the RR RELEASE
message which will help the phone to switch back to LTE as soon
as possible.

This commit adds a new test case testing for exactly that behavior.

The test does *not* verify if the EARFCN information contained is
actually correct, only that the IE is present in the RR RELEASE.

Change-Id: I7501fb25578412c882ff92da5d388f3079bbce7f
Requires: osmo-bsc Ibfbb87e2e16b05032ad1cb91c11fad1b2f76d755
Related: OS#3777
2019-02-05 17:45:29 +01:00
Harald Welte 924b6ea17b bsc: replace octet string with decmatch when matching RR RELEASE
The 'decmatch' keyword allows us to match the decoded version of some
octetstring, which is very useful in the situations where we have
the L3 message only as octetstring but want to check if it matches
some L3 template.

Change-Id: I0a91e067f7e8062bf991fef8b0d4d8da740bfafc
2019-02-05 17:45:29 +01:00
Philipp Maier 9b690e42e1 MSC_ConnectionHandler: Optionally check MM Info
The MM Info message is an optional message that is set to the MS usually
after the location update. It contains the full network name and time
information. At the moment the presence of this message is not checked
or expected since sending of MM-Info is explicitly disabled in the
osmo-msc configu.

This patch adds an optional check of MM Info that is disabled by
default.

Change-Id: I431f50c2ff3536f87f0c7c3caf23b7a38d501904
Related: OS#3615
2018-12-21 17:52:35 +01:00
Stefan Sperling 4c32b952dd start implementing the TC_paging() PCU test
Implement a basic paging test for the PCU, which is passing for paging
via TMSI (but only if osmo-pcu is started after the test is started).

Previously, this test code amounted to a debugging loop which
never terminated.

Change-Id: Id0384e0742ab91983615e4f1c883bb044c1c8b18
Related: OS#2404
2018-11-19 11:10:22 +00:00
Stefan Sperling 26d57be102 support odd-length calling MSISDN in MSC tests
MSC tests were unable to match odd-length digit strings in
a CallingPartyBCD_Number template created by tr_Calling().
This happens because the raw encoder for CallingPartyBCD_Number
pads odd-length digits with 1-bits ('F'H). Do the same when
constructing such a template in our own code to ensure that
we'll match the actual data received.

Change-Id: I34439c8750f588802a5403375e2a3d6e74dae70c
Related: OS#2930
2018-11-18 20:27:53 +00:00
Harald Welte 0cedf2c5db L3_Templates; add tr_ML3_MT_MM_AUTH_REQ_3G()
this allows us to match on specifically 3G MM AUTH REQ, whereas
so far we only had a generic template that matched the 2G and 3G
auth req.

Change-Id: I392d61d1348bee9c88abe4bb938e99b2c3702a94
2018-10-29 00:19:00 +01:00
Neels Hofmeyr bd0ef93d4f bsc: inter-BSC HO: add TC_ho_out_of_this_bsc, TC_ho_into_this_bsc
Add f_gen_handover_req() like f_gen_ass_req(), to match AoIP or SCCPlite
requirements.

For incoming HO, MSC_ConnHdlr needs to know the SCCP addresses to expect the
incoming SCCP Connection from MSC to BSC. Add 'handover' section to
TestHdlrParams, and pass in the addresses from test_CT via that.

In osmo-bsc.cfg, add a remote neighbor config, so that the VTY command
'handover any to arfcn 123 bsic any' can trigger an outgoing inter-BSC HO.

Add various BSSMAP handover templates to BSSMAP_Templates.ttcn.
Add RR Ho Command template to L3_Templates.ttcn.

Move ts_BSSAP_Conn_Req() from msc/BSC_ConnectionHandler.ttcn to
library/BSSMAP_Emulation.ttcn, so we can also model an SCCP Connection Request
in BSC_Tests.ttcn (this time from MSC to BSC).

Add the two new tests to bsc/expected-results.xml.

Related: OS#2283
Change-Id: Id22852d4be7f127d827e7a8beeec55db27c07f03
2018-09-26 07:27:24 +00:00
Neels Hofmeyr 92b12b748c bsc: test Classmark Enquiry
Enhance TC_classmark to also include the BSSMAP Classmark Request -> RR
Classmark Enquiry part. So far it was only testing the return path of RR
Classmark Change -> BSSMAP Classmark Update.

This test will thus fail with current osmo-bsc master, and will succeed as soon
as osmo-bsc If5db638fd6e8d9c2ef9e139e99f0fabe1ef16ddf is merged.

Add:

* ts_BSSMAP_ClassmarkRequest in BSSMAP_Templates.ttcn
* tr_RRM_CM_ENQUIRY in L3_Templates.ttcn

Change-Id: Idaab4d568cf986b4897ba008f6262c839d1592fb
2018-09-18 14:33:42 +02:00
Alexander Couzens 15faf92611 L3_Template: add template ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC
ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC send a Authentication & Ciphering failure
to resync the USIM with the HLR.

Change-Id: Ia58dc1483757887ca14cfae19e30f9c91fef5874
2018-09-04 17:15:03 +00:00
Pau Espin 67e47dd328 lib: L3_Templates: Fix DEACT PDP REQ msg type and make tearDownInd optional
Specs state in 3GPP TS 24.008 that TearDownInd IE is optional, so allow
possibility to omit it.

Also fix protocolConfigOpts being passed as parameter but not being used
in template tr_SM_DEACT_PDP_REQ_MT.

Change-Id: I006d64f51c17a22a42a225ddfa4119933e48a022
2018-07-13 19:16:22 +02:00
Vadim Yanitskiy 52f8b6ee1d library/L3_Templates.ttcn: fix f_facility_or_wc(omit)
According to GSM TS 04.80, table 2.5, the Facility IE is optional
for RELEASE COMPLETE message. So, if this IE is omitted, then the
whole TVL shall be omitted. It's time to fix this.

Change-Id: I216195ef71c95997708dad8c31b172b6f6cdc461
2018-06-19 22:20:35 +07:00
Alexander Couzens d8604ab9ae L3_Templates: tr_GMM_DET_REQ_MT: use * instead of omit for `cause`
The omit force this field to be not present, while a * allows to be present or not.
As user of this tr I would expect to ignore this field rather than an explicit omit.

Change-Id: Iae91f752789273934a6382bdd474594c3c50bbe9
2018-06-05 13:04:41 +00:00
Vadim Yanitskiy 0319813c41 L3_Templates: add GSM 04.80 RELEASE_COMPLETE message
Change-Id: Iaf295aeb4ef475d41d0eeddcca5e864016fd91cc
2018-06-02 04:55:18 +07:00
Harald Welte 53603961fe L3_Templates: Add templates related to Supplementaryt Services
Change-Id: I919fa542a2e037b3fcf8cd5b0b9d7599b8c09070
2018-05-31 13:30:18 +00:00
Alexander Couzens d62fba5401 L3_Templates: add template tr_GMM_DET_REQ_MT/ts_GMM_DET_ACCEPT_MT
Change-Id: Ifea650994408c4dd83f46f6256565d38968bf843
2018-05-26 21:03:54 +00:00
Alexander Couzens b6ab45606a L3_Templates: add values for c_GMM_DTT_MT_*
GMM detach type values

Change-Id: I4903fa4c915add3062ab6b82a1d39d60426b5681
2018-05-26 21:03:54 +00:00
Harald Welte e613f96593 bts: ciphering tests
Change-Id: If450e36cfd8cde713f304e57ec09bc1239bdf7ea
2018-05-10 18:36:59 +02:00
Harald Welte f45efeb15e msc: Initial SMS testing (MO + MT SMS, successful case, no SMPP)
Change-Id: I707330454ffab87daebf22ba83e6ba2873996424
2018-04-09 22:53:49 +02:00
Harald Welte 51affb6e03 L3_Templates: Introudce constants for tiFlag
... this makes the code more readable/understandable.

Change-Id: Ic06eb2016eb9979b8556366e4a909f3c0336aa92
2018-04-09 18:19:36 +00:00
Neels Hofmeyr 6338247395 msc: cosmetic: ts_CM1 template: parameterize esind (Early classmark Sending)
Change-Id: If841fc2c9996bef5b962519a325e18f1c13d2b0f
2018-03-02 00:35:26 +01:00
Harald Welte 68e495b48a bts: Add paging related tests
We're testing at 80% and 200% of PCH capacity, both for either IMSI-only
or TMSI-only paging requests.  The way how we test ensures:

* the expected number of paged mobile identities end up on the Um interface
* we implicitly check the queuing limit of 200 paging records by
  overflowing it in the 20-seconds-of-200%-load cases
* we implicitly check the batching of mobile identities into different
  paging types
* we test the PCH load reporting over RSL

As a side note, in case you were ever wondering what's the expected
paging throughput / capacity, there are now helper functions to compute
it.  For our combined CCCH/SDCCH4, it's about 16 IMSIs per second or
about 32 TMSIs per second.

Change-Id: I0b80b72bdab3d80d915296d70e1174623fbd8610
2018-02-25 12:58:36 +01:00
Harald Welte 7484fc41b4 bts: Type Definition + Template for SI3; Send SI3 at start of test
The BTS needs some of the SI3 parameters like BS_AG_BLKS_RES for
internal computations, so make sure we send it after the connection
has been established.

Change-Id: I5dc3724f79e669f52593cd776806d84b4dd4bf5c
2018-02-25 12:57:21 +01:00
Harald Welte 57b9b7f1dc Add TC_attach_pdp_act_user_deact_mt for GGSN-originated PDP DEACT
Change-Id: I7eb653694f487f8bbf122146300c93be625b0f87
Related: OS#2961
2018-02-18 22:28:13 +01:00
Harald Welte 6f20316985 sgsn: Add TC_attach_pdp_act_user_deact_mo
Change-Id: I43cb7728658cae6590eb1bd31c7c285b942a265e
2018-02-18 22:04:55 +01:00
Harald Welte 4aacdd8784 L3_Templates: Fix activatePDPContextReject msg_Type
Change-Id: Ibc40502a4e9862ac8d95d77b483dac39ac783e5b
2018-02-18 21:24:05 +01:00
Harald Welte 835b15f799 sgsn: Add TC_pdp_act_unattached
Change-Id: I162ab7cb74102e6f15c4d685c49575bcd0b4f41c
2018-02-18 14:39:11 +01:00
Harald Welte eded9ad578 sgsn: First PDP CTX ACT test: TC_attach_pdp_act
Change-Id: Ia1bfaca99a2a70bb097e2ee44f54e4a31b849a1b
2018-02-18 10:57:02 +01:00
Harald Welte 6abb9fe76f sgsn: Add TC_detach_* for various GPRS DETACH use cases
Change-Id: I2243b850400482b911d687585929a2eef3490954
2018-02-18 10:26:34 +01:00
Harald Welte 91636de6d5 sgsn: Add new TC_attach_rau: Attach followed by RA Update
Change-Id: I8f71bf83f4e6504f1cfbdc55a57e3ed62b3e5f25
2018-02-18 10:26:25 +01:00