Commit Graph

488 Commits

Author SHA1 Message Date
Harald Welte aa54cf8b7b msc: Disable t310 test for now (seems to never terminate on TITAN 6.1.0)
Change-Id: I1e8d1101cfea6d861f02cca52f3dc2d1453c33f8
2018-01-30 08:16:05 +01:00
Harald Welte 06e835fa6d MGCP_Emulation: Remove bogus mgcp_conn_id variable from MGCP_ConnHdlr
A given MGCP_ConnHdlr is handling multiple connections on one Endpoint
anyway, and the variable is not set or used anywhere.

Change-Id: If9eea3f665289a52915f114f0a69234aad28f322
2018-01-29 22:35:41 +01:00
Harald Welte 1909f464af bsc: Unregister old RSL channel number after assignment
Change-Id: I27d113391094f938ff92c4d6514172ee634f695c
2018-01-29 22:35:41 +01:00
Harald Welte 21583088e8 bsc: f_establish_fully(): Wait for release of old channel
We shouldn't "pass" f_establish_fully() in the assignment case
as long as the old RF channel hasn't been released via RSL.

Change-Id: If7c7c8c4826feba47f8a0395c291157a0e48cd9d
2018-01-29 22:35:41 +01:00
Harald Welte 211219ee1a bsc: Implement Assignment handling
This adds code for the rather intricated and nested transactions
happening on RSL, BSSAP, MGCP and RSL-IPA.  We use explicit
invocation of altsteps to simplify the main function f_establish_fully.

Change-Id: I5f830b010ea1b466ae74fa810df86638a74a3b8b
2018-01-29 22:35:41 +01:00
Harald Welte ecb254b18a L3_Templates: Add ts_RRM_AssignmentComplete
Change-Id: I3ae33ea00496eaef5885a58cd5fbc491abe68c87
2018-01-29 21:35:13 +00:00
Harald Welte 9e4273ef7e bsc: Permit MGCP messages from random ports on BSC side
Change-Id: Ie8896edc3f4310a78b584fd4ad017b77bda22afb
2018-01-29 21:35:13 +00:00
Harald Welte f70df65570 RSL_Emulation: Permit registration of explicit Channel Number
During assignment or hand-over, a given TTCN-3 component may be
interested in registering more than one channel number.  Add an explicit
procedure port with associated registration procedure, similar to what
we already do in GSUP, MNCC and others.

Change-Id: Iba37bf9541c779b79e179f995cdfa677633fadeb
2018-01-29 21:35:13 +00:00
Harald Welte 2c2e8c4e18 GSM_Types: Enable sub-slot templating in t_RslChanNr_Lm
Change-Id: I22dca2338ad66c81add5d161bd2a3b3e8e15bdcf
2018-01-29 21:35:12 +00:00
Harald Welte 6a8199dda3 RSL_Types: More templates, f_rsl_find_ie() for finding an IE in a message
Change-Id: Id7fa7d672c1fde97882fa44959501e8bf7b8dc0b
2018-01-29 21:35:12 +00:00
Harald Welte e540822967 RSL_Types: Make tr_RSL_MsgTypeDR match non-transparent RLL
There are quite a number of non-transparent RLL messages, such as
RLL_RELEASE_REQ.  Make sure we match those as intended.

Change-Id: I30260a57fc01613450e6ac66e0af97c29041b4fa
2018-01-29 21:35:12 +00:00
Harald Welte 1fe7481174 MGCP_Templates: Some more convenience extraction functions
Change-Id: I2fc121b1d90327c879a096773ecc5c04faad07d7
2018-01-29 21:35:12 +00:00
Harald Welte 5cfa867ba1 bsc: Fix TC_paging_imsi_nochan
The point of this test is to verify that *no* paging messages are sent
if "No cell" is given as cell identifier list by the MSC.  We can thus
not use the existing pageing_helper function, but have to handle this
a bit differently.

This makes TC_paging_imsi_nochan runs pass.

Change-Id: Iec1086bd42f42de1986bb00b91af718977f73b30
2018-01-29 21:35:12 +00:00
Harald Welte 15510cbde5 bsc: Cosmetic: Update commented-out config file options
There's no point in listing non-existing module parameters. Instead,
list those that the BSC testsuite actually has

Change-Id: I3cb756750cafba4ca481a0a98d19e27cb58395df
2018-01-29 21:35:12 +00:00
Harald Welte 725844b3cc bsc: Fix TC_chan_act_ack_est_ind_refused()
This test case was incomplete in that it didn't account for a RLL REL
REQ/RESP before RF_CHAN_REL.

Together with OsmoBSC Change-Id
I64a46b5bcd4272e3fa2ff4ee824c2f3fdff6854b, this test now passes.

Change-Id: Ia5af254d4fc572c1d324f70b5ec99d87bdaf9eb9
2018-01-29 21:35:12 +00:00
Harald Welte f77aef6d02 bsc: Fix TC_chan_act_ack_est_ind_noreply()
This test case was incomplete in that it
* applied the wrong timeout T3101 instead of T3210
* didn't account for a RLL REL REQ/RESP before RF_CHAN_REL

Let's fix it. Together with OsmoBSC Change-Id
Ie11d7d06353ba1b1e2fab6763dd7b032ce8a5d2c this check now actually
passes for the first time.

Change-Id: I9ed41d246cf153735fd4e71cc6cc174ede32a76b
2018-01-29 21:35:12 +00:00
Harald Welte 91d54a569c bsc: reduce code duplication by introducing f_expect_chan_rel()
The handling of channel release is copy+pasted, let's introduce
a shared function.

Change-Id: If74b0838187f60004b7daf6176db259af511bf87
2018-01-29 21:35:12 +00:00
Harald Welte 6ff76ea569 bsc: Update TC_chan_rel_conn_fail to subscr_conn_fsm
In OsmoBSC Change-IdI68286d26e2014048b054f39ef29c35fef420cc97 we
introduce a proper subscriber connection state machine which fixes
the order of events during channel release after connection failure.

Change-Id: Ibe9c3205ec11dafcc305ea72aeb33e9152a6458c
2018-01-29 21:35:12 +00:00
Harald Welte dd8cbf3640 bsc: Update TC_exhaustion to recent osmo-bsc
When Change-Id I10fc9f60c58c6b7ed424a86ce23bf6b9802c9eb1 was merged,
OsmoBSC started to always allocate SDCCH first, no matter what the
establishment cause.  This basically means we don't do very early
assignment anymore.  TC_exhaustion must be adapted to allocate all
SDCCH and all TCH before failing.

Change-Id: I9d8bbfca0deebc738385f2a1a20d4a17c3853082
2018-01-29 21:35:12 +00:00
Harald Welte 99740c83d3 bsc: Don't test CTRL commands for old NITB parameters
Change-Id: Ib6c6b24842d7ceb12a93200bd6208a6b392544b5
2018-01-29 21:35:12 +00:00
Daniel Willmann a3d192f1e4 bsc: Expect CRCX and send an ACK back
Change-Id: Ic4fabc2a2cf034a831e446697b3a22f4d1d0c6d6
2018-01-29 21:35:12 +00:00
Daniel Willmann aeea76fe5d bsc: Reply to CRCX with ACK
Change-Id: Ieaea431a99241d8844b915e1b46b77c79fff24df
2018-01-29 21:35:12 +00:00
Daniel Willmann 21ea2396a5 bsc: Register expect criteria for MGCP CRCX
Change-Id: I04afa663f4397d5d9b8dec06671aec84f4c4f80e
2018-01-29 21:35:12 +00:00
Daniel Willmann 191e0d9260 bsc: Start MGCP_Emulation and extend MSC_ConnectionHandler for MGCP
forward-ported by Harald Welte

Change-Id: I1f316a9ed5859670348ea7aa352604020d6b09f5
2018-01-29 21:35:12 +00:00
Daniel Willmann 3826a1bd1d BSC_Tests: Add MGCP_Emulation to gen_links
Change-Id: Iac24d8d3baf7e4ca6bdab6b0be7b55096e490d01
2018-01-29 21:35:12 +00:00
Pau Espin 363ba48b1f ggsn_tests: Validate DNS PCO values
Change-Id: I54124cb5269c0992e6c72af1a1ecaa8e3202bf05
2018-01-29 18:43:35 +01:00
Pau Espin aea381feca library: Implement f_inet6_addr function
It can be used to parse IPv6 functions, since inet_addr supports IPv4
only.

Change-Id: Icb6dd38462501895d1b4409a3c530793917bd803
2018-01-29 15:18:19 +01:00
Pau Espin f69a438010 ggsn_tests: Configure expected GGSN DNS values and improve error message
Change-Id: Ie64ca0b4cda22fd358c8c304d5b3909fd9685948
2018-01-29 13:09:00 +01:00
Pau Espin 11ad2afd06 gitignore: Ignore dependency subdirs
Change-Id: I843da5c51d68102b992ce178404d8601c520229f
2018-01-29 11:55:23 +01:00
Pau Espin ef85dfa942 regen-makefile.sh: Exit with clear error if ttcn3 bin not found
Change-Id: I866a758ec472968f368866e3b3b24dc6f14ac7cb
2018-01-29 11:51:52 +01:00
Pau Espin 5c9d99f735 regen-makefile.sh: Support Archlinux install paths
Archlinux (titan-git AUR package) installs everything (includes, libs
and bin) into /usr/ttcn/ prefix.

Change-Id: I545f2f04890310e98233b04b44c4614df34f2f17
2018-01-29 11:51:52 +01:00
Pau Espin bd939f0307 start-testsuite.sh: Add archlinux tccn3 path to LD_LIBRARY_PATH
Archlinux installs ttcn33 libaries in /usr/ttcn3/lib (titan-git package from AUR).

Change-Id: I99219f4ab36c82e562ef3fed047d3c52d64497f1
2018-01-29 11:51:49 +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 d95da56490 GSUP: Initialize ExpectTable
For some reason TITAN 6.1.0 requires the table to be explicitly
initialized, while 6.3.0 is happy without it.

Change-Id: I4f9ac98fb60ad16b98acd627efd617bfb4f6abcb
2018-01-27 21:55:34 +01:00
Harald Welte 473676b879 BSSMAP_Emulation: ispresent(bssap.pdu.bssmap) before accessing fields
This seems not to be required on TITAN 6.3.0 on my laptop, but the
older 6.1.0 on Debian 9 seems to need it.

Change-Id: I574d8b79ac43e0fceddb3f9815666aef0ed66a3f
2018-01-27 20:38:54 +01:00
Harald Welte 6126fb0ee0 msc: Make MGW ip/port parameters configurable as module parameters
Change-Id: I9148ebd687a1cf96a4b8c433e771785e30216cbc
2018-01-27 20:08:41 +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
Harald Welte 89a3249b85 msc: Make TC_lu_clear_request tolerant to double ClearCommand from MSC
See https://osmocom.org/issues/2862

Change-Id: Ic266151038dc29220ec62279d16fcd181836bb42
2018-01-27 19:08:09 +01:00
Harald Welte 167458a5c1 msc: Add TC_gsup_cancel testing GSUP Location Cancel
Related: OS#2886
Change-Id: Ib962c4a1e71f926631503fe4b3459ca49360dfa4
2018-01-27 19:00:04 +01:00
Harald Welte 8a1dd53367 GSUP_Types: Add tr_GSUP_IMSI as helper for messages with IMSI as first IE
Change-Id: Ie1b9682d102da28fa7de4cb391d61aeb52f1676b
2018-01-27 19:00:04 +01:00
Harald Welte 6aa04e313b GSUP_Types: Use (value) annotation for send (ts_) templates
Change-Id: I5c74ad71e8a0966f10bddcdf800cd94226cd900d
2018-01-27 19:00:04 +01:00
Harald Welte d2328a2d7b msc: Enable all test cases in control section
Change-Id: Idc8c88de1b55d1f7e1e19be1b218edaebd7d767b
2018-01-27 14:27:38 +01:00
Harald Welte f466eb47c4 msc: Fastert timeout in TC_cl3_{rnd,no}_payload
Change-Id: Ida2674fca10e164385f68d2ab7f8d300abd8b6f7
2018-01-27 14:27:38 +01:00
Harald Welte 1ddc716eaf msc: Introduce shared f_expect_clear()
Avoid having to copy+paste the matching of a channel clear/relesae

Change-Id: If070b079f2ffadb8065fb99d1c8951ac9baec88b
2018-01-27 14:27:38 +01:00
Harald Welte ad2952e063 msc: Accept optional f_init_handler() argument for Tguard
Some tests may want an extended guard timer as they're waiting for
some particularly slow events.  They can override the default now.

Change-Id: Iee6f50559a8fe45c7655b9f41e7fa163199b39a6
2018-01-27 14:27:38 +01:00
Harald Welte c98b42c8c3 deps: Use SCTPasp from osmocom github fork (SO_REUSEADDR, usleep hack)
Change-Id: I9169d231358a9a7e9e10302044a895087f7e7d78
2018-01-27 14:27:38 +01:00
Harald Welte 53a06cd2f4 deps: Switch back to upstream titan.TestPorts.UNIX_DOMAIN_SOCKETasp
Upstream TITAN has merged our SOCK_SEQPACKET support, so there's no
need for using our private repo anymore.

Change-Id: Ib04d9a3095cf93609af07af0de0b701cba460f67
2018-01-27 14:27:38 +01:00
Harald Welte ec6e5b43cf msc: Add missing 'repeat' in TC_mo_crcx_ran_reject
Change-Id: Id5c538546ba59f8a8d5f4379f16df2d99c8c2669
2018-01-27 12:45:39 +01:00
Harald Welte a10db90e42 msc: Add global g_Tguard timer to make sure BSC_ConnHdlr terminates
Change-Id: I10fc0ff04c16eacc12f09ac1759940676ae62213
2018-01-27 12:45:39 +01:00