Commit Graph

2081 Commits

Author SHA1 Message Date
Vadim Yanitskiy 438939029d PCU: revert changes to f_TC_egprs_pkt_chan_req(), fix tests
I noticed that TC_egprs_pkt_chan_req_reject_exhaustion has started
to fail since the refactoring change [1]. As it turned out, this
test case does not init a GprsMs instance, which is needed by a
function it depends on - f_TC_egprs_pkt_chan_req().

I don't really see the point of using the GprsMs abstraction for
such small test cases sending just a few messages, which do not
require us to keep any state. Let's just revert those changes,
and keep using the low level API.

[1] Ib3fee37580f0ea0530a659dec83656799bf57288

Change-Id: I4f32c138e7587e68d2d35d13d13c044893fec4b2
2020-05-29 20:02:49 +00:00
Vadim Yanitskiy 28cabc4cc1 bts/BTS_Tests: add frequency hopping parameters
Change-Id: I111a14ca5d77c589529b40429d99d9ec6fa55a98
Related: Ib5ad31388ae25399ad09739aac3fdcb0b3a1f78b
Related: OS#4546
2020-05-29 22:33:13 +07:00
Vadim Yanitskiy 204d1b832f library/L1CTL_PortType: f_L1CTL_DM_EST_REQ_IA(): handle hopping params
Change-Id: I8c14fee3ec8f7a799469c681b5afe79ab74a5dfc
Related: OS#4546
2020-05-29 22:33:13 +07:00
Vadim Yanitskiy eda908106b library/L1CTL_Types: introduce ts_L1CTL_DM_EST_REQ_H1
Change-Id: Ie236c48a906679a5f46346ac7cbaf5866fd8befc
Related: OS#4546
2020-05-29 15:31:12 +00:00
Vadim Yanitskiy e8ea3ee10e library/L1CTL_Types: fix definition of L1ctlH1 (hopping parameters)
Change-Id: I87555de751e6e4af6ac5fe308c3e77fa15c8bb16
Related: OS#4546
2020-05-29 15:31:12 +00:00
Vadim Yanitskiy 5afe885d26 library/L1CTL_PortType: refactor L1CTL channel establishment
- Get rid of f_L1CTL_DM_EST_REQ, it's not really needed.
  - Derive ts_L1CTL_DM_EST_REQ_H0 from ts_L1CTL_DM_EST_REQ.
    - Turn all its params into (value) templates.
    - Turn it into a (value) template itself.
  - Pass GsmArfcn directly to ts_L1CTL_DM_EST_REQ_H0.

Change-Id: I4f275e22d4309a23b4ed301a0779c4ecb92023a8
Related: OS#4546
2020-05-29 15:31:12 +00:00
Oliver Smith b15f750b9c start-testsuite.sh: allow overriding TTCN3_BIN_DIR
Override the default of /usr/bin with the environment variable of the
same name, if set.

Related: OS#4564
Change-Id: I245ae368a97558006fc9f85d4fcb4e4cd52fb19a
2020-05-29 06:10:42 +00:00
Pau Espin 1617e31001 pcu: Add missing f_shutdown() to exit as soon as possible without final=true
Change-Id: I9703f7c81a98b6ef826db48c107ee833c125e5cc
2020-05-28 22:13:10 +07:00
Pau Espin 6791eb6b93 pcu: TC_mt_ping_pong: Request UL TBF on last DL ACK
Let's test the code path where UL TBF is requested through DL ACK/NACK
here, since we already test the usual UL TBF through CCCH approach in
most tests.

rlc_mode is changed to ACKED since that's the mode we are using so far
in tests.

Change-Id: I5a9a2e8107c87fdbf74cc2f09ae5eeafbb13ad55
2020-05-28 22:13:10 +07:00
Pau Espin 9040111df2 pcu: Parse ChCodingCommand on CCHAN Ul Ass
Change-Id: I8bf13f763bd8aa8d8a39f6b2757d5da01437cc05
2020-05-28 22:13:10 +07:00
Pau Espin eb98025e69 pcu: Parse USF from Pkt Ul Ass
Change-Id: If786d838f24755f3207d57c849ac28e58a7ee1c6
2020-05-28 22:13:10 +07:00
Vadim Yanitskiy 84d1dd557f fixup pcu/GPRS_Components: do not duplicate existing functions
Both f_ms_rx_imm_ass_ccch() and f_ms_establish_ul_tbf() functions
are actually twin brothers of good old f_pcuif_rx_imm_ass() and
f_establish_tbf() with some minor changes.

The former accepts a GprsMS parameter, that is never used. The
latter simply calls f_ultbf_new_from_rr_imm_ass() in the end.

Let's avoid code duplication:

  - call f_establish_tbf() from f_ms_establish_ul_tbf(),
  - remove f_ms_rx_imm_ass_ccch(), use f_pcuif_rx_imm_ass().

After the removal of f_ms_rx_imm_ass_ccch(), the implementation
of TC_ta_idle_dl_tbf_ass() does not need the GprsMS state, so
let's make it look like it was before.

Change-Id: If6c0b8796500e96525b7b1cadb61ab2fc84b4744
2020-05-28 22:13:10 +07:00
Vadim Yanitskiy 7466c338d8 pcu/GPRS_Components: return GsmRrMessage from f_pcuif_rx_imm_ass()
Change-Id: Ide6a00348b81a637309644be82a523c99f9fd30a
2020-05-28 22:13:10 +07:00
Pau Espin 4f7b8fd617 pcu: Refactor GPRS infrastructure to keep state and simplify tests
Before this patch, each test had to somehow keep state for all the
transactions needed. Now, most of the state is moved to generic GprsMS,
UlTbf and DlTbf structures, and APIs to maintain its state, as well as
function helpers to submit or receive messages from it. For now
specially the Tx side was improved, some of the Rx parts are left for
later and are still using the old APIs.

This will allow for more complex scenarios and more complex tests
running several MS.

All the tests were updated to use the new APIs, reworked when needed and
even totally rewritten in some cases since they were doing
inconsistent/wrong stuff from the point of view of what the scenarios
or code paths they were expected to test. There's no test regressions.

Change-Id: Ib3fee37580f0ea0530a659dec83656799bf57288
2020-05-28 22:12:46 +07:00
Pau Espin 34c940b721 pcu/GPRS_Components: send DATA.cnf in f_pcuif_rx_imm_ass()
The IUT expects a confirmation when Immediate Assignment is sent on PCH.

Change-Id: I585a1933dfb2119f1d3223b24db191282fd698b7
2020-05-28 20:19:49 +07:00
Pau Espin fddc20b63e pcu/GPRS_Components: call f_shutdown() immediately on timeout
Change-Id: I1fa31d95ea393aaf80d8f6c03c3fcf3484daa565
2020-05-28 20:19:49 +07:00
Pau Espin 71c08f662d pcu/GPRS_Components: get rid of meaningless bts_nr argument
We don't (yet) support multi-BTS test cases anyway. Ideally, each
virtual BTS would be a separate component with an individual port.

Change-Id: I8b639d179db259bf0e43cf1929447a44d5736f62
2020-05-28 20:19:49 +07:00
Vadim Yanitskiy e9f68be1e3 bts/BTS_Tests: cosmetic: use mp_trx0_arfcn in ts_ChanDescH0
Change-Id: I07a91b6517d2f19e127d36d79e6d2136bd2c29bb
2020-05-27 20:14:08 +07:00
Vadim Yanitskiy 9248456057 bts/BTS_Tests: derive ts_ChanDesc{H0,H1} from ts_ChanDesc
Change-Id: Ifea1fe51e6fbfa26601136cfc8af55a5ae4e1512
Related: OS#4546
2020-05-27 20:14:08 +07:00
Vadim Yanitskiy a9eeb7b2f9 bts/BTS_Tests: cosmetic: mark c_MA_null as private
Change-Id: I49d231395a6ae3a582c9719eaa5244daac32e020
2020-05-27 20:14:08 +07:00
Vadim Yanitskiy ff0072cb50 library/GSM_RR_Types: fix MaioHsn: add missing MAIO and HSN fields
Change-Id: I76a05e0ee8e46241b1d3bbc71b7ec01f193dd40e
Related: OS#4546
2020-05-27 20:14:08 +07:00
Vadim Yanitskiy 6de2fcbfe9 library/RSL_Emulation: server mode: handle multiple transceivers
Since change [1], the IPA emulation component allows us to handle
multiple IPA connections, thus multiple RSL connections. The idea
is to attach a TCP/IP connection identifier to each message.

On top of that, this change implements mapping between TCP/IP
connection identifiers and RSL stream identifiers, so we can
finally talk to any of connected transceivers (up to 4 for now),
not only the last connected one (as it was before). The actual
mapping is done during the IPA identification procedure.

Instead of forwarding ASP_IPA_EVENT_UP to a test case, the RSL
emulation component now sends a new event - RSLEM_EV_TRX_UP,
with transceiver number (actually, IPA stream-id) attached.

[1] I93c58c08cf296e5cea81d811650caa1a09b8a579

Change-Id: I86afb55ecc6703ce7a229aaa626223f9331a4778
Related: OS#4546
2020-05-26 20:57:00 +07:00
Vadim Yanitskiy 11edf3cdba library/IPA_Emulation: server mode: expose IPA IDENTITY RESPONSE
Change-Id: I685c2697cdbe932572e1839420d0c74c8fa94ee2
Related: OS#4546
2020-05-26 18:00:26 +07:00
Vadim Yanitskiy 40ee56cbac library/IPA_Emulation: server mode: also request IPA UnitID
Change-Id: I195894d72cf40f081d286a6c0a6d2531e3d0a45c
Related: OS#4546
2020-05-26 18:00:26 +07:00
Vadim Yanitskiy ef9bcd21ba library/IPA_Emulation: handle optional conn_id in ASP_RSL_Unitdata
This would allow the RSL Emulation component to maintain several
transceiver connections in server mode. In order to send an RSL
message to a specific transceiver, its TCP/IP connection ID needs
to be included in the ASP_RSL_Unitdata message.

Change-Id: I5c48d043cd746aad03e4329d9ffd2a627b640f64
Related: OS#4546
2020-05-26 18:00:26 +07:00
Vadim Yanitskiy 6643e8d3c7 library/IPA_Emulation: server mode: handle multiple client connections
This change basically does two simple things:

  a) adds TCP connection identifier to ASP_IPA_Event,
  b) splits g_ipa_conn_id into g_self_conn_id and g_last_conn_id.

Change a) would let the upper layers of code (based on the IPA
emulation component) know which TCP/IP connection a given event
belongs/relates to.

Change b) solves the problem, happening in server mode when a new
client connects, and TCP/IP connection identifier of another
previously connected client gets overwritten.

With this change applied, g_self_conn_id holds TCP/IP connection
identifier of the client or server itself (depending on g_mode),
while g_last_conn_id is only used in server mode and holds
connection identifier of the last connected client.

Change-Id: I93c58c08cf296e5cea81d811650caa1a09b8a579
Related: OS#4546
2020-05-26 17:51:44 +07:00
Vadim Yanitskiy a60e5cffa4 library/RSL_Emulation: fixup: handle RSL messages from any TRX
As a side effect of change [1], the RSL emulation component has
stopped to handle RSL messages from transceivers other than
TRX#0. Let's fix this by using template '?' for stream ID.

[1] I4c4a98458cfa33512db661b5435f484a38e2ef4f

Change-Id: I5ff05bbd985ddc5e39a390e4b775a16f066a53ea
2020-05-26 17:51:19 +07:00
Vadim Yanitskiy efc9413afc library/RSL_Emulation: fix comments near f_cid_{create,delete}_cnr()
Change-Id: I0fde6ea9c7e549d9cf9f6ce2a8e4e702df313b27
2020-05-25 22:14:04 +07:00
Vadim Yanitskiy a2c12c9c4e library/RSL_Emulation: use existing tr_ASP_RSL_UD template
Change-Id: I4c4a98458cfa33512db661b5435f484a38e2ef4f
2020-05-25 22:14:04 +07:00
Vadim Yanitskiy 493abe7ec6 BTS: use existing templates for ASP_RSL_Unitdata
Change-Id: I8d7b3f8b019964ece9a3187f8232d8d23b2a53a5
2020-05-25 22:14:04 +07:00
Vadim Yanitskiy ca5c520842 BSC: use existing templates for ASP_RSL_Unitdata
Change-Id: I3243850d3ceedcd89ab5be20ff4f444cd39c9d6e
2020-05-25 22:14:04 +07:00
Vadim Yanitskiy 9b4e356886 library/IPA_Emulation: assume TRX#0 in ASP_RSL_Unitdata templates
Change-Id: I93297680a2644516870222c2bb8eee03c6b575a9
2020-05-25 22:14:04 +07:00
Vadim Yanitskiy 6b4856dd17 library/IPA_Emulation: cosmetic: fix template restrictions
Change-Id: I375d1b50491ff0c848088277a86dc061be0a943b
2020-05-25 22:14:04 +07:00
Vadim Yanitskiy 44f0c48a3e library/IPA_Types: cosmetic: s/IPAC_IDTAG_UNIT/IPAC_IDTAG_UNITID/g
Change-Id: Iec9cbbea9d38813f0cd3b98fb6b252111d150220
2020-05-25 20:04:04 +07:00
Vadim Yanitskiy c4324ffb64 PCU: introduce TC_egprs_pkt_chan_req_reject_exhaustion
Send 7 RACH indications to the IUT with EGPRS Packet Channel Request.
Since we have only one timeslot (and USF value '111'B is reserved),
the 8-th indication should be properly rejected by the IUT.

Change-Id: Ie6e5fc68e1591c57e21541ba16fbdcd3fe477ac7
Related: OS#1548
2020-05-22 22:00:34 +07:00
Vadim Yanitskiy 7e06c25ed3 PCU: introduce TC_egprs_pkt_chan_req_reject_emergency
At the moment, the IUT does not support any emergency services.
Make sure that EGPRS Packet Channel Request for an emergency call
is properly rejected (RR Immediate Assignment Reject).

Note that at the time of writing this test, the IUT does not
handle EGPRS Packet Channel Request properly, so it fails.

Change-Id: I63d989e89e6235a631e024c2810a3a4b0de56ccf
Related: OS#1548
2020-05-22 20:51:29 +07:00
Vadim Yanitskiy 4f56d329b0 PCU: introduce TC_egprs_pkt_chan_req_reject_content
The purpose of this test case is to verify the contents of RR
Immediate Assignment Reject message (and its IAR Rest Octets)
sent in response to EGPRS Packet Channel Request (11 bit RA).

To provoke the reject message, test case crafts an incorrect
EGPRS Packet Channel Request message ('111111xxxxx'B).

Note that at the time of writing this test, the IUT does not
handle EGPRS Packet Channel Request properly, so it fails.

Change-Id: I4bfd5621085d63896e2e9b70355524cf4285036a
Related: OS#1548
2020-05-22 20:34:42 +07:00
Vadim Yanitskiy 16e24aa4e7 library/GSM_RR_Types: add receive templates for IMM ASS Reject
Change-Id: Icece9245f4a85dcf59021a76d51d419cf1c13990
2020-05-22 20:14:35 +07:00
Vadim Yanitskiy 7ef121d2d9 library/GSM_RR_Types: add IAR Rest Octets definition
See 3GPP TS 44.018, section 10.5.2.17 "IAR Rest Octets".

Change-Id: Ib1f16b310d6ca94f19a1700c78cb37e8b35ac570
2020-05-22 03:24:34 +07:00
Vadim Yanitskiy c3cebd31d9 library/GSM_RR_Types: fix definition of FeatureIndicator
Change-Id: I06ad58f25aa97bf13de87127e7e2c6237a90557e
2020-05-22 02:43:22 +07:00
Vadim Yanitskiy aa94d32fa2 ttcn3-tcpdump-stop.sh: fix echo: add -e to enable colors
This change enables interpretation of backslash escapes for echo,
so the test case execution summary is always printed in color.

Change-Id: I0cc77b4de764c7afd6416512a181c4c1610ce369
2020-05-21 20:36:37 +07:00
Pau Espin 984d09fb2f library/RLCMAC_CSN1_Types: Extend support for PacketDlAssignment
Change-Id: I5788d9fffe768bb8ebbb3fc2d93ebf014648e9bf
2020-05-20 10:46:14 +00:00
Neels Hofmeyr b05d16fe8e compare_results.py: use ansi colors
Change-Id: I2cfabc1364c53e6ee18b9471dcd7c681407d0473
2020-05-19 19:25:35 +00:00
Neels Hofmeyr 6a99bf175c compare-results.py: use python3, python is no longer available in our build images
Change-Id: I268980c8a2b0a4e826c0c488ce6315462c01cabb
2020-05-19 19:25:35 +00:00
Neels Hofmeyr a4d2100431 update expected results
Change-Id: I37014274ee97f09985c31966e7cc9122fe11a856
2020-05-19 19:25:35 +00:00
Pau Espin adbbe1e28e pcu: Expect UL ACK/NACK after all UL data is transmitted
This is needed since osmo-pcu.git
I9b4ef7b7277efa645bdb5becf2e9f6b32c99a9b1, where a bug was fixed in
which osmo-pcu was not sending UL ACK/NACK under some conditions.

Change-Id: I1a58b3984a96b432b2cb5300fc8a4261133a4f69
2020-05-19 19:21:29 +00:00
Pau Espin 692222cb99 Add initial support for Packet Uplink Ack/nack EGPRS Struct
Some stuff like EGPRS Ack/Nack description is still not implemented, but
it's enouh for now to be able to match against this kind of ACK blocks.

Change-Id: I8066fba0e71911f0c6344c1540a501f1853daa7f
2020-05-19 19:21:29 +00:00
Pau Espin aedc51186b Move all GPRS helper function to its own file and component
This is a first step towards refactoring of all functions to use MS and
Ul/DlTBF objects containing state.

Change-Id: Ieae27d6e707f79ec2145864ef5cd67ddbbec9314
2020-05-19 19:21:29 +00:00
Pau Espin 0232504843 Use osmocom fork of TELNETasp to fix compilation error spotted by gcc 10.1.0
Change-Id: I45beacb3a3141531e2552588147e3741c8637f4e
2020-05-19 19:21:29 +00:00
Vadim Yanitskiy c9c9e2962f BTS: move ASP_IPA_EVENT_UP handling to f_init_rsl()
Change-Id: I2479ce67426810d2789dda885bdbbe82b5d5282a
2020-05-18 23:45:28 +07:00