Commit Graph

25 Commits

Author SHA1 Message Date
Pau Espin e8d7d16f13 Split templates in RLCMAC_{CSN1_}Types into their own _Templates file
RLCMAC blocks have a lot of fields and we will potentially require lots
of different templates, as well as functions to handle related structs.

Change-Id: I9c6597178168aa3848b21930f33be698dd2ce545
2020-04-29 19:07:38 +02:00
Pau Espin 8f24571e56 pcu: Introduce test TC_mo_ping_pong_with_ul_racap
Test sending MS RA capabilities through Packet Resource Request to
update GPRS multislot class.
EGPRS multislot will come in a later commit.

Change-Id: I5026d8b78a3fb82093956b65989d18fa6f6d5424
2020-04-28 16:01:18 +00:00
Pau Espin fe0c6083bd Depend on our own fork of titan.ProtocolModules.BSSMAP
Since we use some BSSMAP extensions to signal Osmux, we need to maintain
our own fork of BSSMAP_Types in order to supports those IEs in BSSMAP
RESET and BSSMAP Assin Req/Compl. Hence, switch all build componenets to
fetch and use our fork.

Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af
Change-Id: Ic8debe5f3ffe8e1d4258fa6b4632a3871b99af40
2019-05-21 10:28:53 +00:00
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 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 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
Daniel Willmann d93047434b Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
This function can now be called from anywhere to try and safely shutdown
a testcase. It is not optimal as we can't call "all component.stop" from
outside the mtc, but without any proper and orderly shutdown handling of
all our emulation components I believe this is the best we can do.

To use it:

import from Misc_Helpers all;

in your module and then call

Misc_Helpers.f_shutdown(__BFILE__, __LINE__);

You can also pass the function a verdict and a message and it will take care
of calling setverdict, but beware of the following:

While setverdict would accept any number of arguments as log message
and convert them to a log string f_shutdown expects one charstring.
It's possible to use the log2str function to use the log arguments in
setverdict for f_shutdown, for example

setverdict(fail, "Template didn't match: ", tmpl_foo);
would become
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Template didn't match: ", tmpl_foo));

Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
2018-10-24 15:10:13 +02:00
Harald Welte 18314435e9 Add SGsAP_Templates for SGsAP on the MME<->MSC interface
Change-Id: I435dab312fc4965c69ffb9cc22917539ebab93e7
2018-10-10 20:33:21 +00:00
Harald Welte b409ff2819 move USSD_Helpers.ttcn to library
We want to use those also from the HLR_Tests, not just from MSC_Tests.

Change-Id: I22be6c03d85dc6d6a8266b5ebce5d0c69c0551ed
2018-08-07 23:32:32 +02:00
Stefan Sperling c307e689b4 introduce a TTCN3 test suite for SCCP
This test suite acts as an SCCP server on top of M3UA.

SCCP tests are run against the sccp_demo_user program which
can be found in libosmo-sccp/examples. This program must be
started in client mode: sccp_demo_user -c
The SCCP test suite should then work out of the box with
the provided SCCP_Tests.cfg file and this additional change
to sccp_demo_user default point codes:
https://gerrit.osmocom.org/#/c/libosmo-sccp/+/9652/

There is currently only one test, for the libosmo-sccp crash
reported as issue OS#2666. The implementation of this test
is currently using an ugly workaround due to shortcomings of
the M3UA Emulation layer (see source code comments). Whether
a better solution is feasible is still to be determined.

The test requires a patch to the SCCP Protocol Emulation which
has been submitted upstream: https://git.eclipse.org/r/#/c/124552/

Change-Id: I03f5e8b282a7396b45417495c88d8fb81b26cda8
Related: OS#2666
2018-07-24 19:05:10 +00:00
Vadim Yanitskiy 9201554c53 msc: introduce USSD helper functions
Change-Id: Ic528b968a9bc7c12e8395364e895400aa016c8f5
2018-06-02 04:55:18 +07:00
Vadim Yanitskiy 8c34922c77 msc: import GSM 7-bit coding functions
Change-Id: Ie8dd865d0c4c64827284c737d431e6c87b3d0847
2018-06-02 04:55:18 +07:00
Harald Welte 69bce3bc4d msc: Add Encoder/Decoder for Supplementary Services
The many SS_* types depend on MAP, whcih in turn depends on ROSE.
Add all of this to the MSC testsuite so we can do SS related testing.

Change-Id: If5084decb5391736ab5cadd86adb2ffa78e7140f
2018-05-31 13:30:18 +00:00
Harald Welte 32ff8b90f4 msc: Add SMPP_Emulation + SMPP_Templates
Change-Id: I80efe16f603227694c6242d556ae77590271e4c6
2018-04-14 21:58:16 +02:00
Harald Welte 384f4fee23 msc: Add SMPP_CodecPort
Change-Id: I57640ccc5370d6820bc303003e162f27ddc9fcfd
2018-04-14 21:58:16 +02:00
Harald Welte 51affb6e03 L3_Templates: Introudce constants for tiFlag
... this makes the code more readable/understandable.

Change-Id: Ic06eb2016eb9979b8556366e4a909f3c0336aa92
2018-04-09 18:19:36 +00: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
Neels Hofmeyr cd11223c0f ignore results of .ttcnpp files
Add another macro ignore_pp_results to gen_links.sh.inc and call from all
gen_links.sh files, to add results of *.ttcnpp files, i.e. generated *.ttcn
files, to .gitignore.

Change-Id: Ic7fb176226771212d7700dafaf27ac71f12a4a61
2018-03-16 18:25:58 +01:00
Neels Hofmeyr 53fb0cf22b gen_links.sh: auto-generate .gitignore files to ignore symlinks
In each subdir that is a target for symlinks, automatically ignore the results
of gen_links():

- At the top of gen_links.sh.inc, clear the .gitignore.
- In the loop, add each link name to the local .gitignore.
- In selected gen_links.sh, there is also a "manual" link creationg. So that
  this also ends up in the local .gitignore, have the link creation as separate
  gen_link() macro which at the same time adds to ./.gitignore.
- in the root .gitignore, ignore all the subdirs' generated */.gitignore files.

Change-Id: I73c11fe8362358bf7e1bdf0e1be53399b5d3351b
2018-03-16 00:08:08 +01:00
Neels Hofmeyr 1a4c4601d7 fix gen_links.sh: don't include source dir as link target
First of all, use one common place to define the gen_links() macro, in
gen_links.sh.inc.

In this new file, add a 'shift' to exclude the $DIR arg from also appearing in
$FILES.

This prevents the following wrong symlinks in the source dirs:

  M3UA_CNL113537/src/src
  MTP3asp_CNL113337/src/src
  SCCP_CNL113341/src/src

Change-Id: Ia8493e77df1ba8723f2c5d2a49816247b0fb55f7
2018-03-16 00:08:02 +01:00
Harald Welte df277258f1 IPA_Emulation: Make dependencies to RSL/MGCP/SCCP/GSUP conditional
Let's use the preprocessor to avoid IPA_Emulation pulling *all*
dependencies into each and any of our projects.  The code readability
suffers a bit from the many #ifdefs, but compilation speed increases
if we don't have to pull in all those (recursive) dependencies.

After all, a BTS test case will never need SCCP, GSUP or MGCP.

Change-Id: Ic0231adbd2171214de133d26b3fbf36130ee8aa0
2018-02-20 16:17:17 +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
Max 6367d7b807 Don't symlink non-existent file
Change-Id: I10309f07fb207c027703f0b43a478c152a029b6d
2018-02-05 16:58:27 +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