Commit Graph

305 Commits

Author SHA1 Message Date
Neels Hofmeyr 13b83db5db update various expected-results.xml
Change-Id: I850b79526145307246bca40c70ed8e4d586d8c68
2022-08-12 02:31:23 +00:00
Neels Hofmeyr e81ef42d05 msc: f_tc_mt_t310: detect MNCC failure explicitly
Helped me find a failure cause: instead of T_guard timeout, immediately
show an unexpected MNCC event.

Related: SYS#5066
Change-Id: I49a15142a4b6c51ca767a884c0574f96e01d7cb1
2022-08-12 02:30:54 +00:00
Neels Hofmeyr d8a4aee1c6 msc: f_tc_mt_t310: allow CRCX in either order
continued from Id0c98bc267daff352fc7db7712f967111970fd4d

Upcoming changes to osmo-msc move the CN side CRCX to an earlier point
in time, reversing that order. Introduce an 'interleave' to not care
about the ordering of MGCP and BSSAP messages.

Related: SYS#5066
Related: Ie433db1ba0c46d4b97538a969233c155cefac21c (osmo-msc)
Change-Id: I0ec348df08aa49ed58b3465de51b259fb74c0aea
2022-08-12 02:30:54 +00:00
Neels Hofmeyr 9c83eeb438 msc: add MSC_Tests_Iu.control to MSC_Tests.cfg
Also run the Iu tests for osmo-msc.

Same as we have in docker-playground.git/ttcn3-msc-test/MSC_Tests.cfg

Related: SYS#5066
Change-Id: Ied0449fd0328ee57b66e3cff9d34b0e1d27b9fb4
2022-08-07 15:48:17 +02:00
Neels Hofmeyr 02d513efd8 msc: call: allow using MGW conn IPs in either order
So far, the first CRCX dispatched by osmo-msc is used for the RAN side,
and the second one for the CN side. Upcoming changes to osmo-msc move
the CN side CRCX to an earlier point in time, reversing that order.

Allow both RTP addresses from the two MGCP CRCX OK to appear in the
Assignment Request message to RAN, so that the test succeeds for both
the current osmo-msc and the upcoming patch (see below).

Related: SYS#5066
Related: Ie433db1ba0c46d4b97538a969233c155cefac21c (osmo-msc)
Change-Id: Id0c98bc267daff352fc7db7712f967111970fd4d
2022-08-07 15:48:17 +02:00
Vadim Yanitskiy c5fcb89b8d MSC_Tests: SpeechCodecList IE shall be present in BSSMAP HandoverRequest
According to [1], 3GPP TS 48.008 does indicate that on AoIP the MSC
Preferred Codec List IE shall be present in BSSMAP HandoverRequest.
Let's verify that the IUT actually includes this IE.

Change-Id: I2e0ecbcced9f94d2b44d981db353007cad3ae959
Related: osmo-bsc.git I117cc29d6d11db77d160de654f43f5993db6ee21
Related: OS#5529
2022-08-05 17:38:43 +00:00
Eric Wild 85cc161c0d msc tests: fix test so they don't depend on previous test runs
The test currently implicitly check the vlr state left by preceding tests.

Change-Id: Iebaecd28a426b15baf4729f40b46dd33da79cbae
2022-05-24 08:32:45 +00:00
Neels Hofmeyr 07ea7f26be msc: add test for OS#5532: crash from CM Serv Rej
Reproduce the assertion trigger crashing osmo-msc reported in OS#5532,
i.e. a CM Service Request that contains a mismatching Mobile Identity.

Causes osmo-msc to crash with an assertion, so run it last.
Fix of the crash: I6c735b79b67108bcaadada3f01c7046e262f939b

Related: OS#5532
Depends: I6c735b79b67108bcaadada3f01c7046e262f939b (osmo-msc)
Change-Id: I3f84d00f456aaee578787059d7010c25efcdcf56
2022-05-05 01:45:57 +02:00
Eric Wild 49888a65dc ran emulation: allow multiple reset attempts
bsc-nat introduces a delay that will lead to failed tests, since the
reset attempt happens too early and times out, and the tests do not
retry.

Change-Id: I9f6db2a24e984eef31e76f9d42a80eb6a1bb6928
2022-03-31 17:49:10 +00:00
Daniel Willmann 0886215539 msc: Avoid race condition when setting osmux options via VTY
If the RAN_Emulation is started before the VTY reconfiguration we could
get a BSSMAP Reset/ResetAck with Osmux support advertised even though
the test expects it to be disabled (or vice versa).

Do the VTY configuration before starting the RAN_Emulation.

Fixes sporadic/load-related TTCN3 failures with message
"BSSMAP: Timeout waiting for RESET-ACK after sending RESET"
(e.g. TC_iu_and_mt_call_osmux, TC_iu_and_mo_sms in run +1567)

Change-Id: Ife23f70c6523034f3c3c53b6c1c81428566fd43e
2022-02-22 18:00:24 +00:00
Vadim Yanitskiy 04fb687350 msc/osmo-{msc,stp}.cfg: enable extended timestamp in logging
Change-Id: Ia6414d5622fb287fd147c09e791e1b8023d1596e
2021-12-14 12:59:04 +00:00
Vadim Yanitskiy 172bc6ebd2 msc/BSC_ConnectionHandler: fix early return in f_mm_ciph_geran()
In [1] I forgot to invert an if statement.  This regression caused
most of GERAN specific test cases to fail due to "Tguard timeout".

Change-Id: I8cbaff00abfd9eb252dc3011df848e2e24fe5a1e
Fixes: [1] Ib7ebe8fd675295beb02cadebb19d8465dffeb732
Related: OS#5333
2021-12-06 17:55:26 +03:00
Vadim Yanitskiy 0649d1c0db msc/BSC_ConnectionHandler: refactor and split f_mm_common()
Reduce nesting and improve readability by splitting GERAN/UTRAN
specific CMC/SMC message handling into separate functions.

Change-Id: Ib7ebe8fd675295beb02cadebb19d8465dffeb732
Related: OS#5333
2021-12-04 11:01:57 +00:00
Vadim Yanitskiy fff454062a msc/osmo-msc.cfg: remove deprecated 'periodic location update'
T3212 is set to 60 min. by default in osmo-msc.  There is no need
to set the value explicitly, so let's use the default.

Change-Id: I4a053af23ae9371c945c7634053827bb3813a67a
2021-11-28 03:48:02 +03:00
Vadim Yanitskiy e301838023 msc/osmo-{msc,stp}.cfg: tune logging configuration
Change-Id: Ic74014a3509f913c5668639e02b9306d73bb219d
2021-11-28 03:33:14 +03:00
Alexander Couzens 59087c5037 msc: disable encryption for iu/utran tests
Add seperate UEA1/2 tests later.

Change-Id: Id98038e1d92942b55480a60821088d4a445b7b28
2021-11-27 00:33:52 +01:00
Oliver Smith f8fe1329e2 regen_makefile.sh: set executable name explicitly
Set the executable name in each regen_makefile.sh explicitly with -e,
instead of having it set indirectly from the first .ttcn file. Make it
consistent by placing the name on top of each of these files.

Fix for warning:
ttcn3_makefilegen: warning: File `BSC_Tests.ttcn' was given more than once for the Makefile.

Related: OS#5252
Change-Id: I5ed03f8f3ed905483620dc7bae33b617bbb8507f
2021-10-13 11:12:22 +02:00
Oliver Smith 2e0e624060 regen_makefile.sh: files/flags in separate lines
Make all regen_makefile.sh more readable and diff friendly by moving
each entry in FILES and CPPFLAGS_TTCN3 into separate lines. Order
entries alphabetically.

Related: OS#5252
Change-Id: I6b6866eb9f6ec6232e4ae434517457a4c8c1c050
2021-10-12 16:35:01 +02:00
Neels Hofmeyr 48e4d7d71a msc: add MSC_Tests.TC_call_re_establishment_ciph
Invoke TC_call_re_establishment with ciphering required.

Related: SYS#5130
Change-Id: I8bbe53fc9fced3e455aa30c571ef7684890adb99
2021-08-06 14:03:28 +00:00
Neels Hofmeyr a9b2dcf5ef msc: add MSC_Tests.TC_call_re_establishment_auth
Invoke TC_call_re_establishment with authentication required.

Related: SYS#5130
Change-Id: I8110a6b432de734d53b111c7b69aabca12129691
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 4f099b4e94 msc: add MSC_Tests.TC_call_re_establishment
The osmo-msc patch that makes this test pass is
I6fa37d6ca9fcb1637742b40e37b68d67664c9b60

Related: SYS#5130
Change-Id: Ifdff5573eeb3b3d41e8599b9b0228411d2576864
2021-08-06 14:03:28 +00:00
Neels Hofmeyr e1a1b63549 msc: split f_start_handler_with_pars()
To allow running connect() on the COORD ports of test components before
starting the test component but after creating it, split
f_start_handler_with_pars() into f_start_handler_create() and _run().

Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864

Related: SYS#5130
Change-Id: Ic7e9dbb8c9db5948fe35fc3051bb988d65622782
2021-08-06 14:03:28 +00:00
Neels Hofmeyr f797d298a5 msc: add a COORD port for inter-component coordination
Also provide a blank receive template for CallParameters which is
needed to receive a CallParameters record via the COORD port.

Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864

Change-Id: Iba3a5304fa40159bc2c31cdc3a71ee56ed08bd12
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 8853afbcf4 msc: add as_mgcp_ack_all_dlcx
Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864

Related: SYS#5130
Change-Id: Ic63fa41fa2e5d392d39f6b5f9edd3952aa6a9ee9
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 49bbb511e7 msc: allow another reject cause in TC_cm_reest_req_reject
osmo-msc will soon have CM Re-Establishing support, and it will start
returning a different reject code instead of
GSM48_REJECT_SRV_OPT_NOT_SUPPORTED. In TC_cm_reest_req_reject, there is
no previous ongoing connection let alone a voice call, so osmo-msc will
return GSM48_REJECT_CALL_CAN_NOT_BE_IDENTIFIED.

Related: SYS#5130
Change-Id: I3eebab2b26016fb0ef7bf958208eaba6ae4c7836
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 60122f8076 msc: eliminate bssap_idx
There is a pars.ran_idx, no need for an explicit bssap_idx argument.

There is only one occurence passing a nonzero bssap_idx, use
pars.ran_idx instead.

Preparation for patch "msc: split f_start_handler_with_pars()"
Ic7e9dbb8c9db5948fe35fc3051bb988d65622782

Related: SYS#5130
Change-Id: Ib5c5585f098ff269920cf9d5781c4366234854c5
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 8913b9eaeb msc: fix conn id in 'MGCP OK' msg (as_mgcp_ack_all_mdcx)
The MDCX OK message should contain the same connection identifier as the
MDCX contained. So far we were always sending the second conn id,
regardless of which conn id was sent in the MDCX message.

Related: SYS#5130
Change-Id: If6f7f135d95c04ee0240f3fa9ba0b18ffc6fa24a
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 188fdff278 msc: adjust routing-key to docker-playground's osmo-msc.cfg
Change-Id: I1fed051e933e7d9ee6da21b65b730b1b1846705a
2021-07-19 13:53:22 +02:00
Neels Hofmeyr 9eb0d87a33 msc: fix osmo-stp.cfg for Iu tests
Change-Id: I102eb75f4b7ce46180fd45dd6548751e28a7f829
2021-07-19 13:53:22 +02:00
Pau Espin 7593a8a5f8 msc: Fix CommonId expectancies on subscr from A iface
When back on the A interface, the subscriber should no longer contain a
Last Eutran PLMN Id related entry in the VLR, since the SGs association
is no longer alive.

Related: SYS#5337
Change-Id: I8c72eaa4d41b8523f483ac3a343b782d1ef7c937
2021-07-06 07:16:23 +00:00
Neels Hofmeyr cb8d9894af update expected-results.xml files
Change-Id: Idcf764cd2d251210bb123d2a5ea782cda0d670b7
2021-07-05 13:11:14 +02:00
Pau Espin cefe9da445 cosmetic: msc: Fix typo in comment
Change-Id: Ia7b8c089866744621d22f9182d4293685f8e2563
2021-07-04 18:00:24 +00:00
Neels Hofmeyr 36ebc33153 msc: inter-MSC HO test: use CGI cell ID, not LAI
Fixes inter-MSC handover tests: in the inter-MSC 'Handover Required', do
not send a LAI cell identifier, but a CGI one.

This is analogous to the fix applied to inter-BSC HO in
I48276acf923626db171683dfa03ef43614a71380.

Rationale:

As explained in OS#5188, 3GPP TS 48.008 allows a LAI identification only
in the Cell Identifier List IE, but not in the single Cell Identifier
IE.

In the inter-MSC HO test's Handover Required message, we so far send a
LAI identifier in a List IE to osmo-msc. And so far, osmo-msc simply
echos that in the Handover Request message's single Cell Id IE.

The LAI is, as actually defined in the spec, omitted from the single IE
in deps/titan.ProtocolModules.BSSMAP/src/BSSAP_Types.ttcn, and when
osmo-msc sends the non-standard LAI Id, ttcn3 fails to parse the BSSMAP
Handover Request message: the Cell Identifier IE gets wrong values, and
all remaining IEs are parsed as 'omit' even though they are present on
the wire. So as long as osmo-msc sends back a LAI Id, we cannot sanely
verify the Handover Request received from the MSC.

The CGI identifier type is supported in both IEs. So when the test sends
a CGI identifier in the Handover Required, osmo-msc will also reflect a
CGI identifier in the Handover Request, and ttcn3 parsing works.

Related: OS#5188 SYS#5324
Change-Id: I525b5deaa9634fcdb63fbd2c97c767aff045767c
2021-07-02 17:10:26 +02:00
Neels Hofmeyr ec2e1f701d msc: rather not use decmatch in f_tc_ho_inter_msc_out()
TC_ho_inter_msc_out fails on jenkins in a way that i cannot reproduce. A
possible source is the decmatch for the Handover Request message. The
jenkins logs show:

MSC_Tests.ttcn:6005 Warning: Decoded content matching failed, because the buffer was not empty after decoding. Remaining octets: 22.

Change-Id: I20b5594c7e083af791525231f24d3ed089c18910
2021-07-02 02:12:04 +02:00
Neels Hofmeyr 906af1089c msc: fix inter-msc ho tests: do not attempt to send "*"
Recently, encryption testing was added to the inter-MSC HO test. Instead
of sending the chosenEncryptionAlgorithm from the receive-template side
forward the actual received one (rx "*" usually means tx is "omit").

Change-Id: Icae084cfd63d666f3b0778fade7ba558bd161a0f
2021-07-01 12:11:59 +02:00
Neels Hofmeyr 666d39abb9 msc: add inter-MSC HO tests with A5 encryption
Related: SYS#5324
Change-Id: Ia1df783be33bf752d291acb857d3c48882c65975
2021-06-29 16:17:54 +02:00
Neels Hofmeyr 0d841d98b6 msc: add inter-BSC HO tests with A5 encryption
Related: SYS#5324
Change-Id: I57e43c60d4389bd301d0195179321a34401bd1dc
2021-06-29 16:17:54 +02:00
Neels Hofmeyr b00c5b095d msc: add vec_keep to lock the AuthVector
Next to AuthVector vec, add boolean vec_keep. When set to true,
as_GSUP_SAI() skips the vector regeneration.

An upcoming patch adds encryption to inter-BSC handover, which will use
vec_keep := true. (See I57e43c60d4389bd301d0195179321a34401bd1dc )

Rationale:

Usually, a random auth vector is generated during as_GSUP_SAI(). For
inter-BSC handover, there are two separate virt-BSC components running.
But to be able to verify that the correct key is passed on from the old
to the new BSS, both titan components need to have the same AuthVector
data. The easiest solution is to generate the AuthVector before
launching the components, and then prevent that it is changed by
as_GSUP_SAI().

Related: SYS#5324
Related: I57e43c60d4389bd301d0195179321a34401bd1dc
Change-Id: I4bca739c2aad8342915e00a218f90fc19be7eafe
2021-06-29 16:17:54 +02:00
Neels Hofmeyr f6eff81417 msc: generate Milenage ck in f_get_expected_encryption()
Instead of overwriting the ck of the original auth vector, generate the
Milenage-on-GERAN Ck key only for the expected ciphering IEs, centrally
in f_get_expected_encryption().

Related: SYS#5324
Change-Id: Iec618ba7fddb2290fc0137d99a9b8d5e2b428b98
2021-06-29 16:17:54 +02:00
Neels Hofmeyr f7831cbcd9 msc: cipher mode: move cipher expect to new function
Move the ciphering calculations from f_mm_common() to new function
f_get_expected_encryption(), so that it can be re-used for ciphering in
inter-BSC handover (upcoming patch).

Add tr_BSSMAP_CipherModeCmd2() to conveniently use the values returned
by f_get_expected_encryption().

To verify the Ciphering Mode Command in f_mm_common(), use the new
tr_BSSMAP_CipherModeCmd2(), and rely on template matching instead of
checking each IE individually.

Related: SYS#5324
Change-Id: I1f775889fb801d441ea6c8b0f0c34718b814c09e
2021-06-29 16:17:54 +02:00
Neels Hofmeyr 0d6fd3eff2 msc: f_auth3g_kc(): take vec as argument, drop "runs on"
It is more elegant to have one arg and not require a "runs on".

Related: SYS#5324
Change-Id: Iec21710edaa6ad3d20e23c7ee055909c642e8220
2021-06-23 23:53:06 +02:00
Neels Hofmeyr 2822d07ab2 msc: inter-BSC HO test: use CGI cell ID, not LAI
In the inter-BSC 'Handover Required', do not send a LAI cell identifier,
but a CGI one.

Rationale:

As explained in OS#5188, 3GPP TS 48.008 allows a LAI identification only
in the Cell Identifier List IE, but not in the single Cell Identifier
IE.

In the inter-BSC HO test's Handover Required message, we so far send a
LAI identifier in a List IE to osmo-msc. And so far, osmo-msc simply
echos that in the Handover Request message's single Cell Id IE.

The LAI is, as actually defined in the spec, omitted from the single IE
in deps/titan.ProtocolModules.BSSMAP/src/BSSAP_Types.ttcn, and when
osmo-msc sends the non-standard LAI Id, ttcn3 fails to parse the BSSMAP
Handover Request message: the Cell Identifier IE gets wrong values, and
all remaining IEs are parsed as 'omit' even though they are present on
the wire. So as long as osmo-msc sends back a LAI Id, we cannot sanely
verify the Handover Request received from the MSC.

The CGI identifier type is supported in both IEs. So when the test sends
a CGI identifier in the Handover Required, osmo-msc will also reflect a
CGI identifier in the Handover Request, and ttcn3 parsing works.

This prepares for adding verification of the ciphering in inter-BSC
handover, in turn a preparation for adding tests of A5/4.

Related: OS#5188 SYS#5324
Change-Id: I48276acf923626db171683dfa03ef43614a71380
2021-06-23 03:55:26 +02:00
Eric Wild 26f4a62642 msc: add first a5/4 tests
All msc tests involving classmarks suffer from the same problem: if a
existing subscriber is reused the old classmarks will stick, since the
msc only overwrites updated parts of the cm when receiving a new cm, so
"downgrading" the existing classmark information is not possible.

This is circumvented here here by using different imsi suffixes,
the last param passed to f_start_handler.

Additionally the handler will now properly respond to cm requests
by the msc, i.e. in case the early cm is not sufficient for a5/4
because it lacks cm3, so the msc attempts once to query the cm,
hoping to get a cm3.

Related: SYS#5324
Change-Id: Idc055a006b325f58a5eafa88bc4415181b3500a2
2021-05-19 17:49:52 +00:00
Pau Espin e979c40e4b msc: Verify CommonID contains LastUsedEutranPLMNId when in CSFB
Validate in test that MSC sends Last Used E-UTRAN PLLMN Id IE when call
is started by SGs (CSFB).

Related: SYS#5337
Change-Id: I161529fd9c8cacb7d17ea18660998df06bb0b575
2021-05-11 16:15:31 +02:00
Pau Espin 3768a6fc34 msc: MME emulation should send TAI during SGs LU for CSFB support
3GPP TS 23.272 sec 4.3.3:
"During the SGs location update procedure, obtaining the last used LTE
PLMN ID via TAI in SGsAP-LOCATION-UPDATE-REQUEST as specified in TS
29.118".

Related: SYS#5337
Change-Id: I7057a7c41794d62f7cbc412da3e805c1f0c69511
2021-04-28 14:24:26 +02:00
Pau Espin 3acd19ea41 msc: Fix typo in func description
Change-Id: I828fe1efbdd38b12ba29f9ac0141fc456ce3c7bf
2021-04-28 12:59:52 +02:00
Harald Welte 79ed4b1685 remove deprecated 'logging level all everything' from configs
it has been deprecated in libosmocore.git 2.5 years ago:

commit 7e0686c6b4b456ec4e6e15689694b1bcf96c301f
Author: Neels Hofmeyr <neels@hofmeyr.de>
Date:   Mon Sep 10 20:58:52 2018 +0200

Change-Id: Ieb9e958278e7bb9d5e798f83b70dcb873a25d06d
2021-04-21 16:40:49 +00:00
Pau Espin 174fac25a3 msc: Get rid of several uneeded module params
These params are not needed anymore since new releases used in -latest don't
need to disable it.

Change-Id: I16575ae4f615bf7c42d5921917003007ba4872a0
Related: OS#5042
2021-02-26 13:20:10 +01:00
Vadim Yanitskiy 109e755161 msc: test reaction on Clear Request during a MO/MT Call
Change-Id: Id16969fe0de04445d1320a96d35cf1d48cc8cf09
Related: SYS#5340
2021-02-08 20:18:13 +00:00
Vadim Yanitskiy b56701e021 msc: finish and enable test case for MT Call T310 timer
The test suite needs to handle MGCP messages, otherwise the related
FSMs in the IUT would tear everything down before T310 is expired.

Change-Id: I79d9ae3b086d05c3d7c0a1241720d6c3f1e90281
Related: SYS#5340
2021-02-08 20:18:13 +00:00