Commit Graph

2708 Commits

Author SHA1 Message Date
Pau Espin Pedrol fa64e2885b Fix tons of warnings in RLCMAC and pcu
Change-Id: Ia3b7c5f9fdf571f99859027dbab8731ea1a8e830
2021-02-08 18:35:38 +01:00
Harald Welte 27cfb7a230 stp: Introduce M3UA SSNM tests
Tests for M3UA SSNM behavior.  This is just being introduced in
osmo-stp, so all tests will fail on 'latest', and some will still fail
until SSNM processing inside osmo-stp is becoming more complete.

Change-Id: I5074dccde9940956439235e8d02e6a722b8da5f5
Related: OS#2623
2021-02-08 17:22:26 +00:00
Harald Welte 1c4e984765 stp: Less magic numbers; centralize M3UA configuration
We shouldn't be having magic numbers for point codes etc. in each
test case.

Change-Id: Id8a6241657e1f02f15d6722934eb040fc98beab1
2021-02-08 17:22:08 +00:00
Harald Welte 308125957a stp: Time out after 5s if expected M3UA doesn't arrive
No need to wait for the global timeout here.

Change-Id: I279aacf2215ccd63a6e52c6a71cda3b500a3795c
2021-02-08 17:21:58 +00:00
Harald Welte 42bcc44153 stp: Ignore M3UA SSNM messages in tests
The tests were written without considering the arrival of such messages;
however, it is well within the M3UA spec that such messages appear at
any time indicating remote point code availability etc.

In libosmo-sccp.git Id92be4691b0fd77598a6edb642c028bbd8c5b623 we start
generating those messages in osmo-stp.

Let's ignore them in the tests to avoid unexpected failures.

Later on, we likely will introduce / adapt tests to actually expect
those messages whenever appropriate.

Change-Id: I85ce8fd4f26db184833cf348293f0255bb5eaac3
Related: OS#2623
2021-02-08 17:15:15 +00:00
Pau Espin Pedrol fb14690c81 StatsD_Checker: Check f_IPL4_listen result
Change-Id: Ief4e30ae92b8567dd9618064220f9f50df2d0de0
2021-02-08 12:36:42 +01:00
Pau Espin Pedrol 6ee0126971 Osmocom_Gb_Types: Fix tons of template restriction warnings
Change-Id: I3da153ce5e83b231501e74b958fcac9f10c00849
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol 7e88ce91d4 Osmocom_Gb_Types: Fix warning: control reaches end of non-void function
Change-Id: Ic2b8d0215c378ec2fd1a44775dc4e43616ca9f3c
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol fceeec27ce pcu: Fix warning: control reaches end of non-void function
Change-Id: I2c8b343fba5fabda9f78af8711e2a837536518e9
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol 3855462672 GSM_Types: Fix warning: control reaches end of non-void function
Change-Id: I749fe3a2ca85ae96fa74a78f15180cfaa02ffe84
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol 810b1df0d8 Osmocom_Gb_Types: Fix warning: inadequate restriction on the referenced function
Fixes warning:
Osmocom_Gb_Types.ttcn:1377.13-32: warning: Inadequate restriction on the
referenced function `f_oct_or_wc(bmax, 2)', this may cause a dynamic test
case error at runtime

Change-Id: Icb8698c7f2ca697a3638d5a4e4e38f20e14fd34c
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol 1b31ba4658 pcu: Fix inadequate restriction on the referenced template parameter
warning: Inadequate restriction on the referenced template parameter `imsi'

Change-Id: Iecd19d8d397e427068e495577889e1247faa11e7
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol dbc71270df pcu: Fix inadequate restriction on the referenced template parameter
Fixes:
warning: Inadequate restriction on the referenced template parameter
`tfi', this may cause a dynamic test case error at runtime

Same for other parameters.

Change-Id: If2cadbc7087ac0f99537b9916ef0c23363c9242c
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol db317650b4 pcu: Fix inadequate restriction on the referenced template parameter
Fixes:
 warning: Inadequate restriction on the referenced template parameter
 `chreq_desc', this may cause a dynamic test case error at runtime

Change-Id: I10b170c13aedc8abaaaf3b67d563ade8c3586c5b
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol 40a0295382 CTRL: Avoid using keyword 'now' as var
Fixes warning: Keyword 'now' is treated as an identifier. Activate
compiler option '-I' to use real-time testing features

Change-Id: I2b350bc93b33f36f72d35cb48d01f6c37ac1630f
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol 847a1651cd BSSGP_Emulation: Fix indentation whitespace
Change-Id: Iade336832e7045cd29bae52c7907c6a1c57813cd
2021-02-08 12:32:07 +01:00
Pau Espin Pedrol 011e32f8fc BSSGP_Emulation: Fix warning: control reaches end of non-void function
Change-Id: I9a44afc81b5b6b35a32a12efcf2dd1cb15e73e12
2021-02-08 12:31:14 +01:00
Alexander Couzens 03f6606181 pcu: fix syntax in PCU_Tests.cfg
There was a missing comma in the configuration as well the
indention was misaligned.

Related: OS#4953
Fixes: be7afce974 ("NS_Emulation: Respect data_weight==0 or signalling_weight==0")
Change-Id: I7f146ff71c107983e5787982970d0f6cd313cde9
2021-02-05 20:45:52 +00:00
Harald Welte 49f3ea818b NS_Provider_FR: Drop received messages until limk+pvc are up
Related: OS#4974
Change-Id: I69f9cf485b0a9eaf9294236f50ffcf4af20f1d20
2021-02-05 21:05:14 +01:00
Harald Welte e4a98dab78 deps: Update AF_PACKET (with FR emulation) to 0.1-4-g9c6d89b
Change-Id: Ia5005dd3ab156f677cc099271e312728fb18e0dc
Related: OS#4974
2021-02-05 21:02:10 +01:00
Pau Espin Pedrol 13ab5eaeca pcu: Define a global default set of MS RaCap
We initialize those verbose structures over and over in different tests,
and we usually don't care about detials, only whether they enable EGPRS
or not.
So let's define them once and reuse them in tests whenever possible.
Some tests requiring specific values (eg to test allocation of 8 PDCH on
a single TBF) are left intact.

Change-Id: Id047929ad71dc7e330b09fd6cbfab2da43320fde
2021-02-05 12:01:14 +01:00
Pau Espin b34bb061cd pcu: Rewrite GPRS_Components functions to use pre-decoded RLCMAC blocks coming from PCUIF
This is only a step towards a major set of changes.
This specific commit changes internal implementation of functions to stay
compatible with existing tests.
Later on, changes will be modified to use the new altsteps directly.

Related: OS#4927
Change-Id: Iecc33565fdc673e3499db12a0d4e0587290cfd45
2021-02-05 12:01:14 +01:00
Pau Espin cf5c33e0cd PCUIF: Allow receiving decoded RR/RLCMAC blocks in DATA REQ
This way tests can match directly on specific RLCMAC blocks, giving the
opportunity to handle different types using altsteps.
Before this, a user of the port could only receive a pcu_msg DATA_REQ
with a octetstring containing the rlcmac block, then decode it in a
second step when already in the alt step.

Related: OS#4927

Change-Id: Id8628e327d16c3a57e680e5a1ba0a2a8874f3a23
2021-02-05 12:01:14 +01:00
Pau Espin 4f9a48fc23 RLCMAC: Fix unbound spb value in decoded egprs data blocks
That field is only present in Header Type 3 blocks.

Change-Id: Ie05576d7d7c18933dd9abcdc055cbfe1e4e54756
2021-02-05 10:14:48 +00:00
Pau Espin ff7c5baaa2 RLCMAC: Fix decoding of dl data block with no llc block header byte
The value was marked as unbound while it should be marked as omitted:

"""
dl_block := { data := { cs := CS_1 (0), mac_hdr := { mac_hdr := { payload_type := MAC_PT_RLC_DATA (0), rrbp := RRBP_Nplus13_mod_2715648 (0), rrbp_valid := false, usf := 7 }, hdr_ext := { pr := PWR_RED_0_to_3dB (0), spare := '0'B, tfi := 0, fbi := false, bsn := 0, e := true } }, blocks := { { hdr := <unbound>, payload := '0D0C8653110FFEF072972C5A790C0317299753B5'O } } } } }
"""

Change-Id: If00338729ee1b2c8a4e100495e7cfa0599a4cb8b
2021-02-05 10:14:48 +00:00
Vadim Yanitskiy 559f5dc6e1 library/L3_Templates: fix: ensure 'no extension' in {ts,tr}_Called
Our definitions contain the minimum for 'CalledPartyBCD_Number',
optional extensions are not supported.  Thus do not indicate their
presence, use '1'B (inverted logic) in both templates.

Change-Id: I448a1f7b71ed7d63d397da2b7d04942b501deaa5
Related: SYS#5340
2021-02-05 09:44:04 +00:00
Vadim Yanitskiy c833465143 library/MGCP_Emulation: fix a copy-pasted comment
Change-Id: If068b653811c836f8e937a6f77d79d0c150c8e63
2021-02-05 09:44:04 +00:00
Harald Welte c52c258aea gbproxy: fix config files
It seems only docker config files were updated, while the local ones
have been forgotten in recent changes.  We have to find a proper
solution for this :/

Change-Id: I26e900617bb87983912d8440376a7449f318e737
2021-02-04 22:32:03 +01:00
Harald Welte daf89681c4 NS_Emulation: Avoid g_unblocked_nsvcs_* overflowing
Sometimes we run into situations where the g_unblocked_nsvcs_* is
exceeding the number of NSVCs we have in g_nsvcs.  This can only happen
as we blindly append integers to the ro_integer fields, rather than
checking if they are already contained.

Let's factor out the add_unique and del functions (in Osmocom_Types)
and use them from NS_Emulation.

Change-Id: Ib3273d6ce9b80f700c964d578fdb0f268eac6a14
2021-02-04 17:11:30 +01:00
Harald Welte aaa0dfdd3f Move "ro_integer" to Osmocom_Types
We don't need several re-definitions of a "record of integer" type,
plus associated helper functions.  Let's move that to the shared
Osmocom_Types.ttcn

Change-Id: I6a68ab8180a40b93c540db9cb80941c39c2fb549
2021-02-04 17:11:30 +01:00
Harald Welte 120fe5d313 fr: Use dumpcap instead lf tcpdump to capture hdlc net-devices
Like GBProxy_Tests, we need to use dumpcap instead of tcpdump.

Change-Id: I36d5524b11e10ac687c65345aedc4a99e7fda8d8
2021-02-04 15:57:33 +01:00
Harald Welte 586a95b4e4 fr: Don't write TIMEROP_START to ConsoleLog
There is quite a number of them, as we start 100 UE components
plus associated structure underneath.  Let's avoid spamming the console.

Change-Id: I6621ac6094de310e974ce0438d01fca868719eb1
2021-02-04 14:58:22 +01:00
Harald Welte 7504c4dc4b fr: Randomize packet size used in TC_ul2dl_ud()
This allows us to test with a variety of packet sizes up to [close to]
the MTU of the underlying transport (configurable by modulepar)

Change-Id: I8e38ecf6b270c81bd73ee43b1fa0b259a999c14b
2021-02-04 14:58:22 +01:00
Harald Welte 27119672d2 fr: Add TC_ul2dl_ud
This test case tests NS-UL-UNITDATA transmit and expectes the exact same
LLC PDU to be sent back as NS-DL-UNITDATA.

This way we can verify that both uplink and downlink paths are working,
and that no messages are lost.  It works stable here on my laptop,
showing that if we test the TTCN3 NS + BSSGP code over a E1 line
against another instance (fr against fr-net) works reliable.

Change-Id: Ic115af02207c9b9f4c84fa75890048acb6856c79
2021-02-04 14:58:22 +01:00
Harald Welte 4998a09917 NS_Emulation: Don't respond to NS-STATUS with NS-STATUS
Change-Id: Id9544ed1a7686fe113c4f6671e482bffc84bd2cc
2021-02-04 14:58:22 +01:00
Harald Welte e58e5b74da fr-net: Echo back DL-UD in UL-UD when LLC SAPI '0010'B is used
This allows us to have bi-directional tests

Change-Id: I7637ee5f1a7cce0ed282c972b9cd0702ba86cbaa
2021-02-04 14:58:22 +01:00
Harald Welte 8525764791 fr: UE_CT: Store BVCI + CellId in each UE
Change-Id: I1a25a03e17b3d957763512dc4acda134338df3be
2021-02-04 14:58:22 +01:00
Harald Welte bfff717e1c fr/fr-net: Use four parallel FR NS-VC instead of just one
Related: OS#4974
Change-Id: I366ceea525c09236f5432ba043a757e593d4ed0e
2021-02-04 10:48:21 +01:00
Harald Welte 76eca4dcd8 fr-net: Don't generate junit-xml output. It's not a test suite
Change-Id: Id296e62fb86731492d42370173a48f217b2fbdc0
2021-02-04 10:35:03 +01:00
Harald Welte db7892ad5f Makefile: add fr + fr-net
Change-Id: Ifc5ceca0fdaa697838de8c87e247a188e633a5cb
2021-02-03 20:21:16 +01:00
Harald Welte 106ba34a26 fr: TC_bvc_bringup
Change-Id: I91d61e01158802496a1058748c51506f0472b24e
2021-02-03 19:28:05 +01:00
Harald Welte f1f23bf785 fr: Generalize and document functions
This prepares a lot of the FR_Tests functionality to be re-used in more
test cases.

Change-Id: I95b759ad85d9d1cba1533122672e7ff5628bc014
2021-02-03 19:28:05 +01:00
Harald Welte 02cdc7cf2c fr: Add component id in logs; add 15s timeout waiting for BVC-UNBLOCK
Change-Id: If62d54517ee9af828d6fa56d83073260ceced1e8
2021-02-03 19:28:05 +01:00
Harald Welte 5e78788c4e fr: Make TC_foo() actually terminate
Rather than running in an endless loop (useful for manual tets),
terminate each UE_CT after sending 50 packets.  Also adjust the ramping
and timeouts in a way that it manages to terminate ahead of the guard
timeout.

Change-Id: I7f40f5c59d399d528072986d067b5014fbd085c4
2021-02-03 19:28:05 +01:00
Harald Welte 681949b047 fr: Implement per-UE guard timeout
Change-Id: Ie52b1923ca81f7717be446891df1bfdb67ed7ed7
2021-02-03 19:28:05 +01:00
Harald Welte 056858ac62 fr: Don't wait indefinitely, but wait until all UE components terminate
Change-Id: Ifdf9c7fb625ccdb467b3b87f79431da18fea5f2e
2021-02-03 19:28:05 +01:00
Harald Welte 633805b1c8 BSSGP_Emulation: Support up to 64 BVCs with 64 users each
Increase this from the previous limit of 16 BVC with 16 users each

Change-Id: I8abca1c020d0ba4b89a6045e99d3a9eb7bcc4648
2021-02-03 19:28:00 +01:00
Harald Welte c0c67ff14f NS_Emulation: Handle NS_PROV_LINK_STATUS_DOWN
This happens e.g. if FrameRelay detects a "service affecting condition",
i.e. the link is considered dead.

Change-Id: I7409079f5e2b77cc08ccc93d1b0baa72720cefb8
2021-02-03 19:28:00 +01:00
Harald Welte ce2e4976be deps: Use latest version of AF_PACKET
... as this contains a fix to FrameRelay_Emulation to disable T392 if a
service affecting condition is detected.

Change-Id: I8b266577f738b7c12514eb8671e11d7a75be6034
2021-02-03 19:28:00 +01:00
Harald Welte 61b3a8729f deps/SCTPasp: Update to master (uses epoll instead of select)
The old version of SCTPasp we use
* had no IPv6 support
* didn't support file descriptors > 1024

See also https://www.eclipse.org/forums/index.php/m/1837587/#msg_1837587

Change-Id: I446dfb2f885999e40478b9332162a2584b0b71a3
2021-02-03 19:28:00 +01:00