Commit Graph

47 Commits

Author SHA1 Message Date
Harald Welte 9b751a6575 msc: Add RANAP to msc tests
Integrate RANAP to MSC_Tests.ttcn

Related: OS#2856
Change-Id: Idfa54b7607ad6e7016ed9411b0cc5330c901ea34
2019-04-30 19:07:47 +02: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 c1f937a15b msc: f_mm_auth(): Add support for UMTS AKA
Change-Id: Id57adcebd63a06cfa555824e493561fe08f13d6d
2019-04-25 20:06:50 +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
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
Neels Hofmeyr 59e0c6f764 msc: for mo and mt call, interleave MGCP and Assignment
Upcoming osmo-msc changes move away from the current ordering of MGCP and
Assignment messages. Allow these async dialogs to appear in any order.

Change-Id: Ia06af1e347601949f4ddb19f963daa400766d9e7
2019-03-17 14:39:58 +00:00
Neels Hofmeyr 82fd04b13b msc: add codec to all Assignment Complete messages
So far we omit a Speech Codec (Chosen) from Assignment Complete messages, which
is actually a mandatory parameter. osmo-msc seems to carry on nevertheless, but
it actually shouldn't be able to.

Always send a Speech Codec (Chosen).

Change-Id: Ib35f019383db8ace05a9dc349648e2da7ba58bfa
2019-03-14 03:43:52 +00:00
Neels Hofmeyr 6b468a493e msc: as_clear_cmd_compl_disc: log unexpected message
When receiving an unexpected BSSMAP message that fails the test, log it.

Change-Id: I5cafac3318a50567f1916ea670af55558e97bf17
2019-03-07 23:27:37 +01:00
Harald Welte 4c422b76ff MSC: Verify CSFB INDICATOR is present in CLEAR COMMAND
When a CSFB voice call is cleared by the MSC, it must include the
CSFB INDICATOR in order to trigger the BSC to perform actions
required for Fast Return to LTE.

This patch changes TC_sgsap_lu_and_mt_call() and
TC_bssap_lu_sgsap_lu_and_mt_call() to ensure the CSFB INDICATOR IE
is present as expected.

Change-Id: I6ce3a34f85aca7143cf7925cb9319bc679e8d395
2019-02-22 21:24:11 +00:00
Philipp Maier 578654846c MSC_Tests: make sgsap interface optional
At the moment the sgsap always enabled in the testsuite. This means the
testsuite will try to connect the SGs interface of osmo-msc on
initalization. If the connection fails, the testcase will fail also.

Unfortunately the related patches that add the SGs interface to osmo-msc
are not yet merged to master. This causes almost all testcases to fail,
so lets have the SGs interface as an option that we can switch on when
the SGs interface patches are merged to master.

Change-Id: I429c0c5250d4b61de8a4d6399f284ce2c87cca93
Related: OS#3645
2019-01-07 18:37:47 +01:00
Harald Welte 4263c52bd4 WIP: MSC_Tests: Add SGs testcases
This extens MSC_Tests.ttcn with an initial set of SGs interface test
cases for RESET, LU, DETACH, PAGING, SMS and CSFB procedures

In particular the following testcases are added:

- TC_sgsap_reset: isolated reset procedure test
- TC_sgsap_lu: isolated location update with TMSI realloc
- TC_sgsap_lu_imsi_reject: location update, reject case
- TC_sgsap_lu_and_nothing: location update with failed TMSI realloc
- TC_sgsap_expl_imsi_det_eps: detach from EPS serveces
- TC_sgsap_expl_imsi_det_noneps: detach from non-EPS services
- TC_sgsap_paging_rej: isolated paging, reject case
- TC_sgsap_paging_subscr_rej: isolated paging, subscr rejects call
- TC_sgsap_paging_ue_unr: isolated paging, ue is unreachable
- TC_sgsap_paging_and_nothing: page, but don't respond
- TC_sgsap_paging_and_lu: check paging followed by an LU
- TC_sgsap_mt_sms: mobile terminated SMS through SGs Interface
- TC_sgsap_mo_sms: mobile originated SMS through SGs Interface
- TC_sgsap_mt_sms_and_nothing: trigger SMS, but don't respond to paging
- TC_sgsap_mt_sms_and_reject: trigger SMS, but reject paging
- TC_sgsap_unexp_ud: Send unexpected unitdata (SGs Association: NULL)
- TC_sgsap_unsol_ud: Send unsolicited unitdata (subscriber not in VLR)
- TC_bssap_lu_sgsap_lu_and_mt_call: LU on 2G, LU on SGs and CSFB call
- TC_sgsap_lu_and_mt_call: LU on SGs, and CSFB call

Change-Id: I38543c35a9e74cea276e58d1d7ef01ef07ffe858
Depends: osmo-msc I73359925fc1ca72b33a1466e6ac41307f2f0b11d
Related: OS#3645
2019-01-07 15:48:28 +00:00
Vadim Yanitskiy 9cc019a7ac MSC_Tests.ttcn: introduce TC_gsup_mo_smma for MO SMMA over GSUP
The idea of this test case is to verify MO SMMA transmission
over GSUP towards HLR. The algorythm is equivalent to MO SMS.

Change-Id: I7abc95b8e416f7308d54e11be11c08586d18e6c5
Related: OS#3587
2019-01-04 16:34:24 +00: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
Philipp Maier c39a9d89e0 BSC_ConnectionHandler: make VTY interface available
The BSC_ConnectionHandler currently has no access to the VTY interface.
Lets make it available so that upcoming tests can use the VTY interface
to trigger actions (e.g. Paging, see also Change Id:
6a1a6bd6da1bf46d6d703be495795d3610ca431)

Change-Id: I684f0a3a435924d81bc5a793cb7b43a3ab9ef842
Related: OS#3615
2018-12-18 17:14:19 +01:00
Philipp Maier aeb29a8a4f BSC_ConnectionHandler: introduce ctrl interface
There are some upcomming tests which require to access the control
interface of the MSC while the actual test is running. Future test
cases (e.g. Paging, see also Change Id:
a6a1a6bd6da1bf46d6d703be495795d3610ca431) will use this.

Change-Id: Ie3caf7a449311e7687670cadfa27818635d25aa4
Related: OS#3615
Related: OS#3187
2018-12-18 17:14:19 +01:00
Vadim Yanitskiy 563185253b BSC_ConnectionHandler.ttcn: introduce f_mt_sms_send_rp_error()
Change-Id: I3d67a451335e1c1e1b18237fdda82260c0c969fb
2018-12-03 03:21:21 +07:00
Vadim Yanitskiy 2159acbc76 BSC_ConnectionHandler.ttcn: split up f_mt_sms() into two functions
This would allow to expect a MT SMS message using f_mt_sms_expect()
and send an RP-ACK using f_mt_sms_send_rp_ack() separately in the
follow-up changes for SMS over GSUP.

Change-Id: I4730634a9f3352b6f8553ee2fd1d43044f41241e
2018-12-03 03:19:08 +07:00
Vadim Yanitskiy d4cc1508dd BSC_ConnectionHandler.ttcn: split up f_mo_sms() into two functions
This would allow to submit an SMS message using f_mo_sms_submit()
and wait for RP-ACK using f_mo_sms_wait_rp_ack() separately in the
follow-up changes for SMS over GSUP.

Change-Id: I5b35206286ae8add8b5bd34b0ab41ba7862c28e4
2018-12-03 03:18:39 +07: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
Daniel Willmann afce86630c Stop tests after failures
Call mtc.stop after setverdict(fail), add reasons to most failures and
fail with verdict error for internal errors.

Change-Id: I9b618235939fa41160b9be6677b121963d3ec857
2018-07-24 14:19:42 +02:00
Vadim Yanitskiy 20ee5e4d8f msc/BSC_ConnectionHandler.ttcn: add EST_TYPE_SS_ACT for SS/USSD
Change-Id: If439e7c082b435d7f668065c9f8e3bdfa941dcc5
2018-06-02 04:55:18 +07:00
Harald Welte f640a01311 msc: Add SMPP tests for MO + MT SMS
Change-Id: I5349559c7c3096533fb07fcf53f0a44ff7f6567f
2018-04-14 21:58:16 +02:00
Harald Welte e008eeaf6d msc: Fix ti_flag mistake in f_mt_sms()
The L3 transaction-id in MT-SMS is allocated in the MSC, so any
messages we expect from the MSC must carry c_TIF_ORIG.

Change-Id: I6ea977a7662fdfc9c504f13ac5632ac20a04f522
2018-04-14 21:08:01 +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 b9e86fa815 msc: generate mobile identity inside f_establish_fully()
This reduces the code duplication in every caller of the function.

Change-Id: Iaa071b131a8ff372d70677c8622d227f88e9ea53
2018-04-09 18:19:36 +00:00
Philipp Maier 3716a5e364 BSC_Tests: split up f_mt_call and f_mo_call
The functions f_mt_call and f_mo_call establish a call, hold it
for 3 sec. and tear it down again. However, there may be test
situation where one wants to establish a call and then hold it
in order to perform other actions.

- split up the function into an _establish and _hangup part.
- add a replacement f_mt_call and f_mo_call function for the
  already existing testcases

Change-Id: I0da9cf64d10de4036eb037ef5e491bfe3088670b
2018-03-22 12:43:56 +01:00
Philipp Maier 2a98a73be4 MSC_Tests: Test what happens when the DLCX is dropped
Test the reaction of osmo-msc when the DLCX at the end of a call
is not answered. Normally osmo-msc should time out and clear the
connection.

Change-ID osmo-msc:I78f1b6a9149488a4ad3f120c1e190a83c07d4b89 fixes
a regression that causes osmo-msc to segfault due to a use after
free. This testcase provokes the situation that leads to the
crash.

Change-Id: Ic124ea116496209f9a1d8e74ae3e3a36cf866db0
Related OS#2881
Related OS#2882
2018-03-19 16:12:31 +01:00
Philipp Maier cd66857671 cosmetic: correct indentation
Change-Id: I5fdb3d3db201e33456e03ffda55752efe4ada733
2018-03-19 16:12:31 +01:00
Harald Welte 5946b33e37 msc: wait for clear-command/complete/sccp-release
Not all tests were waiting/expecting the complete connection
shutdown, which results in the possibility for CLEAR CMD to arrive
during shutdown of the TITAN components and cause related errors.

Change-Id: I3a6c2e1f78b58f86ef84d4e323f432016a9afa7e
2018-03-18 23:33:42 +01:00
Philipp Maier f1e02bb46b MSC_Tests: Support wildcarded endpoints (follow up)
The following tests still lack support for wildcarded endpoints:

MSC_Tests.TC_lu_and_mo_call
MSC_Tests.TC_emerg_call_imsi
MSC_Tests.TC_mo_crcx_ran_reject
MSC_Tests.TC_mt_crcx_ran_reject

- Also add support for wildcarded endpoints for those tests.

This is a follow up patch for:
Change-Id I0efeae0f8a6e98deb843e79648f84a262f1d98f8

Change-Id: I16cb2582b9d1764d7cb7e4b787368a4dd5ddf69c
Related: OS#2710
2018-03-16 09:15:32 +00:00
Philipp Maier 4b2692d50b MSC_Tests: Support wildcarded endpoints
At the moment the testsuite is unable to detect when the call agent
performs a CRCX request with a wildcarded endpoint.

- Set a default endpoint name in cpars in case the MSC does
  a CRCX request with wildcarded endpoint name.

- Detect if the MSC supplied a wildcarded endpoint name. Do
  not overwrite the default setting in cpars then.

- Attach the endpoint name as Z: parameter in the response so
  that the MSC knows which endpoint to use. (Unconditional,
  does not harm on non wildcarded requests)

Change-Id: I0efeae0f8a6e98deb843e79648f84a262f1d98f8
Related: OS#2710
2018-03-14 21:08:20 +00:00
Neels Hofmeyr c1f105acb8 msc: cosmetic: f_perform_lu() / pars: move send_early_cm to BSC_ConnHdlrPars
By moving to the BSC_ConnHdlrPars, also the tests that expect a LU failure able
to indicate a send_cm_update flag.

All current callers of f_perform_lu() pass send_early_cm as 'true', all are
covered by a default of 'true'.

Change-Id: Ic882293f199a33133a171bff14ff433f99cc8576
2018-03-02 00:35:23 +01:00
Harald Welte 158a7ca881 Add L3_Common for shared L3 functions between MSC and SGSN testing
Change-Id: I16e80df610235849180dc946f9457302deafb9d2
2018-02-16 20:03:47 +01:00
Daniel Willmann 90829d6eff MSC_Tests: Set verdicts from inconc to fail
Channels not being closed/cleared at the end of the test is a clear
failure, so don't mark the test as inconc.

Change-Id: Ie9188111da744f0aafaac02841d36a957bfc8d86
2018-02-15 17:45:14 +01:00
Daniel Willmann 92f662789d BSSMAP_Emulation: Parameter to skip seq no patching
This is needed to check that duplicated messages will actually be thrown
away by the MSC.

Change-Id: I0a6914067ec8daa8903f0ef0c877f178cfd61659
2018-02-15 10:29:01 +01:00
Daniel Willmann 8b084374b5 MSC_Tests: Add CC sequence no. test with DTMF
Change-Id: I9674343acc18187b9e016bd8e0be470d5424046f
2018-02-15 10:29:01 +01:00
Harald Welte a4ca446034 WIP: Prepare MSC_Tests for ability to emulate two BSCs
Change-Id: Ibe3ae6ed4181c6ba7501f5443b4f22e3c8abeb3e
2018-02-13 08:15:33 +01:00
Harald Welte 33ec09bf34 msc: Mobile Terminated Voice Call test
Change-Id: I4fa353623991ac98726217559fea9f83f64715ea
2018-02-11 11:49:48 +01:00
Harald Welte 0bef21e645 msc: Add Emergency call to f_mo_call() and use it from TC_emerg_call_imsi
This fixes TC_emerg_call_imsi with current osmo-msc master. The old
implementation was broken as it didn't deal with MGCP yet.

Change-Id: Ic35797931387b078205269365421ad730db7af15
2018-02-10 11:06:55 +01:00
Harald Welte 081b19a791 msc: Unify channel establishment for CM SERV REQ + PAGING
Change-Id: I24e3dfa1ef88c48c39bf0248074e88e682bc8404
2018-02-10 11:06:55 +01:00
Harald Welte 9de8479399 msc: Cipher mode negotiation test
This adds a series of test cases that test various combinations of
A5/0, A5/1, A5/2 and A5/3 on both phone as well as network config
side.

Change-Id: I552fa4a23b7b65613a69b1a822e28e7dea401102
2018-01-28 01:08:18 +01:00
Harald Welte de37149345 msc: Introduce BSC_ConnHdlrNetworkPars
This record collects information about the network configuration,
such as whether or not authentication, tmsi allocation and/or
encryption are enabled.  The individual helper functions can then
react according to this information, without having to pass long
argument lists along the call chain.

Change-Id: I01a931f1cbbca4593fff2fd12689f040ceaa79b6
2018-01-28 01:08:18 +01:00
Harald Welte 3c68a54896 msc: rename sub-directory from msc_tests to msc (to be in line with bsc, etc.)
Change-Id: Ib219dee5e587bca3b79d29d631836cf1ef2be81c
2018-01-27 19:10:07 +01:00