Commit Graph

2538 Commits

Author SHA1 Message Date
Harald Welte 71449b0a13 bssgp: Introduce "GLOBAL" port for PTP BVC
There are some messages/procedures on a PTP BVC which are not related
to one specific TLLI, but affect the whole PTP BVC.  First and foremost
that is the FLOW-CONTROL-BVC. Let's check if the user is interested in
handling those internally (by connecting to the GLOBAL port).  If not,
fall back to acknowledging all incoing FC-BVC and ignoring all ACKs.

Related: OS#4891
Change-Id: Ib80a6a522dbcb33fd0e7bd31a73ef28fdc636f57
2020-12-09 15:31:30 +01:00
Harald Welte 27a70cc453 bssgp: rename tr_GLOBAL to tr_GLOBAL_SIG
... to indicate this is about the signaling BVC only.

Change-Id: I646db452c89842465902b5167c9c86de51df1241
2020-12-09 15:30:52 +01:00
Harald Welte 86bdcaa79d Osmocom_Gb_Types: Fix t_BVC_FC_BVC_ACK() TAG IE length
Change-Id: Ib9a09fea85110a4f0966c07d911e37234aa06391
2020-12-09 15:30:52 +01:00
Harald Welte ce10365dab gbproxy: Fix syntax error in GBProxy_Tests.fr.cfg
Follow-up fix to I96e8b6a1a69148f770476e87c920dc256c1d7379
Related: OS#4520

Change-Id: I2eb6ffb3d0dba1405692c0e885622936d65cf95a
2020-12-09 15:30:52 +01:00
Vadim Yanitskiy b9a7bbf537 BTS_Tests_OML: add new test case TC_ipa_rsl_connect_nack
Currently osmo-bts seems to be sending IPA RSL Connect ACK
unconditionally, even if the remote peer is not reachable.

Change-Id: Ibfa58f670401907801f610578dd9b4ebf155a83a
2020-12-08 19:28:06 +01:00
Vadim Yanitskiy 62b1e4812a bts/expected-results.xml: TC_sacch_chan_act_ho_sync should pass now
Change-Id: I872111dae761bda038d2e881ab5f4e6b7f52ec90
2020-12-08 17:10:45 +01:00
Vadim Yanitskiy d020249f17 bts/expected-results.xml: add missing SMSCB-over-SDCCH8 expectations
Change-Id: I903ede1c78e103d24a93f2e6b0e1acd136405099
2020-12-08 15:58:15 +01:00
Harald Welte 0083ea6b69 BSSGP_Emulation: Add RIM port to BSSGP_CT
This port is used for sending/receiving RIM related BSSGP messages. It
exists once per BSSGP_CT Component (i.e. once per NSE), as RIM is global
for the entire NSE.

Change-Id: I04511df5dffbfe19faabf22014acc72b7673b7d6
2020-12-08 08:30:20 +01:00
Harald Welte f6e59b06d5 gbproxy: Enable TC_load_sharing_dl based on modulepar; set that in FR test
Change-Id: I96e8b6a1a69148f770476e87c920dc256c1d7379
Related: OS#4520
2020-12-08 08:30:20 +01:00
Harald Welte da9d9387f6 NS_Emulation: Tolerate late NS-BLOCK-ACK / NS-UNBLOCK-ACK
Particularly in case both sides initiate a BLOCK or UNBLOCK procedure
at almost the same time, it can happen thet we're already in BLOCKED
state and receive a late BLOCK-ACK or in UNBLOCKED state and receive a
late UNBLOCK-ACK.

Let's just silently discard them instaed of generating NS-STATUS which
may confuse the peer.

Change-Id: I2e5b934e1cf6c6cf982d5ab1dbb32e8920b91071
2020-12-07 15:55:20 +01:00
Harald Welte b2647f7135 gbproxy: Fix as_count_bvc_block()
we must continue to wait for more BVC-BLOCK after receiving the first one

Change-Id: I4664899414869fe373d31bc72f6c1dcfbcc9071c
2020-12-07 14:12:16 +00:00
Daniel Willmann d4fb73cd1c gbproxy: Fix cs paging tests
In commit 2c9300fd28 I only changed the TC_paging_ps_* tests and forgot
cs.

Change-Id: I625e0a0f01eaa951c7d91f8ced3edf0cac91bf74
Related: SYS#5226
2020-12-07 14:33:07 +01:00
Daniel Willmann 1a85971746 gbproxy: Fail on timeout in f_send_paging_xs_exp_one_bss
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
2020-12-07 14:33:07 +01:00
Pau Espin 2e459d602e pcu: Verify LLC UI dummy frames are not appended at end of rlcmac DL block
LLC UI dummy frames are only to be sent alone in order to delay TBF
termination. Until recently (osmo-pcu.git
Ifae1a7b2b3dfad8df19585063088ba0df2749c8f), osmo-pcu was sending LLC UI
dummy frames instead of padding at RLCMAC layer, which made no sense.

Related: OS#4849
Change-Id: I7e0d9ed2475dbf989fbf932c8b83117ff5fb28fc
2020-12-07 13:29:13 +00:00
Daniel Willmann 545c357b43 gbproxy: Change osmo-gbproxy.cfg so it works on libosmocore master
Change-Id: Ie1ab32ee40ff68ef3243439280244ba7668cf1dc
2020-12-07 13:05:35 +00:00
Daniel Willmann 2c9300fd28 gbproxy: Improve NSEI/... numbering and improve paging test coverage
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
2020-12-07 13:05:22 +00:00
Daniel Willmann f259021a24 gbproxy: Make TC_bvc_reset_sig_from_bss() actually pass
If we hit none of the failures in the test case it means the test was
passed.

Change-Id: I6fe00558b346174f05f36703fe630796fb04a71e
Related: SYS#5002
2020-12-07 13:04:41 +00:00
Daniel Willmann ad93c05e72 gbproxy: Reset gbproxy bvc as well as ns state
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
2020-12-07 13:04:34 +00:00
Vadim Yanitskiy 5351ccf85e BTS_Tests: make ts_LapdmAddr / ts_LAPDm_AB more friendly
Change-Id: I35f84ebd6cb884f3ab63d1c2b77d8ed61acd5c74
2020-12-03 13:40:12 +00:00
Harald Welte 95339434cd gbproxy: Make sure all BssgpCfg have a valid create_cb
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
2020-12-02 19:10:03 +01:00
Harald Welte 951e6a9539 gbproxy: Use "force-unconifgured" als on BSS-side NSEs
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
2020-12-02 19:10:03 +01:00
Harald Welte 06f0949316 RSPRO_Server: Ignore any ID RESP messages from the client for now
More recent clients start to send ID RESP, which was not the case at the
time the TTCN3 test suite was written.

As we don't really want to test the IPA CCM behavior, but we want to
test the actual remsim functionality, we can simply ignore any such
responses.

Change-Id: Id557ea9c540bf96465e7f18da87719888dd7a318
2020-12-01 12:06:33 +00:00
Harald Welte 0d5fceb146 gbproxy: Test for sizes up to 1600 bytes, not just 1024 bytes
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
2020-12-01 11:57:26 +00:00
Harald Welte f0310fc42f gbproxy: Add test suite cfg and osmo-gbproxy.cfg for FR testing
Change-Id: I1faae88c82e8d54b4d4af88e9a9236877c913752
2020-12-01 11:57:26 +00:00
Neels Hofmeyr 3eb9456f5a bsc: add tests with nonzero AMR start-mode
This test shows that in current osmo-bsc, the start-mode fails to
propagate to the MultiRate Config IE, the only start-mode so far has
always been zero.

Change-Id: I75515baf8cda04567cad8a93c5aa88361c2d259f
2020-12-01 11:54:08 +00:00
Pau Espin 1b9aa78ee0 pcu: Introduce test TC_mcs_max_dl
Change-Id: If6c58cc18b537c4a1354f1b8263db8321347fbd7
2020-11-30 18:56:16 +01:00
Neels Hofmeyr 454d792388 bsc: add TC_assignment_codec_amr_startmode_cruft
Make sure that when a 'start-mode auto' is set, that the previous start
mode setting does not linger in the unused bits.

- after I577ff590d7588fd7e3ee4846c7955ab8f84cf2b1, osmo-bsc sets its
  ICMI bit properly, but passes this test only because it *always* sends
  smod (start-mode) bits as zero.

- in I49691df01745a7c485bf165e897872c35fc4b147, the smod bits are
  properly sent on RSL, but this test shows that when ICMI becomes zero
  for 'start-mode auto', the smod bits will remain whatever start-mode
  was set in the previous osmo-bsc config. Instead, osmo-bsc should
  clear the smod bits for 'start-mode auto' so that its MultiRate Config
  does not vary depending on what was previously configured.

- in I1ec5bad0bce01cc425ee05ecf70c83ec662a226a, clearing smod is
  implemented and this test is expected to pass.

Change-Id: I151678f64e680f30f35b6bb2b0036d63efde9f2c
2020-11-30 15:59:14 +00:00
Neels Hofmeyr 21863560a2 bsc: add tests for AMR 'start-mode auto'
These tests will fail until osmo-bsc
I577ff590d7588fd7e3ee4846c7955ab8f84cf2b1

Related: OS#4868
Change-Id: Iec74b940009c8ec78a6da5c00615259e2edc1781
2020-11-30 15:59:14 +00:00
Neels Hofmeyr a6ab821704 bsc: set the AMR start-mode that the tests expect
osmo-bsc currently has a bug that fails to reflect the correct
start-mode in the AMR MultiRate config IE.

And it went unnoticed that the ttcn tests expect a MultiRate config of
ICMI = 1, even though the used configuration should yield ICMI = 0.
See mr_conf = '2804'O, where the '8' indicates ICMI = 1.

As a first fix of the ttcn3-bsc-tests, configure the BSC according to
the expected ICMI value and Start Mode, i.e. ICMI = 1 and StartMode = 0,
which is configured by 'amr tch-[fh] start-mode 1'. This should make
these tests pass as-is for both the current osmo-bsc as well as an
osmo-bsc where the bug is fixed, with minimal changes to the current
tests. See also OS#4868.

An upcoming patch will add tests for 'start-mode auto'.

Related: OS#4868
Change-Id: I4cff01c37d5c7e301e9a01f773b7e009a789519b
2020-11-30 15:59:14 +00:00
Neels Hofmeyr 2a5670be4f add f_vty_cfg_bts(), f_vty_cfg_msc()
These allow passing N vty configurations on the bts / msc node without
requiring subsequent 'exit'.

As an example, use f_vty_cfg_msc() in BSC_Tests.ttcn AMR config.

Change-Id: I9f3e485f692acb3d2a7620e9b454b372651be78e
2020-11-30 15:59:14 +00:00
Neels Hofmeyr 1a1f854ed2 add f_vty_config3(), to run N commands on a sub-node
f_vty_config2() makes it convenient to enter a specific vty node without
needing to send 'exit'/'end' explicitly. However, to pass multiple
commands on the same node, the VTY would enter and exit the node for
each call of f_vty_config2(). The new f_vty_config3() also allows
multiple commands to be run on that same node without intermediate
exiting.

Change-Id: If969ac645aa82e5a36245d974de2a251633de111
2020-11-30 15:59:14 +00:00
Harald Welte 8b326412a4 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: Idab8bed06281468164006682aa6b4c2c3e236880
2020-11-30 13:33:06 +00:00
Harald Welte f20af41003 gbproxy: Introduce TC_overload
When the SGSN is sending an OVERLOAD message, we expect that to
propagate down to every BSS on the other side.

Change-Id: Ic61fabd9c633bcb3f256fe7aa5834e66cc66a4fb
2020-11-28 16:14:59 +01:00
Harald Welte c0351d1015 gbproxy: Introduce TC_llc_discarded
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
2020-11-28 16:12:27 +01:00
Harald Welte f8e5c5dfc7 gbproxy: Test for SGSN-INVOKE-TRACE
Change-Id: I1e46e5c403712eb7972c57e6b6f6eb0850b96ae3
2020-11-28 16:12:27 +01:00
Harald Welte 16786e9364 gbproxy: Add TC_bvc_reset_sig_from_{sgsn,pcu}
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
2020-11-27 19:18:28 +01:00
Harald Welte e588792562 BSSGP_Emulation: reo-rder altsteps of per-NSE component
the existing ordering of altsteps unfortunately caused some
receive clauses never to be hit, as they are only in the default
altstep, while more generic receive clauses are already in the
state-specific altsteps.

Let's introduce an as_allstate_pre() and an as_allstate_post() to
solve this ordering problem.

Change-Id: Icc4da95833557931d6685826fb30bdc60bf460c1
2020-11-27 19:18:28 +01:00
Harald Welte bdf96d8412 BSSGP_Emulation: Add MGMT port to per-NSE (BVCI=0) component
We recently introduced a MGMT port in the per-BVC component for the
PTP BVC.  Let's add this also to the signaling BVC.

Change-Id: I24df4cb290c9f9dc1a7398994af101711f12d42e
2020-11-27 19:18:28 +01:00
Harald Welte 60a8ec7a4f gbproxy: Add TC_bvc_reset_ptp_from_{bss,sgsn}
This tests BSS-originated and SGSN-originated BVC-RESET procedure of a PTP BVC.

Change-Id: Ie0a4899b6e793e3d69f117f350c5a2542fc4d402
2020-11-27 19:18:23 +01:00
Harald Welte 3c90515272 BSSGP_Emulation: Send BssgpResetIndication when PTP BVC are being reset
This notifies the user via the MGMT port about the fact that an inbound
BVC-RESET procedure just happened.

Change-Id: I54d0d5e0e06a330a90dfb1da06062d65022efe81
2020-11-27 19:16:58 +01:00
Harald Welte 52cecbb340 BSSGP_Emulation: Fix handling of BsgpResetRequest
We need to change to BLOCKED local state in order to activate
the altstep which handles the inbound BVC-RESET-ACK.

Change-Id: I32ede586f0977b7d96af9fe3ea5fae485184ea98
2020-11-27 19:16:43 +01:00
Harald Welte ab50cc295b BSSGP_Emulation: Fix inbound BVC-RESET
We cannot handle this in as_ptp_allstate(), as the respective clauses
are never hit:  In as_ptp_unblocked() we broadcast all BSSGP messages
without a TLLI, "hiding" the BVC-RESET handling.

Change-Id: Ie3e7a997554e6af42ae7e7294829b6f8d2447d60
2020-11-26 20:57:54 +01:00
Harald Welte 239aa50e8c gbproxy: Add TC_bvc_{block,unblock}_ptp()
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
2020-11-26 20:57:54 +01:00
Harald Welte ddfc6676d5 BSSGP_Emulation: Implement handling of BVC-UNBLOCK in SGSN role
Change-Id: I7c9cda916f6583613fbf3cdf31f3f08ceadf58d4
2020-11-26 20:57:54 +01:00
Pau Espin e130305aa5 pcu: Introduce test TC_multiplex_dl_gprs_egprs
Change-Id: I1b6b1042f25888407f48865de220c8af7451a7f0
2020-11-26 09:20:19 +00:00
Neels Hofmeyr 9ebabc8b0e vty: log failed vty command
Add a log label argument to f_vty_wait_for_prompt(), and feed the sent
command from f_vty_transceive*(), so that the failure verdict already
lists the vty command that caused the failure.

A common error is to issue insufficient 'exit' commands, so that I often
think the newly added VTY command failed, even though it is a subsequent
command causing the failure. I want to shorten the "time-to-aha" there.

Change-Id: Icfd739db150d86e9256a224f12dc979dcd77879f
2020-11-26 01:04:57 +00:00
Neels Hofmeyr c897cfb6e6 cosmetic: drop redundant assignment in f_TC_rach_content
Change-Id: I3b0f3df6c01642a84610f213f4682e330e12c068
2020-11-26 01:03:54 +00:00
Neels Hofmeyr d55a3ac5bf bts: TC_sacch_chan_act_ho_sync: expect SACCH with MS Power IE
According to 3GPP TS 48.058 4.1.4, SACCH may be transmitted also for only MS
Power present, and no Access Delay.

Change-Id: I2e1c0ecc9de65a019aaa9f08bb051bf051156172
2020-11-26 00:41:09 +00:00
Harald Welte fba7afdd89 BSSGP_Emulation: Include NSEI in BsgpStatusIndication for PTP BVC
Change-Id: I0d8f18d0e6438a98c75ff24e2a9c8136d8b417d2
2020-11-25 17:14:25 +01:00
Harald Welte 3807ed1286 gbproxy: Port TC_{suspend,resume} to new GLOBAL port
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
2020-11-25 17:14:25 +01:00