Commit Graph

2556 Commits

Author SHA1 Message Date
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
Harald Welte 57de220cdb BSSGP_Emulation: Introduce a GLOBAL port in the BSSGP_CT
The per-NSE BSSGP_CT gets a new GLOBAL port which is used for procedures
that are not specific to one BVC, such as the SUSPEND/RESUME related
PDUs, which all are on the signalling BVC without any BVCI in the BSSGP.

Change-Id: I40d973d80709f5d56f59247e8647b52754f09bc8
2020-11-25 17:14:25 +01:00
Harald Welte 7462a59ed9 gbproxy: Add paging for all situations of unknown identity
CS-PAGING and PS-PAGING for unknown RAC, LAC and BVCI on either PTP or SIG BVC.

Change-Id: I9874d54939daa28201b82139c9d8e3022432e621
2020-11-25 17:14:24 +01:00
Daniel Willmann 00c0bbf272 Add templates for LLC_DISCARDED
Change-Id: I587ec89471083e339065f6371ffe6253d49007bf
Related: SYS#5210
2020-11-25 16:10:23 +00:00
Daniel Willmann 91a8e25b57 gbproxy: Add test for FLUSH_LL
Change-Id: I05667295e7fe945de6ed03716ff5ac930d54ac77
Related: SYS#5210
2020-11-25 16:10:23 +00:00
Daniel Willmann 4798fd7d65 Support signalling BVC to send/receive messages
Change-Id: Icbe9f918d16efd01ede4e060f8af53a5e2c9253f
Related: SYS#5210
2020-11-25 16:10:23 +00:00
Daniel Willmann 7f1d78e164 Add templates for FLUSH_LL_ACK
Change-Id: I57ef98b9a3022ed5915381504aa129979799bee8
Related: SYS#5210
2020-11-25 16:10:23 +00:00
Daniel Willmann 379fc250de Add templates for FLUSH_LL
Change-Id: Id432022fdd7f96bc014f0fd81658fa4aa796a688
Related: SYS#5210
2020-11-25 16:10:23 +00:00
Vadim Yanitskiy 3191d73f6c BTS_Tests: make Training Sequence Code configurable
Change-Id: Ifc09d4192584048d39ebfa22824eda69320fa2c5
2020-11-24 12:05:27 +01:00
Vadim Yanitskiy 7e70709689 BTS_Tests: generate g_AllChannels from module parameters
Change-Id: I600aa49768328b89707b4da13d61f6a8089ac351
2020-11-24 11:58:49 +01:00
Vadim Yanitskiy 42d8bd5012 BTS_Tests: re-organize configuration of TRX/TS params
Change-Id: I9b225249d135399f63d3c7e4c567121dfea63f75
2020-11-24 11:58:49 +01:00
Vadim Yanitskiy 802508e696 library/RSL_Types: add 'bs_power_params' to 'RSL_IE_Body'
The value part of this IE is defined as vendor-specific.

Change-Id: I48703c45d26cd88c1d9b5fda1a9df42616cb7cc0
2020-11-24 11:58:49 +01:00
Vadim Yanitskiy bc8ebce10e library/GSM_RR_Types: make ts_MEAS_REP more user-friendly
Change-Id: Ica1ea41ebba5c518d515a211e77ca6651c4173d6
2020-11-24 11:58:49 +01:00
Vadim Yanitskiy 05a236a2fc library/GSM_Types: add the Uplink flag to GsmBandArfcn
Change-Id: Ib9bd7268b8a0fd8ed64064871c09fab35e15a761
2020-11-24 11:58:49 +01:00
Vadim Yanitskiy 1acc7bb184 library: move Osmocom_Types.Arfcn to GSM_Types.GsmBandArfcn
In some cases GsmArfcn itself is not enough.  It case of L1CTL
and GSMTAP, it needs to be equipped with a band discriminator:

  - DCS / PCS (as the numbers may overlap),
  - Downlink / Uplink (not yet there).

Let's rename this record and move it to GSM_Types.  Also, add
send / receive tamplates, so we can add new fields later.

Change-Id: I7a63f03bbd15a06caafb786122dc12991d115771
2020-11-24 11:58:49 +01:00
Harald Welte 0e18824f3b gpborxy: Implement variety of paging tests for PS-PAGING and CS-PAGING
Change-Id: Ida44b62dfdb9c4ce2755de63d51a9907d34f247f
2020-11-23 14:51:38 +01:00
Harald Welte f8ef028c9f gbproxy: Add test for load sharing function in SGSN->PCU direction
Related: SYS#5209
Change-Id: Ide733d7659ff7f341bedc61fc90947f74d7c4ac3
2020-11-21 22:52:55 +01:00
Harald Welte 80a249aa07 NS_Emulation: Include NS-VCI in NsUnitdataIndication
The primitive normally only contains NSE + BVCI, but in a tester
we actually want to verify which NS-VC a given message has arrived on,
and hence it makes sense to add the NSVCI, too.

Change-Id: I9402bf0be47e5b93c9cfb081eb8f9fa6734c9227
2020-11-21 22:52:51 +01:00
Daniel Willmann 670bbc0c4e Osmocom_Gb_Types: Fix indentation
Change-Id: I4ca156b53dfe9daa190d52a7de46be56cf74099a
2020-11-20 15:09:00 +00:00
Daniel Willmann 087a33d5d4 gbproxy: Add test for BSSGP resume procedure
Change-Id: I7e724b97ebfde4ed5824515065fbedca8bcf4c64
Related: SYS#5210
2020-11-20 15:08:35 +00:00
Daniel Willmann fa67f49798 gbproxy: Add test for the suspend procedure
Change-Id: Ib64c1711f7983940aa41e1b570c90015fe236e5b
Related: SYS#5210
2020-11-20 15:08:35 +00:00
Daniel Willmann 54833f2481 gbproxy: Use a different IMSI suffix per TC
Change-Id: I9a234cd6e61cfed8c9502708314c478f9a561d58
2020-11-20 15:08:35 +00:00
Daniel Willmann 165d6617b4 gbproxy: Add test for Radio Status procedure
This message is only passed through by gbproxy

Change-Id: I277ba3dace936400a78670925c7c8bdf401f90f6
Related: SYS#5210
2020-11-20 15:08:35 +00:00
Pau Espin 599d56bbc4 pcu: Fix counter expectancies in TC_bssgp_dl_unitdata_with_valid_imsi
Since sending with the network-requested UL CS/MCS was implemented, CS-2
is being used in the test (since it's requested by the network during UL
Imm Ass). We used to send UL blocks with CS-1 prior to that, which means
we are sending a different amount of data, and hence the test
expectancies need to be updated.

Change-Id: Ie7112a96f5f2ca9c5bbd224b6270f55a338d101a
2020-11-20 15:06:35 +00:00
Daniel Willmann 05d4638b9b Add templates for BSSGP Radio Status procedure
Change-Id: I6d49eb4907c4568d88da5d6fd7962e388a3607fb
Related: SYS#5210
2020-11-20 15:53:55 +01:00
Daniel Willmann 443fc57fc7 gbproxy: Reset nsvc to SGSN before each test
Change-Id: Ibf9c75b4066b1aad5fbbe2f35087a3f9f1a39743
Related: SYS#5002
Depends: I83b9cd7381c25da0e8aa847038a2d422c8dd63cf (libosmocore)
2020-11-19 14:29:59 +01:00
Harald Welte a71a410cb3 deps/Makefile: Require v0.1 of AF_PACKET TestPort
Change-Id: I435d0c09e051e0a3082e8c87807b72ce92117007
2020-11-18 15:21:32 +01:00
Pau Espin e8db673d22 pcu: Implement ACKing EGPRS Dl TBF blocks
Change-Id: I9f1b621a8365e69d2e1a33d59cb8c7a59639ad94
2020-11-18 11:51:14 +00:00
Harald Welte 0c45da1f2d gbproxy: /bin/sh cannot do "FILES+=", use /bin/bash
This fixes an ugly copile failure depending on which shell
provides /bin/sh on the given system:

AF_PACKET_PortType.so: undefined reference to `typeinfo for AF__PACKET__PortType::AF__PACKET__PT_PROVIDER'
AF_PACKET_PortType.so: undefined reference to `AF__PACKET__PortType::AF__PACKET__PT_PROVIDER::AF__PACKET__PT_PROVIDER(char const*)'
AF_PACKET_PortType.so: undefined  [0m [91mreference to `AF__PACKET__PortType::AF__PACKET__PT_PROVIDER::set_parameter(char const*, char const [0m [91m*)'
AF_PACKET_PortType.so: undefined reference to `AF__PACKET__PortType::AF__PACKET__PT_PROVIDER::outgoing_send(AF__PACKET__PortTypes::AF__PACKET__Unitdata const&)' [0m [91m
AF_PACKET_PortType.so: undefined reference to `AF__PACKET__PortType::AF__PACKET__PT_PROVIDER::user_map(char [0m [91m const*, Map_Params& [0m [91m)' [0m [91m
AF_PACKET_PortType.so:  [0m [91mundefined reference to [0m [91m `AF__PACKET__PortType:: [0m [91mAF__PACKET__PT_PROVIDER::user_unmap(char const*, Map_Params&)'
AF_PACKET_PortType.so: undefined reference to ` [0m [91mAF__PACKET__PortType::AF__PACKET__PT_PROVIDER:: [0m [91m~AF__PACKET__PT_PROVIDER()' [0m [91m
AF_PACKET_PortType.so [0m [91m: undefined reference  [0m [91mto ` [0m [91mAF__PACKET__PortType::AF__PACKET__PT_PROVIDER::Handle_Fd_Event(int, bool, bool, bool) [0m [91m'
AF_PACKET_PortType.so:  [0m [91mundefined  [0m [91mreference to [0m [91m `AF__PACKET__PortType: [0m [91m:AF__PACKET__PT_PROVIDER::user_start()'

Change-Id: I71352f5fa538c3ba599b11c2bb1fec2952ddbf80
2020-11-18 12:36:42 +01:00
Pau Espin 6d3a8fc4f7 pcu: Set acceptable logging verbosity for ConsoleMask
With prior situation it's impossible to follow stdout due to the huge
amount of noise.

Change-Id: I1f49eb26af0d6144f7632320097f2c78d47f3a22
2020-11-17 21:48:55 +00:00
Harald Welte d280127e0e gbproxy: Wait longer for BVC unblocking at start-up
When using NS_Provider_FR, the FR links need some more seconds to come
up than the NS_Provider_IP.

Change-Id: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
2020-11-17 20:14:15 +01:00
Harald Welte 3dd21b3307 gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime
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
2020-11-17 20:13:20 +01:00
Harald Welte 5cb8016707 gbproxy: call f_client_register() only on connected ports
Change-Id: I845d566172918e1948db0579fa846e0972e532c3
2020-11-17 20:13:18 +01:00