Commit Graph

2588 Commits

Author SHA1 Message Date
Alexander Couzens 7d8c0e3b35 update expected-results.xml
Change-Id: Ib4399aa488afd917e3eda5e79d56ea3797ef7c78
2021-01-14 21:40:30 +01:00
Pau Espin 9e04d5e039 pcu: Introduce test TC_pcuif_suspend_active_tbf
Related: OS#4761
Change-Id: I9538fbdc806eb26e93a0421b520c8d34de61f91f
2021-01-11 16:42:52 +01:00
Daniel Willmann 491af2a33e Fix race during shutdown
To avoid a dynamic test case error we need to prevent messages arriving on
unconnected ports. Waiting some time before stopping components ensures that
any messages "in flight" will be delivered to the port before the component
is shutdown and disconnected.

It would be far nicer to mark a testresult "final" and ignore such
errors on shutdown, but I don't think it's possible in TTCN3.

This fixes TC_fc_bvc on my laptop which consistently failed with a DTE
before.

Change-Id: I98928f24745125642225681d13bf2e78691e9747
Related: SYS#5115, OS#4518
2021-01-11 14:20:55 +00:00
Pau Espin 2889f87d20 pcu: Assign TLLI_UNUSED instead of string literal
Change-Id: I7a505527458ed716b7b0912e88c6fcf58e0ff044
2021-01-11 13:54:48 +00:00
Pau Espin 92c19081c7 rlcmac: Add template to match receival of Dl Ctrl message
Change-Id: Ifd16e8129b4440542b82a47749df1547a061ae88
2021-01-11 13:54:30 +00:00
Pau Espin 8bd54cf77a library: Add templates to initialize CellId, RAI, LAI
Change-Id: Ie9d86e1b651dff279e7d50a4282bf14fbed5bb76
2021-01-11 13:54:30 +00:00
Pau Espin 7b761e2850 pcu: Use TLLI_UNUSED constant everywhere
Change-Id: I0399e98dc726061ac272465288e2a4ba0a61be81
2021-01-11 13:45:40 +00:00
Alexander Couzens 0c96ff6dba NS_Emulation: remove unused variable res
Change-Id: I5cc25ccb8e0d169b6f85e597fda47fdd2130aa70
2021-01-11 13:42:45 +00:00
Alexander Couzens 6da7aaf6f1 NS_Provider_IPL4: fix typo in comment
Change-Id: Ieed010a15675b105807bc8c55bb0977fcb6aa7f3
2021-01-11 13:42:45 +00:00
Daniel Willmann c88df6de5a gbproxy: Enable IP-SNS towards SGSN
Change-Id: Ia9cb646d57cd3bf77aebf60318e5f76599d516a5
2021-01-11 13:11:04 +00:00
Daniel Willmann ef7015f321 gbproxy: Fix TC_bvc_reset_sig_from_sgsn
The port receive operation only considers the first message in the
queue. We need to drain unrelated status/reset messages, such as those
from PTP BVCs, otherwise the test never completes and times out.

Change-Id: I1f2c76ae9bdc0267bfca60536e321fe88530803c
Related: SYS#5115 OS#4518
2021-01-11 02:41:20 +00:00
Daniel Willmann 4c534bbf18 Fix suspend/resume tests
Ensure that a suspend/resume was sent before sending the *_(N)ACK. In
reality these can only happen together and our TLLI cache removes
the entries after it sees the corresponding (N)ACK so it will not
forward the second message.

Change-Id: Ie0fd81edb748d3c638e42c4418ca514095c55861
Related: SYS#4865, OS#4472
2021-01-11 02:33:03 +00:00
Pau Espin 9a5b8ffc5b CTRL: Introduce support to run osmocom CTRL server
Change-Id: I37db9962f51baf2c63bd58ec47ec89f773d7a255
2021-01-07 15:06:39 +01:00
Pau Espin ec2ee466b7 CTRL: Fix tr_CtrlMsgGet containing invalid value in val field
"val" field is not used in GET commands and is hence set to omit by
TTCN3 decoder.

Change-Id: If1a273a2be71040eaea2189a0aeaf737adf848e5
2021-01-07 13:35:15 +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
Philipp Maier b76a279edf Osmocom_Gb_types: add RIM templates
The template set we use for testing the GB (BSSGB) interface on
osmo-sgsn and osmo-pcu lacks templates to generate RIM (ran information
management) messages. The records and unions are already specified in
BSSGP_Types.ttcn, we just need to form templates in order to be able to
use them.

Change-Id: Ic495e0bb6ceb2b65cbc7c3da7ee519a013aede55
Related: SYS#5103
2021-01-05 16:28:20 +01:00
Harald Welte 14c0445cde deps/BSSGP: Use specific commit hash
Using "master" doesn't really work as the local master branch already
exists even if we change the 'remote' to a different URL, see
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21587

Change-Id: Id5f5ba52dbc9cd51dda2e91391c901b56756e2db
2021-01-05 16:26:07 +01:00
Alexander Couzens 0339df9178 gbproxy: osmo-gbproxy.cfg: support new sgsn syntax
osmo-gbproxy has a new syntax for sgsns to support pooling

Change-Id: I157dbbe42db4ed03861b914e91e49764b0b1a1bb
2021-01-04 16:28:12 +00:00
Alexander Couzens 4811484a0e gbproxy: change osmo-gbproxy.cfg to support ns2 vty2
All test case (except 3 which fails on jenkins as well) succeed.

Change-Id: I1c3fde35cec7fa0adf2bef7659dfc19bf301ffa9
2021-01-04 16:28:06 +00:00
Vadim Yanitskiy 79ebd5e4d3 BSC_Tests: fix f_recv_next_si1(): skip unmatched RSL messages
Since Idb453fc894584ccf4f5f8b45a24421db958e9478, osmo-bsc does send
ip.access specific Measurement Pre-Processing Defaults.  This message
currently blocks the 'alt' statement in f_recv_next_si1(), so all
test cases calling it fail due to the guard timeout.

What's even worse, both TC_si_acc_rotate() and TC_si_acc_ramp_rotate()
dynamically configure the IUT in order to re-generate and send System
Information messages periodically.  If any of them fails prematurely,
the related configuration parameters would remain active, so the IUT
would continue sending System Information messages, causing failures
in subsequent test cases.

Let's simply ignore all unmatched messages in the 'alt' statement.

Change-Id: I1a85a046e1a8ebcd494354dddcbcc9707fdf5ee9
2021-01-04 00:29:56 +01:00
Vadim Yanitskiy 7815f480dc BSC_Tests: fix expectations in TC_assignment_codec_amr_h_start_mode_4
Change-Id: I791602a0bb56e192c9263982b9f20ac0738281a2
Related: OS#4898
2021-01-03 22:13:36 +00:00
Vadim Yanitskiy b02e8020e3 BSC_Tests: drop redundant f_init() in f_test_si2quater()
There is a global boolean flag that would make f_init() return
early if it's called twice.  This is exactly the case here.

Change-Id: Ic33786c4851d2682deec7c22fafb99043c1c1cf6
2021-01-03 14:21:03 +01:00
Vadim Yanitskiy 292e5961af BSC_Tests: fix unreachable code after f_shutdown_helper()
This function does 'mtc.stop', so it must be always called last.

Change-Id: If2c991d6ac23e43aafd32814ca17cf2093cb1522
2021-01-03 14:18:51 +01:00
Vadim Yanitskiy 8ca840eb04 BSC_Tests: add missing f_shutdown_helper() statements
Change-Id: I1a89e3776d7705d3d54b096ef420b2bbe574ab07
2021-01-03 14:16:35 +01:00
Vadim Yanitskiy e18aebbeb2 BSC_Tests: fix early mtc.stop in TC_chan_rel_rr_cause()
Calling f_shutdown_helper() in f_tc_chan_rel_rr_cause() leads to
premature test case termination, so only one out of 6 cause values
gets checked.  Move it to TC_chan_rel_rr_cause().

Change-Id: Ic7df15b496fc0750e4f694b1ae79398216f498a7
2021-01-03 13:10:56 +01:00
Alexander Couzens d533890fa7 NS_Emulation.ttcnpp: complete SGSN emulation with SNS
The emulation of an SGSN with SNS was incomplete. The SNS
procedure was completed. However the NSVCs didn't moved
into an unblocked state.
Also sending a NS_ALIVE at the beginning is wrong.

Change-Id: I54c2d9d5b34d791be354298171d04180a9b263c3
2020-12-21 18:41:31 +01:00
Pau Espin Pedrol 8ab62e4911 cosmetic: bsc: Fix tab<->space indent
Change-Id: I8b8670fb820d258a5a56f3fdb007f7e59bfd374f
2020-12-18 16:19:11 +01:00
Alexander Couzens 195c9e70c2 PCU_Tests_SNS: improve SGSN originated BVC-RESETs
The BVC-RESETs are a little bit more complicated. The PCU will send
a BVC-RESET after the NSE become available.
Ensure the RESET is received and ignored so there is no race condition
if both sides send a BVC-RESET at the same time.

The test case TC_sns_1c1u_so_bvc_reset is still failing because the PCU can't
handle BVC-RESETs properly (both PTP and signalling).

Change-Id: Id681749d75073c1d50a4b0a2e86f0a2dd0955b45
2020-12-16 22:27:36 +01:00
Philipp Maier 8d09528ccf deps/Makefile: temporarily use own repo for ProtocolModules.BSSGP
Temporarily use titan.ProtocolModules.BSSGP_v13.0.0 from
https://github.com/osmocom/ as we have some fixes that are not
yet part of upstream.

Change-Id: I5d7261a5ac33a0231c1a3d73bdff7fb099568687
2020-12-16 15:39:40 +00:00
Vadim Yanitskiy f105a5b846 BTS_Tests: as_l1_sacch(): fix Measurement Report padding
According to 3GPP TS 44.018, section 10.5.2.20, we should pad with zeroes.

Change-Id: I912027fd53b12ff118254e941d6e5e696e1dd410
2020-12-13 12:08:29 +00:00
Harald Welte 036c4dcb30 gbproxy: Remove redundant part from config file
If a given setting is identical to the GBProxy_Tests.ttcn compile-time
default, we don't need to repeat it in the config file.

Change-Id: I3359f632eaf53bc602b1d10bb51de357f0eb2b45
2020-12-12 16:28:30 +01:00
Harald Welte 6929e329f3 gbproxy: Be mover verbose about BVC-UNBLOCK failure at start-up
Change-Id: Ic849e1f932de21a443cd0274e02e0f2ccd423515
2020-12-12 16:28:30 +01:00
Harald Welte 8132008573 ttcn3-dumpcap-start.sh: Always capture lo interface
The loopback interface should always be captured, as it includes
the 'ping' commands we use to detect the start of the packet capture.

Change-Id: Ic3aee59dd230141a5d182e9babf8d33d59144aa4
2020-12-12 16:28:30 +01:00
Pau Espin Pedrol 0bf74e560a pcu: Fix counter expectancies after LLC UI dummy frame fixes in PCU
Recent commit 7d0f9a0ec383fcfca934731bd6979b6be6629c90 in osmo-pcu.git
fixed situation where lots of unneeded LLC UI dummy frames where being
sent. As a result, osmo-pcu correctly counts less dl rlcmac payload
bytes being sent, so we must adjust our test expectancies.

Related: OS#4849
Change-Id: I01c34a0948094b17cc0d67e613cd9b756f78c372
2020-12-11 19:57:38 +00:00
Harald Welte ccee3a50c3 ttcn3-dumpcap-start.sh: Accept running as root or setuid dumpcap
Change-Id: Id97fb22e0018739a07e46ecaf26463248554f276
2020-12-11 17:22:26 +01:00
Harald Welte 5b11d91db2 ttcn3-tcpdump-start: Fix path of setcap
if we test if /sbin/setcap exists, we als should execute it from that
path, as running from a normal user doesn't have /sbin included in $PATH

Change-Id: I5131f869f86e6d136e0485da5e3749abbfc951e3
2020-12-11 15:34:42 +01:00
Harald Welte 7c29536975 gbproxy: Properly capture HDLC/FR traffic in addition to ethernet
We cannot use "-i all" but must list each interface separately,
which is only supported by dumpcap.  We also must write pcapng
files.

Change-Id: Id412af3bb6bcad5e0f2cf40a6dc497d7e4f3d948
2020-12-11 15:32:08 +01:00
Harald Welte dc805c00eb gbproxy: Fix log messages in timeout situations
Printing an unbound 'rx' variable when nothing was received due to
timeout is somehow not really useful.  Print what we expected to
receive.

Change-Id: I4fee89baa954736ae8298b63667297dd57d8ec4f
2020-12-11 11:00:08 +01: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 cc3894b612 gbproxy: Add test for FLOW-CONTROL-MS procedure (TC_fc_ms)
Change-Id: Ie087ee8e8adfb963d21f35c60628214d4297250d
Closes: SYS#5210
2020-12-10 22:13:25 +01:00
Harald Welte 483d314831 deps: Update AF_PACKET dependency to version with socket/bind race fix
Change-Id: Icd773273d3ff8ff6d36ce472b8bd2e8a9b1e2e19
2020-12-10 22:13:25 +01:00
Alexander Couzens 2373afc482 pcu: SNS: fix typo
Change-Id: Iedb6b3f38d87ea3ac29c4bcaaf50e771b0b8a750
2020-12-10 15:21:30 +00:00
Alexander Couzens 2a0ac80fd1 pcu: SNS: add TC_sns_add_existent
Try to add via SNS an already existent NSVC which should
fail.

Change-Id: I096bcbe38d82d08a150a2f8e56f6bc02353273a1
2020-12-10 15:21:30 +00:00
Alexander Couzens 1e21fd40a1 pcu: SNS: remove TODO expect FLOW-CONTROL BVC
It should not be expected in a new NSVC.

Change-Id: I142c87d496f08d603ab8e1e13c5a29ebe6596bb0
2020-12-10 15:21:30 +00:00
Alexander Couzens a8fb621aba pcu: TC_sns_add: fix wrong udp port in SNS ADD message
When sending the SNS ADD in the test case the ip/port to add must be different
from the current NSVCs.

Fixes: 90f1974fb0 ("NS_Emulation: Support multiple NS-VC within one NSE (NS-VCG)")

Change-Id: I9bbbf1431468a452df324a7559518496e3eb48e3
2020-12-10 15:21:30 +00:00
Harald Welte 299aa48c64 gbproxy: Test case for BVC flow control procedure
Related: OS#4891
Change-Id: I6daa5848bd59b42f152de783bfdc602d1f2da861
2020-12-09 15:31:55 +01:00
Harald Welte b9f0fdc177 gbproxy: properly shutdown at the end of the test
Destroying at least most of the components in an orderly fashion avoids
at least most of the race conditions during test shutdown.

Change-Id: I2aa4ef8a70c1139893c9621f5a6b6007b221c13d
2020-12-09 15:31:55 +01:00
Harald Welte 425d376387 gbproxy: Introduce global guard timer in test_CT
We did have a guard time in each ConnHdlr, but not in the MTC (test_CT).

However, we do have tests that don't use any ConnHdlr, and those were so
far ran without a guard timeout. Fix that.

Change-Id: Iee90fc26a151c692d3c6f3eb6ad80f528f8d939f
2020-12-09 15:31:55 +01:00
Harald Welte 158becf9cb gbproxy: Rename PCU port to PCU_PTP; SGSN port to SGSN_PTP
This way it's more obvious that it refers to the PTP BVC, like we
already use PCU_SIG and SGSN_SIG for the signaling BVCs.

Change-Id: Ie8d327b0c6fae0e7963cc5907ab0bc94e97c67f3
2020-12-09 15:31:55 +01:00
Harald Welte 4f91c3b65a gbproxy: cosmetic: More comments / section headers
Change-Id: I26162cd37908d60761182edd50c3aa8389486b7c
2020-12-09 15:31:55 +01:00