Commit Graph

527 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 70b52c9d4b RSL_Emulation: Add procedure calls to suspend/resume dchan handling
We introduce a procedure by which any DchanHandler can globally
disable all receiving/processing of DChan related messages.  This is
required in upcoming handover code, as we need to block handling
of messages such as RSL IPAC CRCX on the new Dchan before we have
processed the RR HANDOVER CMD and raised an associated expect here in
the RSL emulation code.

Change-Id: Ibef65f87d0d481accbc0e019874dd43b3f9a5dbc
2018-02-13 08:15:33 +01:00
Harald Welte 421e4d4eee RSL_Emulation: Add second RSL/RSL_PROC port for hand-over cases
Also, extend RSLEM_{register,unregister}() with an optional third
argiment, so the RSL_DchanHdlr can register 'expect' also for
that secondary BTS/port during hand-over

Change-Id: Ic22778f17dc4b93ef54837cf400ddd7d1732ae7e
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
Harald Welte 33ec09bf34 msc: Mobile Terminated Voice Call test
Change-Id: I4fa353623991ac98726217559fea9f83f64715ea
2018-02-11 11:49:48 +01:00
Harald Welte 49518bf842 BSSMAP: Fix L3 sequence number for ComplL3(Paging Response)
The existing code generating L3 sequence numbers in MO direction
made the assumption that the L3 message inside ComplL3 would always
be MM/CM, and increment the sequence number.

However, in case of a paging response, it is actually RR, which
does *not* have L3 sequence counters.  So we must make the sequence
counter increment dependant on the L3 protocol discriminator.

Change-Id: I25a5dd0c180c9acfa870984c6b122ac0c46383b3
2018-02-11 11:49:47 +01:00
Harald Welte 1823cb18a1 MNCC: Fix encoding of non-signal MNCC PDUs
Change-Id: I0b673f16daeccfdd2c9b5a4ee119c71f87a9644b
2018-02-11 11:46:32 +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
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
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
Daniel Willmann dcf9eb92f4 L3_Templates: Use tid parameter in ts_ML3_MO_CC template
Change-Id: I6c28b206625cb081a98a722b8c793ce02af74441
2018-02-06 16:23:36 +01:00
Daniel Willmann 4bd9955045 MSC_Tests: Make imsi suffix for f_start_handler unique per test
Change-Id: I02d1f2ac717fee278e3903d325942697637a5d28
2018-02-06 16:23:36 +01:00
Daniel Willmann ff6abf0f2d MNCC_Emulation: Initialize connection table
Change-Id: I903f6bf14a15abc6cae1d527195414c5f081c2df
2018-02-06 16:23:36 +01:00
Daniel Willmann 47fb0f4871 start-testsuite.sh: Pass a third parameter to ttcn3_start
The name of the parameters is a little misleading, since the second
parameter could just be a testname.

Change-Id: Ibe207a83c477c918a865a8a34cad7ca5d45c7eac
2018-02-06 16:05:04 +01:00
Daniel Willmann 12984ef36d deps: Ensure that branches are updated on make update as well
Don't just force-checkout the local master branch again, but reset to
origin/master

Change-Id: I7d5e0e3d7f92fc51fa438b92f00c79f63945e74f
2018-02-06 16:04:04 +01:00
Harald Welte 9dadc522d7 BSSMAP_Emulation: Send proper L3 N(SD) seuence numbers in MO
We have to make sure all mobile originated L3 messages carry
proper sequence numbers

Change-Id: Id8638673ad1a133f46893b2140970ec072022b3a
2018-02-06 13:43:36 +00:00
Max 6367d7b807 Don't symlink non-existent file
Change-Id: I10309f07fb207c027703f0b43a478c152a029b6d
2018-02-05 16:58:27 +01:00
Harald Welte d13700dd6c MNCC: Represent 'keypad' as one-character charstring, not int
The MNCC Unix Domain Socket encoding uses an int here, which is
a bit odd, given that it's an ASCII / IA5 char value on the actual
GSM L3.  Let's convert from/to something useful.

Change-Id: Id17ac502ca33f4962214a3d5938d0dc29ca6ec1b
2018-02-03 21:45:47 +01:00
Philipp Maier 8a3dc925da MGCP_Test: test illegal wildcarded DLCX and MDCX
- Add tests to check the behaviour on wildcarded DLCX and MDCX,
  both commands not supported by the MGW and should fail.

Change-Id: I140c6d9e337cd16d6147bb582a9474cf76b5170b
2018-02-02 16:14:37 +01:00
Philipp Maier dffa6a46e6 MGCP_Test: Clean up after TC_crcx_sdp
The testcase TC_crcx_sdp does not clean up the connection it
created. This can cause subsequent tests to fail.

- Use f_dlcx_ok() to clean up the connection once the test
  is done.

Change-Id: I4e0f5ce218fadc5debe0bbf548b69919584ab66c
2018-02-02 16:14:37 +01:00
Philipp Maier 5e06ceefbe MCGP_Test: Add tests for wildcarded CRCX
The wildcarded CRCX is not tested yet.

- Add a test function that executes a single wildcarded CRCX
  request

- Add a test function that exchausts all MGW resources using
  wildcarded CRCX requests

Change-Id: I70cf486dc21aef19e4199289f5a5509f6927713e
2018-02-02 16:14:37 +01:00
Philipp Maier bb7a01c696 mgw: add constants for mgw endpoint and domain name
The testcase for osmo-mgw hardcodes the mgw domain and also lacks
an endpoint identifier, which was deprecated recently.

- replace the hardcoded occurrences of the mgw domain name with
  a constant

- add a constant for the rtpbridge endpoint identifier

- add a testcase that still uses the old method without prefix
  on the endpoint identifier.

Change-Id: If4455c4cb521270b2fe24881ade9b578a5132205
2018-02-02 16:14:28 +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
Pau Espin 6c7285d682 ggsn_tests: Add test to validate if different pdp ctx can talk each other
It seems due to the current network configuration, pdp v4 ctx can talk
each other while pdp v6 ctx cannot.

Change-Id: I67c04b056cc5c092d357abbb084b7665f59eaf3a
2018-01-31 14:47:00 +01:00
Pau Espin 3d9338fb92 ggsn_tests: Add test case to validate packets forwarded vs dropped
New dependency is required: titan.ProtocolModules.ICMP
It tests that ICMP echo packets can be sent successfully (reply is
received or otherwise dest unreachable if routing is not set up
correctly during the test). It also tests some cases in which osmo-ggsn
is required to drop the packets (eg. unknown src ip unrelated to pdp
ctx). It also checks that IPv6 packets are dropped in IPv4 pdp ctx and
viceversa It also checks that IPv6 packets are dropped in IPv4 pdp ctx
and vice versa.

Change-Id: Ib9c6043a6cd3b6622782ec7e7fcd2815101755ba
2018-01-31 14:46:02 +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 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