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
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
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
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
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
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
These functions would not set a verdict in case no message was ever
received. This patch ensures that a timeout while waiting for a paging
message actually fails the test.
Change-Id: If71db2d37d67d02c5d9550202128ee3470762964
Related: SYS#5002
With this setup we can and do now test:
* Paging a LAI on BVC0 is sent once per matching NSE
* Paging a LAI on BVC0 is sent to multiple different matching NSE
* Paging a RA ID on BVC0 is sent once per matching NSE
* Paging a RA ID on BVC0 is sent to multiple different matching NSE
Change-Id: I698a932b3dc78c776e9350283109463bcdc40e6b
Related: SYS#5226
We need to ensure that before each test the gbproxy does not have any
state. Move the vty commands into loops that run before we init either
SGSN or PCU Gb. This ensures that we don't send some spurious block or
other message at the start of the test.
Related: SYS#5002
Change-Id: Iaedfadf94f716b190495a807c28785be0078addc
We cannot specify create_cb function references from the config file,
so let's patch them into the data structure at start-up.
Change-Id: Idac9e97dde62b61d0423fdde16e3bd700d5287c0
Any NSE should be unconfigured at start up of the test case in order
to avoid any state leakage from previous test executions into the
newly-started test case.
Change-Id: I1dd491d5bce17b4602f1e26b42df003f1627714a
The NS specs state up to 1600 bytes "gross NS size" must be supported,
at least by the underlying FR layer. Let's test up to that. Let's
also speed things up by using 4-byte size increments, and print
the size of the current message.
Change-Id: I76358323e79cfc3d0e9c979c716b7a552f3b8e3b
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: Idab8bed06281468164006682aa6b4c2c3e236880
When the SGSN is sending an OVERLOAD message, we expect that to
propagate down to every BSS on the other side.
Change-Id: Ic61fabd9c633bcb3f256fe7aa5834e66cc66a4fb
This tests the LLC-DISCARDED message, which relates to a BVCI but
is itself sent on BVCI=0. We expect it transparently passes from BSS
to SGSN.
Change-Id: I98d02d6fa68bddf15b732d06dab00e91e72995d1
These test cases check if gbproxy behaves as expected when it comes to
dealing with BVC-RESET on the signaling BVC. The tests are not passing
due to limitations of gbproxy. So it's not clear if the tests are 100%
correct until gbproxy is fixed.
Change-Id: Iedfe72f539ad3a0653b6ee7a050bf36ae386e88e
This notifies the user via the MGMT port about the fact that an inbound
BVC-RESET procedure just happened.
Change-Id: I54d0d5e0e06a330a90dfb1da06062d65022efe81
Test the blocking and unblocking procedure, indirectly via the BSSGP
emulation sending us the related primitives on both PCU and SGSN side.
Change-Id: Ia2fe867435678cbde44cac2addcaddd174507446
With the previous commit, we change the processing of the SUSPEND/RESUME
related PDUs and handle them now via a new per-NSE "GLOBAL" port.
Change-Id: I805372f3024a0ec2491a24422e02c0bc6dc669d2
When using NS_Provider_FR, the FR links need some more seconds to come
up than the NS_Provider_IP.
Change-Id: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
We want to move a virtual subscriber between BVC with one NSE,
but also to other NSE/PCU at runtime. The number of BVC and NSE
may be large in a given test config, and we really don't need
hundreds of test ports per component; Instead, reconnect the
test ports to whichever BVC we want at runtime.
Change-Id: I56b088b582f2d070547ee24f2d7a175d84fb5861
Let's use a 'record of' with indefinite length in order to be able to
dynamically adjust the number of BSSGP_BVC_CT references based on how
many BVCs we have configured.
Change-Id: Id4aa20ff0b553cb8a1f5a67faa1e7b237fb254b8
The hard-coded array of three cell identifiers in the ConnHdlr
configuration doesn't really reflect situations with a different
number of PCUs than three, and a different count of BVCs than one
per NSE.
Let's pass the entire PCU configuration as parameter into every
ConnHdlr. This way, the ConnHdlr can learn whatever cell identities
there mgiht be in whatever number of BVCs of each NSE.
Change-Id: I0bb22be612b8aa256c9ee115ee44ea849c4225e1
Let's generalize the data types a bit, and move the gb (bssgp) config
into a module parameter. That parameter then is used for both the PCUs
as well as (concatenated) for the SGSN side.
This allows the configuration file to have more control over the number
of BVC within each NSE.
Change-Id: I43a3a8e133cf0f0e377b64d1b385e88285246957
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
In If1220852785853f8a5d8de183d5053ddd6ccb958 I introudced a config
file typo in the GBProxy_Tests.cfg. Let's fix that
Change-Id: I78b6307d16abd37e77e66e511f91a8dda902b58d
This is something we need to simulate more complex scenarios,
particularly in the context of frame relay.
Change-Id: If1220852785853f8a5d8de183d5053ddd6ccb958
The first testcase, TC_BVC_bringup just waits for NS/BSSGP Emulation to
do their thing. If nothing fails there then we pass.
Related: SYS#5002
Change-Id: Ib3dc05fe5598b53e963ca863968e387cc36b9de3