Commit Graph

4247 Commits

Author SHA1 Message Date
Harald Welte 8d3ea0e3ec RTP_Emulation: Make it less chatty in the log
Change-Id: I8ff3ce27967d624cce5edc10655b1294d57ca3a3
2018-03-29 08:50:18 +02:00
Harald Welte 9774e7ab04 RTP_Emulation: Fix receive templates
The connection ID part of the template must be updated after we
created the respective sockets. It was done to early.

Change-Id: I37306d841df3d27d30fd89fb99c863370517e3ff
2018-03-29 08:49:38 +02:00
Harald Welte cb8b427db1 mgw: Add statistics to RTP_Emulation and link/build it in mgw test
We're not using it so far, this is left for follow-up patches.

Change-Id: I40c322374cd99adb75a0f09175023fc0b12291d2
2018-03-29 08:49:15 +02:00
Philipp Maier 34bd80eae7 BSSMAP_Templates: Add templates for HANDOVER REQUIRED
In order to form a minimal HANDOVER REQUIRED message additional
Templates (ts_) are needed.

- Add Template ts_BSSMAP_IE_SpeechVersion
- Add Template ts_BSSMAP_IE_CurrentChannelType1
- Add Template ts_BSSMAP_IE_OldToNewBSSInfo

Change-Id: I41c2a036465d422db9348d4d2d66bb332e16e155
Related: OS#1609
2018-03-28 12:34:54 +02:00
Philipp Maier 7593298b36 MSC_Tests: Add support for multiple BSC
The upcomming tests for inter-BSC handover make it necessary to
simulate multiple (two) BSCs to the MSC, while the current
Implementation can only handle one BSC instance at a time.

- Allow multiple BSC instances to be created
- Add a simple reset-test to test what happens when
  two BSC instances are started (BSSMAP reset from two
  different BSCs)

Change-Id: I52a4c8118828c1605cf672889982f987568ad17d
Related: OS#1609
2018-03-28 12:34:54 +02:00
Philipp Maier 0f4a0f941f Cosmetic: Update MSC_Tests.cfg
The MMSC_Tests.cfg config file lacks most of the test comments.

- make sure the control section of MSC_Tests.ttcn and MSC_Tests.cfg
  match up.

Change-Id: I89e6c65427a993261cab6a284e6cc3dbc5a5562f
2018-03-28 12:28:05 +02:00
Harald Welte b1add59560 deps/Makefile: Various updates
* SCCP changes were merged upstream, we don't need to use osmocom fork
* SCCP upstream now has proper tag based version
* M3UA now has a new version tag (with Routing Context)
* UNIX_DOMAIN_SOCKET has new verison tag (upstream requested changes)

Change-Id: I5526c1688d84cf985299baa973271a620b4b4544
2018-03-27 20:52:38 +02:00
Harald Welte 035f7f8af4 deps/Makefile: Add missing "git fetch" to /update and /clean targets
When the Makefile was modified to use a new tag/hash of a given
repo, the "make update" or "make clean" target will fail as the
new version/tag is not yet known to the local repo, only to the
remote (and hence we need a fetch).

Change-Id: I52c44c744674cd4dab0c85086d68bde6f9be1fca
2018-03-27 20:52:38 +02:00
Harald Welte 498634bfd3 deps: Switch to our own fork of the M3UA ProtocolEmulation
.. as we have some patches that are not yet in upstream

Change-Id: Ie8a9380ae8838c571fe3d0776f60485b34c85d4e
2018-03-27 19:21:55 +02:00
Philipp Maier cb6cc481d1 fix TCH/H for TC_chan_exhaustion
At the moment we use onle TCH/F and PDCH in our osmo-bsc config,
but the tests TC_assignment_codec_amr_h and TC_assignment_codec_h
requre a half rate channel in order to work. Configuring one TCH/F
to TCH/H seems not to hurt any tests except TC_chan_exhaustion

- also regard half rate channels in TC_chan_exhaustion
- change included sample osmo-bsc.cfg

Change-Id: Idd5a9602f1b49b5aa0fc510faa151fe16c0b404d
Related: OS#3100
2018-03-27 11:28:17 +00:00
Harald Welte 206587e073 Makefile: Add new 'sip' testsuite to list of testsuites
Change-Id: Ie7cc41a40fb8706e9b0752be6e7c1f34dc692d87
2018-03-26 23:36:22 +02:00
Harald Welte b0d9360aac More progress on osmo-sip-connector tests
Change-Id: I34a5d7929264c7f5f21d3868a5f919874ffa106c
2018-03-26 23:11:51 +02:00
Harald Welte 9093839329 MNCC_Types: More types for MNCC server (MSC) side emulation
Change-Id: I1dd1744da7da983412d5d34c40fd896bc7b896db
2018-03-26 23:07:24 +02:00
Harald Welte 055660098c MNCC_EncDec.cc: Fix decoding of speech versions in bearer capabilities
Change-Id: I4fd79ee769c967dc209a7e1859d9d8b18d09843e
2018-03-26 23:07:24 +02:00
Harald Welte 9edea88b80 MNCC_Emulation: Make ExpectedCreateCallback work for SETUP_REQ, too
In server mode, we need to handle SETUP_REQ in ExpectedCreateCallback,
not only SETUP_IND like in client mode.

Change-Id: I988668cac9970af12d59d05a3a9facca257851c6
2018-03-24 22:33:59 +01:00
Harald Welte 1450953d2e MNCC_Emulation: Send HELLO in "server" role
Change-Id: I6ef9697ff365bae9fbf7c5888fdb0b88e63b13bb
2018-03-24 22:33:59 +01:00
Harald Welte 930d0a70e3 bsc: Fix tons of TTCN3 compiler warnings
Change-Id: I60dc054d19a249d46d44585c17626746c34f4b09
2018-03-23 12:32:00 +00:00
Harald Welte afec471557 sip: Add SIP_Emulation and first osmo-sip-connector test case
Change-Id: Ifd47b0d48c609b4a678ea47aa7f89f5c12e6c0d2
2018-03-22 21:16:42 +01:00
Harald Welte a63b91017a bsc: TC_assignment_codec_*: Verify RSL side codec/mode
Let's not only match if the BSSMAP ASSIGNMENT COMPL matches what codec
was requested in BSSMAP ASSIGNMENT CMD, but also verify that the
RSL side channel was activated with the right channel mode IE.

Change-Id: I6ef24b5b82a5c100ffffe056adadd26e69b968b9
2018-03-22 21:16:39 +01:00
Harald Welte ad2647b1b5 RSL_Emulation: Introduce LastActTable
The LastActTable stores a copy of the decoded RSL CHAN_ACT for
each channel number.  This can be used by a RSL_DchanHandler to
learn parameters of its own activation.

Change-Id: I629d66e27cbe4c8b02e704a7181b3bff843e9aa4
2018-03-22 21:16:33 +01:00
Stefan Sperling a2b5449f97 preserve uncommitted local changes in ttcn3 deps repositories
The previous Makefile rules would always overwrite uncommitted
local changes within repositories under the deps directory.

Let's assume that somebody who has local changes inside dependencies
knows what they are doing, and eliminate the risk of discarding
results of their work. Always skip repositories which contain
local changes. Only print a warning about such repositories.

Nothing changes for people who do not modify dependencies.

While testing this change, I noticed that the 'make distclean' target
was not reachable via 'make distclean', and I've fixed this as well.

Related: OS#3090
Change-Id: I0ee4ed70868b1c1efa39ad2bf200bf59ae2a2019
2018-03-22 12:56:54 +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 8d540f0d4e BSC_Tests: remove obsolete VTY configuration
The settings concerning the IPA ping are a leftover from the
time where osmo-bsc used an IPA multiplex to support the the
SCCP lite A interface dialect. Since the related code is now
removed and osmo-bsc has been migrated to libosmo-sccp and
real AoIP interface, the configuration is no longer needed.

Change-Id: If67cdba2a043c5dbf23f998659c5000db924a7df
2018-03-21 23:57:30 +00:00
Harald Welte 60aa576a62 bsc: Add tests for assigning channels of all 5 codecs
This tests if the BSC is chosing the correct codec during the assignment
procedure.

Change-Id: Ia67c09fa725eff48ec56779f8674ddcaa08a8793
2018-03-21 22:48:18 +01:00
Harald Welte 6fa1f73346 MSC_ConnHdlr: Fix RlsChannelNr encoding in f_ChDesc2RslChanNr()
Make sure that the "tag" member of the RslChanelNr sub-structure
is always initialized.  This can be achieved without any extra code
by using the existing templates rather than hand-coding it.

Change-Id: I990ac8ac0ce51e11f1d683382c9fc2d4e1201aa7
2018-03-21 22:48:18 +01:00
Harald Welte e97eab4da4 bsc: Allow multiple subsequent calls of f_MscConnHdlr_init()
If the function was called once, don't start another VTY/telnet
component.

Change-Id: I47bdeb0417a6814ed3a3f5c0c5797bd1bc7a59ba
2018-03-21 22:48:18 +01:00
Harald Welte 3618d9d748 RSL: Add tr_RSL_ChanMode
Change-Id: I938b8898db1cd9638cf2858b3b593fa3fd39bf1e
2018-03-21 22:48:18 +01:00
Harald Welte dbd6b3f8ca Add BSSMAP SPDI definitions (speech/data indicator octets)
Change-Id: I3b81ea995667a4c9ffaf0f6891766d5b5af20636
2018-03-21 22:48:18 +01:00
Harald Welte a0630034bd bsc: Move TestHdlrParams to global per-component var g_pars
Change-Id: Ifd811bab7719b205a6174e3f6ba367643dfcb0ec
2018-03-21 22:48:14 +01:00
Harald Welte 458fd37fb9 don't use setverdict(inconc) anymore. Use 'fail' at all times
The problem is that Junit-XML doesn't have a mapping for inconclusive
results, and hence they show up as 'passed'.

By introducing this change, we make sure all tests that don't pass
show up as failed.

Change-Id: Iddd13d0055c91f9bd304ce9833fba0485abf4c4e
2018-03-21 11:27:48 +01:00
Stefan Sperling 61c11e9234 make management of osmo-ttcn3 git repository dependencies automatic
Add rules to deps/Makefile which ensure that 'make deps' puts the git
repositories of dependencies into a known state. In particular, set
the origin remote url to a known value, and check out a known commit
into the work tree.

This change ensures that ttcn3 builds run with 'make' will always use
correct versions of dependencies.

The 'make update-deps' now has the same effect as 'make deps', but it
is not yet removed in case build scripts rely on its existence.
The new 'make deps' target is fast enough to be run before every build.

Change-Id: I561eee7e12d976cd2265ba1bb8cd22dd8c1a0735
Related: OS#3090
2018-03-21 10:25:29 +00:00
Pau Espin feb6fa4413 log_merge.sh: Fix removal of log files
Files are not being expanded and fails:

Removing Input log files !!!
rm: cannot remove 'GGSN_Tests*.log': No such file or directory

Change-Id: I74e1f00c5e2b41668ebf2060f547fcc01212956d
2018-03-20 22:21:57 +01:00
Stefan Sperling 7b5e178290 make ttcn3 RNC paging tests pass
We do not implement paging by RNC. Fix test expectations accordingly.

Change-Id: I490fdaa9a73565c7e53e9a7eeafa0ee89c29b9d8
Related: OS#3073
2018-03-20 19:32:43 +01:00
Stefan Sperling 049a86ee1e add regression test for paging with unknown MCC/MNC
Verify that the BSC does not page a subscriber when a cell identifier
with an unknown MCC/MNC is provided by the MSC.

This test introduces a magic value which represents an unknown MCC/MNC
combination: MCC=678 MNC=f90

Change-Id: I0b0af14a9a1cb7e5a7a4ec12cc489473fd7ead02
Related: OS#2980
2018-03-20 15:51:00 +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
Harald Welte 04b5ec3ec7 fix regression in start-testsuite.sh (false shellcheck advice)
Change-Id: If05d13c0dedfedf517005e5418acc677ddc5e75f
2018-03-18 23:10:01 +01:00
Harald Welte 8734231093 Osmocom_VTY_Functions: Less logging verbosity
We don't need to print all prompts at start of every test case

Change-Id: I32d13b6f97f76ab6057cc213c1698c1eb97b9d90
2018-03-18 22:46:14 +01:00
Harald Welte bdb3c45a38 msc: Fix TC_cl3_{no,rnd}_payload
It may very well be that the MSC is first accepting the SCCP connection
and possibly sending a L3 (error) message before clearing/closing
the SCCP connection in case of errors in the COMPL L3 info.

Change-Id: I4cf08608413e9e1fb54848849baed79204f5dcd1
2018-03-18 22:46:14 +01:00
Harald Welte 96505f0fa0 BSSMAP_Emulation: handle zero-length L3 Info in f_bssap_l3_is_rr()
Change-Id: I5666911d67388347d04724635cf6f56e164a82f8
2018-03-18 22:37:34 +01:00
Harald Welte edbab816ba MSC_Tests: Fix to use 2-digit MNC
Until recently, OsmoMSC didn't distinguish 2-digit from 3-digit MNC,
and the config file states '42' as MNC while the tester used '042' in
several locations.  This causes almost all MSC_Tests fail with recent
osmo-msc.

Let's fix the tests to use '42', as they should always have.

Change-Id: Id02bfd74127cf5551923912934240035106a8a4e
2018-03-18 17:09:02 +01:00
Harald Welte ae5791defd start-testsuite.sh: Use shellcheck to harden script
Change-Id: Iaf887da7ad95ba8b1fe93fe6c29f0518961d2fbb
2018-03-18 15:22:39 +01:00
Harald Welte b537461a9c log_merge: Use shelcheck to harden the script
Change-Id: I1b3a35b5f7ada2dbb0401a5d90a77a53979e1183
2018-03-18 15:22:39 +01:00
Harald Welte e1f9b74602 log_merge: Fix input filename pattern
Change-Id: Iece1063403673a65007f41b6955e384a67acd45f
2018-03-18 15:22:39 +01:00
Harald Welte d45cef33b2 log_merge.sh: Use Module.Testcase like the pcap files
So far, pcap files used Module.Testcase.pcap while log files
used Module-Testcase.merged - let's unify this a bit.

Change-Id: I900ae41c3586bad41451bbcf481963384c6db061
2018-03-18 14:37:37 +01:00
Harald Welte e3cae215c9 Make Console Loggign a bit more verbose: add all USER "log()"
Change-Id: Ib5a78079dd31def39fb649a4e7dc027c53692abc
2018-03-18 14:16:37 +01:00
Harald Welte 5a78e109da add log_merge.sh script to generate per-testcase merged logs
Change-Id: Ife6153d2cc10f85e79e8df7a0e34a44648618976
2018-03-18 14:16:37 +01:00
Harald Welte 30010711f5 selftest: Remove unneeded broken symlink
Change-Id: I41f062e7658665e13d7ccbfecd6c5788d9b37a75
2018-03-18 12:52:23 +01:00
Harald Welte c87abfcb60 Remove M3UA/MTP3/SCCP code from this repo, use upstream repos
Originally, this code was not yet in an official upstream git repo.
However, it has been for many months, so let's remove our local copy
and use upstream git repositories like for all the other modules.

Change-Id: I2c616fb865df32cfec323d42e5d0d06de40c497b
2018-03-18 12:52:20 +01:00