Commit Graph

17 Commits

Author SHA1 Message Date
Alexander Couzens bd6e9a1da9 RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
RAW_NS used previous a single TTCN3 port for a single UDP port
(source/listen side).
This has the limitation that only a single NSVC could be tested for a
local UDP port. However SNS tests require multiple NSVCs over a single UDP port.
NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation.
Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use
multiple NSVCs.

Related: OS#5036
Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976
2021-06-15 20:20:44 +00:00
Alexander Couzens c316572db1 RAW_NS: rework NS connection to use NS_Provider
Previous RAW_NS only supported NS over UDP because
it handled the UDP connection on it's own.
Because of this there was no cleanup function for the tests
because no virtual component were started.
Using the new NS_Provider allows to use the same tests over
UDP and FR with no changes.

Change-Id: I8a3b6c72798a75f434f54229fdbfc802cd13967e
2021-01-17 15:59:26 +00:00
Harald Welte 867243a3ec NS_Emulation: Add [optional] support for FrameRelay transport
This adds a NS_Provider_FR which interfaces between FrameRelay_Emulation
and NS_Emulation.  Include support for it only if enabled at compile
time to avoid pulling in a dependency on the FrameRelay stack for every
user of NS_Emulation.

Change-Id: I42ca811d23e383e362d2527c8ff2c916a62a5b42
2020-10-03 18:24:50 +02:00
Alexander Couzens 8e1dfd0d0f SGSN: introduce NS tests
Similiar to the PCU_Tests_NS introduce SGSN_Tests_NS.

Change-Id: Ib2bffbb110961474928f35d212cb492d4b6fdee0
2020-09-25 01:31:44 +02:00
Harald Welte 013d65af1e NS_Emulation: Introduce NS_Provider underneath NS_Emulation
This is a step to prepare the NS_Emulation for operating on top of
Frame Relay, not just UDP/IP.  We replace the NS_CodecPort (mapping to
a IPL4asp) with a newly introduced NS_Provider_CT, specifically a
NS_Provider_IPL4_CT.

This change removes any IP specific bits from NS_Emulation and moves
it into the newly-created NS_ProvideR_IPL4.

Change-Id: I4d0b7ad0ed9447a038dd3eeee2b975146d10fba0
2020-09-17 15:26:52 +00:00
Harald Welte 93331e736b BSSGP_Emulation: Make L3 (SM/GMM) decoding a compile-time option
This allows us to build low-level tests that don't require all of L3.

Change-Id: I7ef7e93e2cd1d37e7e4a62947ca8dfde30d93b95
2020-09-13 10:18:41 +02:00
Alexander Couzens 1e5dc48213 library/PCUIF_Types: version 10: support IPv6 NSVC addr
Change-Id: I13b03c380edc2dc609c5e4053462a3cd6f78ce72
Tweaked-By: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
Related: SYS#4915
2020-09-11 10:35:56 +00:00
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
Harald Welte 26fbb6e017 sgsn: Integrate RANAP
Integrate RANAP support to SGSN_Tests.ttcn.

Related: OS#2857
Change-Id: Ib62fc4c6007f6f4c47db7ca096a8d629bc72bb22
2019-08-18 17:12:46 +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
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 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 a2526a85d3 BSSGP_Emulation: Add SNDCP decoding support
Change-Id: Icd2e8feed9173b0a2729b7ee1cfac37a86eca6cf
2018-02-18 19:47:04 +01:00
Harald Welte eded9ad578 sgsn: First PDP CTX ACT test: TC_attach_pdp_act
Change-Id: Ia1bfaca99a2a70bb097e2ee44f54e4a31b849a1b
2018-02-18 10:57:02 +01:00
Harald Welte 5ac3149d99 First actual SGSN test case
Change-Id: Id66ddf8dbe1c5cfa96a087235588ba67763b7f05
2018-02-18 10:12:31 +01:00
Harald Welte 96a33b00c9 sgsn: Skeleton of a SGSN test fremwork
Based on the exsting NS/BSSGP emulation as well as the VTY, GSUP and
CTRL implementations, we are now building a test framework skeleton
for osmo-sgsn.

Change-Id: Icce90f9d8a680c7a523163e2c0bc03d12ff857e2
2018-02-16 20:03:47 +01:00