The point of global (component) variables is that we don't have to pass
them around as extra function arguments everywhere. So don't do it.
Change-Id: I0754d5db7e797a51be3a0b601b0533de80bc246d
We cannot choose a random TLLI anymore, as this will obviously end up
at a random SGSN, and not the one we're targeting.
Change-Id: I665eda9e04cbf505f55abc9bcd414d6cbd6a36dd
Move the entire body inside the loop to a separate function. This
will be useful when adding pooling support next.
Change-Id: Ia0f9d9128754c2196ab026623f1b6a254a958d2f
We change the osmo-gbproxy.cfg to use NRI 3 for SGSN-0 (NSEI 101) and
NRI 4 for SGSN-1 (NSEI 102).
We also add the capability to GBProxy_Tests to allocate P-TMSI with
a specific NRI and default to the first NRI of SGSN-0 so all tests
written still for a single-SGSN-non-pool scenario pass without any
modification.
Related: OS#4472, SYS#5002
Change-Id: I15f78dca5ac31a1c71f086d3e92a70e900eae250
The altstep was missing the "repeat" at the end, causing it to abort
early and reporting a test failure which actually didn't exist.
Change-Id: I0ec9aa06fa9ec25b2047c1e795e28eeefd6bc7d2
We used to generate a random TLLI for each ConnHldr. Instead, use a
deterministic function to generate the P-TMSI (just like we do for the
IMSI) and derive a local TLLI from that P-TMSI.
Related: OS#4472, SYS#5002
Change-Id: Ic1eaa1d298fe998ca97432769953bfc5a5333ae4
This adds the required code changes and minimal configuration to both
osmo-gbproxy.cfg and GBProxy_Tests to have osmo-gbproxy connect to two
SGSNs.
No NRI mappings are configured and hence the second SGSN isn't really
used for anything except for bringing the NS-VCs and BVCs up.
Related: OS#4472, SYS#5002
Change-Id: Ib70f7c1a29f089957f882df0e9b05ee526224611
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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