Commit Graph

103 Commits

Author SHA1 Message Date
Harald Welte e057146df7 re-organize configuration files; add tcpdump integration
Let's make sure we share common configuration between the test
suites and split the config file into a "default" part which is
used (but not copied) in the Docker images, and a "local" part
which is basically those overrides that the user (or docker image)
wants to do from the default.

Change-Id: I3db452e24e5238aa05254d903739c64d202e61db
2018-02-14 18:50:16 +01:00
Harald Welte 261af4b501 WIP: Intra-BSC handover testing
Change-Id: Ic47e639a7c8640c736c84a44780fc8e111a64b52
2018-02-13 08:15:33 +01:00
Harald Welte c20b1c4207 MSC_ConnectionHdlr: Add telnet to VTY to each ConnHdlr
This allows each ConnHandler to issue telnet commands to the VTY

As a side-effect, it puts some more stress on the VTY interface,
as each [parallel] DchanHdlr now has its own telnet connection.

Change-Id: Ibd726af53219d829286da80b44ea4d9fb2ffdf3d
2018-02-13 08:15:33 +01:00
Harald Welte bc03c7693f bsc: Add VTY module to BSC_Tests
Change-Id: Ia78f1231f56fc5f3b003bccc850ea109ed4ed2d8
2018-02-13 08:15:33 +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
Philipp Maier e8f38ed2b3 BSC: do not flush RSL queue early in TC_chan_rel_a_reset()
When f_expect_chan_rel() is called after receiving the BSSMAP
RESET and DISC.ind f_expect_chan_rel() is called. The flush
parameter is not set, which means the default flush = true is
valid. This leads into an early flush of the RSL Queue and
tosses the RSL RELEASE REQUEST we expect, so the test can not
pass, even when the BSC sends the RLEASE REQUEST.

Looking further up in the code. IPA_RSL[0].clear is called,
so the Queue is flushed to get rid of unwanted messages from
the IMMEDIATE ASSIGN. There is no need to flush the queue
a second time anyway.

- Do not flush the RSL queue, set flush=false when calling
  f_expect_chan_rel()

Change-Id: I2962f741e0b13dec08ac6c918d326828beb65a6a
2018-02-10 10:09:28 +00:00
Philipp Maier c0375167da MGCP: remove hack to fake SDP
A problem with the parameter ordering inside the mgcp-client
(osmo-mgw) prevented TTCN3 from accepting the SDP data that
was generated by the IUT. The problem is now fixed and the
hack can be removed.

- remove hack

Change-Id: Ic37f78c2676e7c98144f10e9f3b55bc9651a4f7c
Related: OS#2818
2018-02-08 17:25:03 +01:00
Philipp Maier b20c3dcced msc: convert bssmap chipher to rsl chiper representation
The representation of the chiphering algorithm is different bssmap
and RSL. BSSMAP uses a bitmask and RSL a numeric value. For A50 and
A51 the values match up by coincidence, from A5/2 onwards they differ.

- Add a function to convert the BSSMAP representation to the RSL
  representation and use the converted value to set up the temlate
  for the expected RSL message

Change-Id: I274c1ff0b5636c48411f994f918e783b468cb3be
2018-02-08 15:17:30 +01:00
Philipp Maier 86f3920e5b bsc: fix f_establish_fully() for expected assignment failures
The altstep guard statements are to restrictive so they do not
match on an expected assignment failure anymore.

- Add a new altstep for expected assignment failures.

Change-Id: I78b839f0bcb7e2da61bff0add3abc452bfea40a2
2018-02-07 18:45:08 +01:00
Max 6367d7b807 Don't symlink non-existent file
Change-Id: I10309f07fb207c027703f0b43a478c152a029b6d
2018-02-05 16:58:27 +01:00
Harald Welte e9e02e4556 bsc: Add TC_err_84_unknown_msg to check if unknown RR message triggers RR STATUS
... as declared in TS 24.008 Section 8.4

Change-Id: I4f81b955567d2a33ead350ed312c4c4f6dd7ed8a
2018-01-31 23:37:14 +01:00
Harald Welte e3bd658abf bsc: reduce code duplication; add new test case on too short messages
Change-Id: I8232ee58c14a4358a01b5428ff2b4e559491b185
2018-01-31 23:37:14 +01:00
Harald Welte ea99a000ea bsc: Add TC_unsol_ass_compl / unsolicited assignment complete
Change-Id: Ib025ee51df54804e9a4241d4fa6107ce49270a5f
2018-01-31 20:47:04 +01:00
Harald Welte fbf9b5eafd bsc: Add TC_unsol_ho_fail test case for unsolicited handover failure
Change-Id: Ic3bd71d77d03cb7eebabdf98ba0bfbafd24ec0ea
2018-01-31 20:47:04 +01:00
Harald Welte 898113b838 bsc: Add TC_classmark to test RR CLASSMARK -> BSSMAP CLASSMARK conversion
Related: OS#2902
Change-Id: Idd86b5505e1a4fee666287680a20dc235970be93
2018-01-31 18:50:41 +01:00
Harald Welte beb9dbc3ee bsc: Change expectation in paging tests
When we page an unknown/unsupported CellIdentifier format, OsmoBSC
decides to page on all BTSs to be safe.  This way we have a chance of
making communication happen, rather than breaking it.

Change-Id: Ibd0ba986d9e18758b519e852c36f4dbbb6b367ea
2018-01-31 18:50:36 +01:00
Harald Welte 751d3eb19f BSC_Tests: Implement remaining missing paging tests
We now test all of the cell identification types specified in BSSMAP,
and also lists with a length != 1 entry.

Change-Id: I261f948d6054d0c90078c1dd0b2785a967b0a49b
2018-01-31 16:08:26 +01:00
Harald Welte 2fccd98a63 BSC_Tests: fix f_pageing_helper() in case no paging was expected
We have to wait for sime time until some RSL paging command would have
arrived, rather than continuing too quickly.

Change-Id: I63827aa3c42f77648ecad401b3cc4bae927b3b94
2018-01-31 16:08:26 +01:00
Harald Welte 363cb0a394 bsc: Handle wildcard endpoint name in MGCP CRCX
MGCP permits for the CallAgent to send a wildcarded endpoint name,
at which point the MGW itself must allocate an endpoint name and
return it as SpecificEndpointId parameter in the CRCX response.

Change-Id: I704bbe4e11b27e83a6ae6a71aa6a715dc8301f34
2018-01-30 20:10:56 +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 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 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
Harald Welte 6ed6bf9773 MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_TYPE
Change-Id: Ic90b4a0aa47821877a2d3566606b9c9dd5919968
2018-01-24 23:05:32 +01:00
Harald Welte 0b476066b9 BSSMAP_Emulation: Decode DTAP
It's quite cumbersome if the user of the BSSMAP_Emulation (the ConnHdlr)
will have to manually decode the DTAP in every BSSAP/DTAP message he
receives (and encode on the transmit side).  Let's introduce a new
optional mode in which the DTAP messages are already decoded for
more convenient matching inside the ConnHdlr.

Change-Id: I35cd4ea78aca0ce7c7d745e082d7289882c11e81
2018-01-21 19:31:09 +01:00
Harald Welte 0cf76ad9f7 Move BSSAP_Adapter.ttcn to library so it can be reused
Change-Id: I6ecb1a4823ee036b65d4e4e8ebc23c1db4915a42
2018-01-21 19:31:09 +01:00
Harald Welte ffe55fcc83 bsc test: Abstract out CTRL handling so it can be re-used from MSC test
We create a new Osmocom_CTRL_Adapter module which can be used by
test suites using the 'extends' functionality.

Change-Id: I3ef6cfaa738900e008155013a05b8ccf3d4b7aeb
2018-01-21 19:31:09 +01:00
Harald Welte 67089ee9a4 BSSAP_Adapter: De-couple from BSC-testing MSC_ConnectionHandler
... and pave the way from using it on the other side in MSC testing

Change-Id: I0095f7d24dd8b24f759e4c74a4e7856ec4503ed2
2018-01-21 19:31:09 +01:00
Harald Welte 818b6e4225 Add "SourceInfoFormat := Single;" to all test configs
This will make sure that all log files will contain information about
the .ttcn source file name and line number that has caused the log,
which is extremely useful during debugging.

Change-Id: Id6785757f20279ba84b34747f878baf67d065b20
2018-01-17 11:11:29 +00:00
Stefan Sperling b041b3d339 Test control connection status query for MSC 0.
This new test exercises the new 'msc.0.connection_status' control
command which is added in https://gerrit.osmocom.org/#/c/5630/

Change-Id: I55faa1ec413629234e24831dbc05d8b0afec8099
Related: OS#2729
2018-01-12 14:25:44 +00:00
Stefan Sperling 7159dbbce6 Fix BTS location area code assignment in test configuration.
The paging tests expect BTS 0 and 1 in LAC 1, and BTS 2 in LAC 2.
BUt the osmo-bsc configuration file had BTS 1 in LAC 2, and BTS 2 in LAC 1.

Change-Id: I1d6b02fe06116dee59977422bc93bcafcd3aba76
2018-01-09 13:19:46 +01:00
Harald Welte df32723446 GSUP Support and first test against OsmoHLR
Change-Id: Idd7a6aca1ab193da39294f49a3adc4c1cd7cecff
2017-12-28 23:17:24 +01:00
Harald Welte 2e1a1da674 bsc-test: Fix compilation after IuUP support was introduced
Ever since I46de7fb9c324654275a27aa5f8c1be70340e3229 we had problems
linking the object files together due to a missing object

Change-Id: I5d8c37f924b3a2c8b28cace4da2add1fadd0151a
2017-12-28 23:17:24 +01:00
Harald Welte 8098164721 RTP_Emulation: Integrate IuUP support
Change-Id: I46de7fb9c324654275a27aa5f8c1be70340e3229
2017-12-25 00:03:07 +01:00
Harald Welte 38b2a10e0b BSC_Tests: Fix TC_assignment_fr_a5_4
Don't expect the ASSIGNMENT to fail in case of unsupported A5/4,
but expect a CIPHERING MODE REJECT.

Change-Id: I15024f61e67795b7e5ce72e1b641db6ca92ff76d
2017-12-25 00:00:58 +01:00
Harald Welte 1a40de6a7f MSC_ConnectionHandler: fix f_rsl_reply() for RSL_MT_ENCR_CMD
For some weird reason the link_id is *not* the second IE in
RSL_MT_ENCR_CMD, while it is in all other RSL RLL or DCHAN messages.

Change-Id: Iea93aa8dba74d25c74a257d011ba43308ee375e4
2017-12-23 02:29:46 +01:00