Commit Graph

20 Commits

Author SHA1 Message Date
Pau Espin 8c74cbbf5a sgsn: Introduce test TC_rim_eutran_to_geran
GTP_Templates.ttcn new templates use BssgpCellId, hence it depends on Osmocom_Gb_Types.ttcn.

Related: SYS#5314
Change-Id: I9dcf6ee2dc55bc6aba178eca30080233254f025e
2021-05-17 20:33:00 +00:00
Harald Welte f82985484b ggsn: Add TC_pdp4_act_deact_ipcp_pap_broken()
This test case reproduces a real-world PCO capture including a broken
PAP AuthenticationReq.  It triggers some weird behavior in OsmoGGSN
1.3.0 where it would send duplicate IPCP repsonses and no PAP response.

Change-Id: Ie89d984ed9e26fbbb2e4914bdb8623446d462a4c
Related: OS#3914
2019-07-03 16:24:19 +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
Stefan Sperling c479e4fa3b test GGSN support for optional GTP-U sequence numbers
Add VTY functionality to GGSN tests, and use the VTY to enable/disable
GTP-U Tx sequence numbers in the running osmo-ggsn.

The GTPU packet template now makes sequence numbers optional.
A template created with its sequence number set to 'omit' will result in
a packet without a sequence number, i.e. the 'sequence number present' bit
in the packet header is cleared, and the sequence number field is omitted
from the encoded GTPU T-PDU packet.

Re-use the existing TC_pdp4_clients_interact() test for testing the
behaviour of osmo-ggsn. This test is now run twice, once with and
once without GTP-U Tx sequence numbers. Verify that packets relayed by
osmo-ggsn match its "g-pdu tx-sequence-numbers" configuration setting.

Change-Id: I1dc299407c61b1c865035add44067b8ab89001b3
Related: OS#2519
2018-04-06 12:43:25 +00: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 c69cf4e933 ggsn: Move GTP templates to separate GTP_Templates + Add GTP_Emulation
Change-Id: I384e59738a9e0fc0186b69f0806f217a2a8d8a4b
2018-02-18 10:26:54 +01:00
Harald Welte 328eb6d535 move GTP_CodecPort from ggsn to library (for sgsn reuse)
Change-Id: If1b25f3c4705fcf4763886b54c5ef1f7ae08628f
2018-02-18 10:26:45 +01:00
Max 6367d7b807 Don't symlink non-existent file
Change-Id: I10309f07fb207c027703f0b43a478c152a029b6d
2018-02-05 16:58:27 +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 6807982106 Makefile: clone dependencies into 'deps' folder
We used to rely on out-of-tree git clones to be prepared by the user.

This commit changes the system to make sure we clone all git repos
we depend upon into the 'deps' folder, and then setup the symlinks
to that folder.  As a result, we should be able to support
self-contained builds using the makefiles in this repo.
2017-12-12 16:30:53 +01:00
Harald Welte 71a36023dc ggsn: Verify presence of DNS addresses in IPCP of PCO
If we request DNS in IPCP in PCO, we also expect a corresponding result.
2017-12-04 19:04:24 +01:00
Harald Welte 874f24bed5 Remove BSSAPP, BSSGP, BSSMAP, GTP, GTPv2, ISUP, LLC, MobileL3, NS, SNDCP
All of those now have separate upstream repositories on git://git.eclipse.org/gitroot/titan
and we don't need to keep a copy around
2017-11-19 10:07:54 +01:00
Harald Welte 244cd8acf7 sysinfo: Fix the TC_telnet test case VTY command order 2017-08-26 09:25:20 +02:00
Harald Welte 303c19ad63 Add Native_Functions module for inet_addr / inet_ntoa 2017-08-19 13:52:36 +02:00
Harald Welte ddeecbb4ed GGSN_Tests: Make SGSN and GGSN addresses configurable via modulepar 2017-08-19 11:50:08 +02:00
Harald Welte f1471e79cc link/use IP and ICMPv6 ProtocolModules
We will use them for router solicitation/advertisements soon
2017-08-09 01:34:51 +02:00
Harald Welte 627c7c7dfa Revert "GTP: Attempt to use UDP_Testport instead of IPL4asp"
This reverts commit a967f3f50e.
2017-08-03 18:17:02 +02:00
Harald Welte a967f3f50e GTP: Attempt to use UDP_Testport instead of IPL4asp 2017-08-03 18:06:57 +02:00
Harald Welte 379d45aba6 initial template for GGSN / GTP test cases 2017-08-03 09:55:15 +02:00