Commit Graph

194 Commits

Author SHA1 Message Date
Pau Espin 494e8b3e55 Start BSSGP_CT and NS_CT as alive-type component in all testsuites
This was already done in PCU_Tests and Gbproxy_Tests, let's to it
everywhere.

Change-Id: I6e3b08710b4502e2b9805f7c9f7bd89f34e4085c
2022-02-24 11:47:43 +00:00
Pau Espin 17e0f8c5a0 break GTP_Templates dependency on Osmo_Gb_Types, BSSGP_Types, NS_Types
The resulting set of dependencies needed just to have one simple CellId
struct is huge. That was fine for sgsn testsuite since anyway those were
being used, but it's not acceptable for other testsuites (hnodeb) which
only really require the GTP side.

After this change, GTP_Templates only requires GSM_Types, which ends up
in a much smaller subset of dependencies being pulled in.

Change-Id: Icd8234908af445b798517fe110cd0648969179a4
2021-12-09 15:25:50 +00:00
Oliver Smith f8fe1329e2 regen_makefile.sh: set executable name explicitly
Set the executable name in each regen_makefile.sh explicitly with -e,
instead of having it set indirectly from the first .ttcn file. Make it
consistent by placing the name on top of each of these files.

Fix for warning:
ttcn3_makefilegen: warning: File `BSC_Tests.ttcn' was given more than once for the Makefile.

Related: OS#5252
Change-Id: I5ed03f8f3ed905483620dc7bae33b617bbb8507f
2021-10-13 11:12:22 +02:00
Oliver Smith 2e0e624060 regen_makefile.sh: files/flags in separate lines
Make all regen_makefile.sh more readable and diff friendly by moving
each entry in FILES and CPPFLAGS_TTCN3 into separate lines. Order
entries alphabetically.

Related: OS#5252
Change-Id: I6b6866eb9f6ec6232e4ae434517457a4c8c1c050
2021-10-12 16:35:01 +02:00
Neels Hofmeyr cb8d9894af update expected-results.xml files
Change-Id: Idcf764cd2d251210bb123d2a5ea782cda0d670b7
2021-07-05 13:11:14 +02:00
Vadim Yanitskiy 60fcc63f48 SGSN: fix using non-existing VTY command for encryption
Change-Id: I366ccd5a562c86e6df79bbc200fb46d1aef69b39
Fixes: [1] Iad65cbf9840aa883cb34e53554b94a4142c82638
Related: SYS#5324
2021-07-04 01:02:34 +02:00
Eric Wild c555be597f sgsn a54 tests
This adds a few tests that ensure that the encryption algorithm dynamically chosen is
1) one actually supported by both the sgsn and the UE
2) the strongest one available both have in common

Change-Id: Iad65cbf9840aa883cb34e53554b94a4142c82638
Related: SYS#5324
2021-06-16 06:32:53 +00:00
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
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
Pau Espin dab2fbd897 sgsn: TC_bssgp_rim_single_report: Avoid useless component start
The componenet is not needed/used at all, so there's no need to start
it.

Change-Id: I63baadbb8b09843a653d3f5c11df204f5a1a761e
2021-05-04 16:41:57 +02:00
Pau Espin 7bac69f253 sgsn: Fix default value for mp_ggsn_ip
Make it match the osmo-sgsn.cfg files present in the same directory.

Change-Id: I798b3c8b6e4a4787b8a9d5ecd9d2b1aad2b931ee
2021-05-04 15:53:47 +02:00
Harald Welte 79ed4b1685 remove deprecated 'logging level all everything' from configs
it has been deprecated in libosmocore.git 2.5 years ago:

commit 7e0686c6b4b456ec4e6e15689694b1bcf96c301f
Author: Neels Hofmeyr <neels@hofmeyr.de>
Date:   Mon Sep 10 20:58:52 2018 +0200

Change-Id: Ieb9e958278e7bb9d5e798f83b70dcb873a25d06d
2021-04-21 16:40:49 +00:00
Harald Welte d73ba5801c ns/gbproxy/sgsn: Update configs to use logging level lnssignal'
In libosmocore I34b8fde2955ecc010d1dcd9512e1bba9211e2c0d we introduced
a new log subsystem; enabel it in the related configs here

Change-Id: Ie3d178e68aa81d5636c87940074cb6582ac2f131
2021-04-21 07:17:38 +00:00
Harald Welte 424ec5211c SGSN: Some initial SNS tests for IP-SNS in OsmoSGSN
Change-Id: I821d998704756fa30278f41d0371051db9d3fc58
2021-04-01 21:27:33 +02:00
Harald Welte 09e04ba648 sgsn: sync config files with those from docker-playground.git
Change-Id: Ice00a0a4d00629e30b4fec029353d590eba8877f
2021-03-20 15:41:36 +01:00
Harald Welte d5836dca12 sgsn: Avoid race condition in TC_suspend_rau()
In f_routing_area_update() we are sending a RAU Complete to the SGSN
and then immediately afterwards send a GTP-U from the simulated
GGSN to the SGSN.  That GTP might reach the SGSN faster than the
RAU Complete, resulting in a test failure.

Change-Id: Ic489e0857115cf24965e413a39918edc5a8f44f8
2021-03-20 15:40:00 +01:00
Vadim Yanitskiy 418e806df5 SGSN_Tests: add setverdict(pass) to TC_bssgp_rim_single_report()
Change-Id: If5295cc8eccda2d1b3baae7d2169fac5da2a085c
2021-02-28 16:27:12 +01:00
Vadim Yanitskiy 7bc13eae26 SGSN_Tests: fix coding style in TC_bssgp_rim_single_report
Change-Id: I667c1e8a94393e2b5afc6e2e3f7503b73198822c
2021-02-28 16:26:03 +01:00
Harald Welte dd9fb84b58 sgsn: Fix regression regarding g_pars.bssgp.cell_id[] array overflow
This was introduced in I7d859fd710dba96eb9b46c428243281183e1be12
and caused Iu related TTCN3 tests to fail with:

SGSN_Tests.ttcn:771 Dynamic test case error: Index overflow in a value of type @SGSN_Tests.BssgpCellIds: The index is 3, but the value has only 3 elements.

Change-Id: Iaae0015f5e7c7eabc426add91b5de1b63bf6d9f6
2021-02-16 20:43:56 +01:00
Pau Espin 7c05216e01 sgsn: Introduce tests for several cell change related scenarios
Test TC_cell_change_different_ci_data provides test case for
fix in osmo-sgsn.git Change-Id I2c14e1d65575f54212924f7c5f0a2f4c1b76ec81

Related: SYS#4909
Change-Id: I2158685bf817d4bf064bb4d2ef5aa96ca252fe21
2021-02-16 17:31:37 +01:00
Pau Espin d792b9e122 sgsn: Fix f_process_attach_accept on ran_index != 0
Change-Id: I7d859fd710dba96eb9b46c428243281183e1be12
2021-02-12 20:15:02 +01:00
Pau Espin deaaa90e43 sgsn: Fix f_cellid_to_RAI
Change-Id: I4f6d609119b4a9e211fb1b285e4fc3e42d8ebdb6
2021-02-12 18:48:47 +01:00
Alexander Couzens 61c5532366 sgsn: change configuration to the new NS2
Change the whole vty configuration for NS to be more flexible
and support more setups. Old configurations are invalid.

For further information see:
https://osmocom.org/projects/libosmocore/wiki/Network_service_(NS)

Depends-on: If5bd6b86e130772e6c93d640b0c637985416136d (osmo-sgsn)
Change-Id: I37d010bc4ae553c30feb2ebd2be66d23b96bf42a
2021-01-28 21:29:01 +01:00
Harald Welte be7afce974 NS_Emulation: Respect data_weight==0 or signalling_weight==0
* allow configuration of signalling + data weight for each NS-VC
* advertise per-NSVC signalling/data weight in SNS-CONFIG
* keep track of unblocked NS-VCS separately for data / signalling
* transmit BVCI=0 traffic only over signalling NS-VC
* transmit BVCI>0 traffic only over data NS-VC
* accept incoming BVCI=0 traffic only if signalling_weight > 0
* accept incoming BVCI>0 traffic only if data_weight > 0

Related: OS#4953
Change-Id: I9798e639b4bc8658482945970775b012b5840779
2021-01-20 15:56:31 +01: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
Alexander Couzens 7d8c0e3b35 update expected-results.xml
Change-Id: Ib4399aa488afd917e3eda5e79d56ea3797ef7c78
2021-01-14 21:40:30 +01:00
Philipp Maier 7df55e0c42 SGSN_Tests: test RIM message passing
Add a testcase to test if RIM messages can be passed on the SGSN back
and forth.

Related: SYS#5103

Change-Id: If0ab08dcdc28819740cc07fd4dc1fea47ba10843
Related: SYS#5103
2021-01-05 15:30:19 +00:00
Harald Welte 9b461a94a3 sgsn+pcu: Port suspend/resume cases to new BSSGP_CT:GLOBAL port
For 12+ days, suspend/resume related SGSN + PCU TTCN3 tets have been failing.

It was the introduction of the BSSGP_CT:GLOBAL test port in
I40d973d80709f5d56f59247e8647b52754f09bc8 +
I805372f3024a0ec2491a24422e02c0bc6dc669d2 which caused the related PDUs
now to no longer show up where they used to.

Change-Id: I1977302fef4868dc1c330bc6f48f6a6608949393
Closes: OS#4902
2020-12-10 23:42:03 +01:00
Harald Welte 4d112c926c BSSGP_Emulation: Allow a "CreateCb" to handle unknown inbound TLLI
The existing BSSGP Code assumed that the TLLIs were always known "a
priori" by the test case.  With the newly-introduced create_cb,
the user can provide a function to handle any incoming messages for an
unknown TLLL.  The default handler behaves like before: fail +
terminate.

Change-Id: Ice0e145f5a6518ff79547dd851042b7965f38e00
2020-11-16 19:13:26 +00:00
Harald Welte 90f1974fb0 NS_Emulation: Support multiple NS-VC within one NSE (NS-VCG)
This is something we need to simulate more complex scenarios,
particularly in the context of frame relay.

Change-Id: If1220852785853f8a5d8de183d5053ddd6ccb958
2020-11-12 20:02:07 +00:00
Harald Welte 5339b2e372 BSSGP_Emulation: Support multiple PTP-BVC within one Entity
The existing BSSGP_Emulation is built around the assumption that every
instance of BSSGP_Emulation only servers one signaling-BVC and one
PTP-BVC.  While this is true for osmo-pcu at this point (BTS-colocated
PCU), other BSS/PCU implementations differ.

In general, there can always be any number of PTP BVC (one per cell)
next to the signaling BVC (one per BSS).  Let's represent this in
BSSGP_Emulation so we can create more comprehensive tests.

Change-Id: I7e30b4c4e188518a574e082962fba457b3a97ce3
2020-10-09 12:27:11 +02:00
Harald Welte 18ed23cda5 regen-makefile.sh: Put libraries in LINUX_LIBS, not LDFLAGS
Additional libraries to be linked should be in LINUX_LIBS (appended at
the end of the linker command), not part of LDFLAGS (prepended to
the beginning of the linker command).

On binutils 2.35.1 / Debian unstable, without this patch, I get

/usr/bin/ld: IPL4asp_PT.so: undefined reference to `sctp_bindx'
/usr/bin/ld: IPL4asp_PT.so: undefined reference to `sctp_connectx'

which is resolved by this patch

Change-Id: I8a339076f445e3c650e407ae982c7c2dc4a760b2
2020-10-04 21:09:11 +02: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
Harald Welte 5e8573e9b7 NS_Emulation: Prepare NSConfiguration for non-IP providers
NSConfiguration currently contains parameters relevant only for IP
based transport.  Move IP/UDP parameters into a sub-structure in
anticipation of Frame Relay support.

Change-Id: I6904520d8c2f546327029777d68b1907611a8cf5
2020-09-27 09:15:32 +00: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
Alexander Couzens 299ec648dc SGSN_Tests.cfg: fixup renaming remote_proto -> address family
In an old version of the PCUIF version 10 this field was named remote_proto
but got renamed into address_family before it was merged.

Change-Id: Ia49169afe2db2503e99b62bb55639b2aeea546f2
2020-09-25 01:31:44 +02:00
Alexander Couzens eaab57ea5a sgsn: update expected-results.xml
Change-Id: Ic06dc761508addd0e2ca85d0cd9f996f13cf84fb
2020-09-18 08:37:11 +00:00
Alexander Couzens 2416830547 sgsn/SGSN_Tests.cfg: also run Iu tests
Change-Id: Ia6ee4b2776cfbb9295334617d8c201c21d1663f7
2020-09-18 08:36:50 +00:00
Harald Welte e18fccd5ab {PCU,SGSN}: Add missing address_family field in NSConfiguration
Change-Id: If63a96ec7ad28e87ff8bd18bf189d9395dda9c0d
2020-09-18 01:03:46 +02:00
Alexander Couzens e0f7c543b7 NS_Emulation: remove dependency on PCUIF_Types
The dependency of PCUIF_Types creates also a dependency on

Replace the PCU_AddrType by an unix like address family defined
in the Osmocom_Types to reduce the dependency.

Change-Id: I0b4fda96accef401ffc009010f9f5621583fd6dd
2020-09-17 23:29:16 +02:00
Harald Welte 60408e3f57 Don't map NS_Emulation_CT:NSCP anymore
NS_Emulation_CT:NSCP used to be a NS_CODEC_PT, which is a translation
port on top of the IPL4asp.  Such ports need to be mapped to a system
port at start-up.

However, in I4d0b7ad0ed9447a038dd3eeee2b975146d10fba0 we introduced
a new underlying component called NS_Provider.  Hence, NSCP is actually
connected to that underlying component, and no longer mapped.

The corresponding change in pcu/SGSN_Components.ttcn and sgsn/SGSN_Tests.ttcn
has unfortunately been missed in the above-mentioned change.  Fix that.

Change-Id: I4c085210e6021e38a38ebc052ec3d9b345638cd2
2020-09-17 20:32:37 +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
Harald Welte 557c9f8cb8 move some key types from GSM_RR_Types to GSM_Types
This in turn means Osmocom_Gb_Types doesn't need to depend on
GSM_RR_Types anymore, which is particularly ugly as the latter
now depends on RLCMAC_*, creating a long chain of dependencies.

Change-Id: I8c8da7709695ff0023f71b3999291e2515b22e46
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
Harald Welte 8e5932e563 sgsn: Add series of tests on suspend/resume and paging behavior
Let's test whether paging is triggered after T3314 expiration, as well
as suspend and explicit and implicit resume work as expected

Change-Id: I83b7a453958e30dfc727ba3140168217c209833f
Related: OS#4616
2020-06-18 13:36:18 +02:00
Harald Welte a5c71cdefe sgsn: Allow f_gtpu_xceive_mt() to verify non-forwarding case
In some scenarios we do not expect a PDU from GTP to show up on
the Gb side.  Let's add support for this.

Change-Id: Ia9fde1d433657c920ee1ec4d41004f4544ceb346
Related: OS#4616
2020-06-18 13:33:43 +02:00
Harald Welte f2f3c9bf79 sgsn: Add functions for BSSGP suspend + resume procedure
Change-Id: Ib1e370e2c5fe774029f459ef991fb9ac777f5631
Related: OS#4616
2020-06-18 13:32:53 +02:00
Harald Welte 15fbaa4748 sgsn: Add BSSGP_SIG port to ConnHdlr
So far, the ConnHdlr components were only able to exchange BSSGP PDUs
on the PTP BVC, but not on the SIGNALING BVC.  For this, we need to
actually connect to the BSSGP_SP_SIG that BSSGP_Emulation provides.

Change-Id: I4482a24e4808ac2fe04401224f628606d8207416
Related: OS#4616
2020-06-18 11:28:42 +00:00
Harald Welte 64d6b51818 sgsn: Fix comment [cosmetic]
Change-Id: I320bce9af64edf0cfb6f600d9a4c19b73153c805
2020-06-18 11:28:42 +00:00