Commit Graph

116 Commits

Author SHA1 Message Date
Pau Espin Pedrol 0bf74e560a pcu: Fix counter expectancies after LLC UI dummy frame fixes in PCU
Recent commit 7d0f9a0ec383fcfca934731bd6979b6be6629c90 in osmo-pcu.git
fixed situation where lots of unneeded LLC UI dummy frames where being
sent. As a result, osmo-pcu correctly counts less dl rlcmac payload
bytes being sent, so we must adjust our test expectancies.

Related: OS#4849
Change-Id: I01c34a0948094b17cc0d67e613cd9b756f78c372
2020-12-11 19:57:38 +00:00
Harald Welte 9b461a94a3 sgsn+pcu: Port suspend/resume cases to new BSSGP_CT:GLOBAL port
For 12+ days, suspend/resume related SGSN + PCU TTCN3 tets have been failing.

It was the introduction of the BSSGP_CT:GLOBAL test port in
I40d973d80709f5d56f59247e8647b52754f09bc8 +
I805372f3024a0ec2491a24422e02c0bc6dc669d2 which caused the related PDUs
now to no longer show up where they used to.

Change-Id: I1977302fef4868dc1c330bc6f48f6a6608949393
Closes: OS#4902
2020-12-10 23:42:03 +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
Pau Espin 1b9aa78ee0 pcu: Introduce test TC_mcs_max_dl
Change-Id: If6c58cc18b537c4a1354f1b8263db8321347fbd7
2020-11-30 18:56:16 +01:00
Pau Espin e130305aa5 pcu: Introduce test TC_multiplex_dl_gprs_egprs
Change-Id: I1b6b1042f25888407f48865de220c8af7451a7f0
2020-11-26 09:20:19 +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
Pau Espin e8db673d22 pcu: Implement ACKing EGPRS Dl TBF blocks
Change-Id: I9f1b621a8365e69d2e1a33d59cb8c7a59639ad94
2020-11-18 11:51:14 +00:00
Pau Espin e4fa45b603 pcu: Introduce test TC_mcs_initial_dl
Change-Id: Ida01fb066f202033507f0c6a99212a1ff9d95423
2020-11-16 10:48:25 +01:00
Pau Espin db15fa7c06 pcu: Introduce test TC_mcs_max_ul
Change-Id: I4cc77988832a2ae431ac3c5b85de940c2419bf09
2020-11-16 10:48:25 +01:00
Pau Espin 2354d6a97d pcu: Introduce test TC_mcs_initial_ul
Change-Id: I0ee2fce7045628caf8145468b29688a9f230e7cd
2020-11-16 10:48:25 +01:00
Pau Espin cb00c52b07 pcu: Specify (M)CS to use when sending UL rlcmac data blocks
Apply padding and spare bits in the encoder according to CS/MCS format.

Change-Id: I918acac81f550077daeda3374b3de9b426ff3572
2020-11-16 09:14:28 +00:00
Harald Welte 90f1974fb0 NS_Emulation: Support multiple NS-VC within one NSE (NS-VCG)
This is something we need to simulate more complex scenarios,
particularly in the context of frame relay.

Change-Id: If1220852785853f8a5d8de183d5053ddd6ccb958
2020-11-12 20:02:07 +00:00
Pau Espin 5d07ae6d3c pcu: Introduce test TC_cs_max_dl and TC_dl_cs1_to_cs4
Change-Id: If847d091f3f4e6a7c77fbadc7280423637c50b35
2020-11-10 12:55:33 +00:00
Pau Espin 7512259cce pcu: Introduce test TC_cs_initial_dl
Change-Id: I00bae15a007935cc4e027e63de4367d83e994bd7
2020-11-06 14:20:37 +01:00
Pau Espin 4fbeefd8cf pcu: Relax some CS/MCS expectancy checks
Previous commit implemented the CS/MCS verification, and hence now some
tests fail because they had too restrictive checks.

In theory the verifications could be done so restrictive by configuring
the PCU accordingly at the start of the test, but we are not
really interested in checking the exact CS/MCS in these tests, only
checking if GPRS/EGPRS is being used.

Change-Id: I79b81d473b7428b57a0ec501c5bd0d88e35c81e3
2020-11-06 14:20:37 +01:00
Pau Espin 745a48bce3 pcu: prepare tests for new GPRS/EGPRS multiplex support
Once GPRS/EGPRS multiplexed support is ready, it will be controlled
through pcu info_ind.flags by enabling
MCS or not; the "egprs only" VTY comamnd will be dropped.
The usual setup would be to support both GPRS+EGPRS, so make that the default.
Most tests require to be passed the _noMCS variant to work in older
versions of PCU, since those versions use the "egprs only" concept which
will reject egprs_ms_class=0. Same tests enabling MCS in newer osmo-pcu
shouldn't be a problem.

Related: OS#4544
Change-Id: Ib95aae155b0712313a30f0c5404a8cb1f28b98f5
2020-11-06 14:20:37 +01:00
Pau Espin a9f27fa4f6 pcu: Introduce test TC_ul_multislot_tbf_ms_class_from_2phase
Similar to the DL TBF counterpart from last commit, this time verifying
UL multislot TBF is allocated.

Change-Id: I26a3cc0f2bd7bab176aa52df3e40aca7300de216
2020-11-06 14:20:10 +01:00
Pau Espin 8155bf4e7b pcu: Introduce test TC_dl_multislot_tbf_ms_class_from_2phase
Change-Id: Ie0035bab79c286a968394d7b724d975f43d187ce
2020-11-06 14:19:19 +01:00
Pau Espin 0ea8b6f355 pcu: Introduce test TC_dl_multislot_tbf_ms_class_from_sgsn
Related: SYS#5131
Change-Id: I417953a4c89dec82500b3b66f08ed648d266d813
2020-11-06 14:17:21 +01:00
Pau Espin 2aead38cdc pcu: Add infra to handle multitrx and multits envs
ARFCNs are allocated sequentially, so that conversion between
arfcn<->trx_nr is easily done.

Some helper functions are introduced to be able to submit and expect
messages on a given TRX+TS, which is required for setups with several
TRX and PDCH-enabled TS different than the default. These new APIs
will be used in PCU_Tests.ttcn in subsequent patches.

Change-Id: I28430e6d8c77d2b7dc630d186d425a5d82587b82
2020-11-06 13:08:50 +00:00
Vadim Yanitskiy dbd4b245c0 PCU_Tests: verify CS paging of multiple subscribers
The change introduces three new test cases:

  - TC_paging_cs_multi_ms_imsi,
  - TC_paging_cs_multi_ms_tmsi,
  - TC_paging_cs_multi_ms_imsi_tmsi.

Each of these establishes 56 Uplink TBFs, and then enqueues 56 CS
PAGING requests from the SGSN side.  The main idea is to verify
encoding and compositing of the paging MIs in PACCH massages.

Change-Id: Ie8b4006f969598c9b0c452002d559f985d108a66
Related: OS#4838
2020-11-02 19:24:45 +07:00
Vadim Yanitskiy 8a02b92ce0 PCU_Tests: add 'f_multi_ms_' API for multi-MS test cases
Change-Id: Ie2cc717f9f50db16748fe4e4a0ad80d549981e61
Related: OS#4838
2020-11-02 19:24:45 +07:00
Vadim Yanitskiy 3e5f07436a GPRS_Components: generalize both f_pkt_paging_match_{imsi,tmsi}()
Change-Id: Ie0578fa299cdac18e942350b2e879839c9bd9dba
2020-11-01 04:05:33 +07:00
Vadim Yanitskiy 1cea9fdcb7 GPRS_Components: add RA definition for single block packet access
Change-Id: I8997121f1b1207d4236f5911befc3c29278f37d8
2020-11-01 02:01:59 +07:00
Vadim Yanitskiy d5321fbdea library/PCUIF_Types: add f_PCUIF_ver_INFO_PDCHMask_set()
Change-Id: I443bc99d35994dda14cdf9c41609d528368c401f
2020-11-01 02:01:59 +07:00
Vadim Yanitskiy e94164d22e library: fix Repeated Page Info IE in PacketPagingReq
Change-Id: I39e8e3991cc248602460b7f162a0b57c2925315f
Related: OS#4838
2020-10-31 20:24:44 +07:00
Pau Espin b20b7e59f9 pcu: Parse TS and TRX allocation from Assignment in Ul/DlTbf objects
This will allow tests to use multitrx and multislot scenarios.

Change-Id: Ia2b9dd73f61c7068a729b427c118ae2ef027c30b
2020-10-30 13:23:52 +01:00
Pau Espin 7ebc1124ef pcu: Fix TC_egprs_pkt_chan_req_reject_exhaustion
older versions of osmo-pcu were broken and were only allocating TBFs in
the first TRX available. This is now fixed and hence osmo-pcu tries
better to allocate TBFs across different TRX. That's why the test needs
to be fixed to set up only 1 TRX in order to run into the same scenario.

Change-Id: I3f6633950bb89dde3f87a237359497f5b23e0fee
2020-10-30 08:59:34 +00:00
Pau Espin b9b1baae57 pcu: Remove empty lines at end of file
Change-Id: I69e8c2b49c4726078a343fd628b6ddbc9ad0efdc
2020-10-26 17:47:23 +01:00
Pau Espin bfd69f6133 pcu: Introduce test TC_multitrx_multims_alloc
Related: OS#1775
Change-Id: I6b20fded6b2a1896fb7ec47c7c5dcbdcbe27f771
2020-10-26 17:46:44 +01:00
Vadim Yanitskiy ceb1f9888f PCU_Tests: fix readability of code using t_RLCMAC_UL_DATA_TLLI
Change-Id: I175f8ce2606050c6b4ea54eae4e00846291d462f
2020-10-19 18:02:15 +00:00
Vadim Yanitskiy 8e6df0c811 PCU_Tests: add missing f_shutdown(final := true) statements
Otherwise those test cases may sporadically fail due to DTE:

  Sending data on the connection of port CLCK to 8:CLCK failed. (Broken pipe)

Change-Id: Ia8c934697a4e7bc39e762bf81587fea3bbe11b17
2020-10-19 18:02:01 +00:00
Vadim Yanitskiy c67240a021 PCU_Tests: fix f_TC_mt_ping_pong() header readability
Change-Id: I2d2e80fe411c0677b8f8d7833ec2b9ea62888221
2020-10-17 16:03:15 +07:00
Vadim Yanitskiy d53fb672c9 PCU_Tests: introduce TC_pcuif_info_ind_subsequent()
This change reproduces a segfault caused by the recent regression [1].
The IUT tries to bind on BSSGP host:port that it's already bound to.

[1] Ib389925cf5c9f18951af6242c31ea70476218e9a

Change-Id: I4c3bc883d795e5d1ee5ab175ac03684924692a7c
Related: SYS#5108
2020-10-10 10:30:06 +00:00
Harald Welte 5339b2e372 BSSGP_Emulation: Support multiple PTP-BVC within one Entity
The existing BSSGP_Emulation is built around the assumption that every
instance of BSSGP_Emulation only servers one signaling-BVC and one
PTP-BVC.  While this is true for osmo-pcu at this point (BTS-colocated
PCU), other BSS/PCU implementations differ.

In general, there can always be any number of PTP BVC (one per cell)
next to the signaling BVC (one per BSS).  Let's represent this in
BSSGP_Emulation so we can create more comprehensive tests.

Change-Id: I7e30b4c4e188518a574e082962fba457b3a97ce3
2020-10-09 12:27:11 +02:00
Harald Welte 5e8573e9b7 NS_Emulation: Prepare NSConfiguration for non-IP providers
NSConfiguration currently contains parameters relevant only for IP
based transport.  Move IP/UDP parameters into a sub-structure in
anticipation of Frame Relay support.

Change-Id: I6904520d8c2f546327029777d68b1907611a8cf5
2020-09-27 09:15:32 +00:00
Daniel Willmann 535aea686e pcu: Check stats for pcu channel allocation, bytes transferred
Change-Id: I90964b32fa11ed2582afc5fb56bd302b06606f86
Related: SYS#4877
2020-09-25 12:31:36 +00:00
Alexander Couzens e0f7c543b7 NS_Emulation: remove dependency on PCUIF_Types
The dependency of PCUIF_Types creates also a dependency on

Replace the PCU_AddrType by an unix like address family defined
in the Osmocom_Types to reduce the dependency.

Change-Id: I0b4fda96accef401ffc009010f9f5621583fd6dd
2020-09-17 23:29:16 +02:00
Alexander Couzens 1e5dc48213 library/PCUIF_Types: version 10: support IPv6 NSVC addr
Change-Id: I13b03c380edc2dc609c5e4053462a3cd6f78ce72
Tweaked-By: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
Related: SYS#4915
2020-09-11 10:35:56 +00:00
Vadim Yanitskiy 7a04cdd9aa PCU_Tests: randomize MA length in f_TC_pcuif_fh_params_gen()
This way we also test different variations of MA length.

Change-Id: Id886ed72c8a03fe2b27bc7add74eb0f58a2fe6ff
Related: SYS#4868, OS#4547
2020-09-08 19:04:20 +00:00
Vadim Yanitskiy 43ccaf51f2 library/PCUIF_Types: version 10: add Mobile Allocation length field
My initial assumption was that we can skip redundant '0'B bits or
even '00'O octets in the Mobile Allocation IE, and thus reduce
the overall size of this element.  Unfortunately, this is wrong.

3GPP TS 44.018, section 10.5.2.21 clearly states that the Mobile
Allocation IE contains a bit-string of size NF, where NF is the
number of frequencies in the cell allocation.  If NF % 8 != 0,
then '0'B padding bits must be appended to make it octet-aligned.

In other words, if the cell allocation contains let's say 13
frequencies, but a hopping timeslot makes use of only a small
fraction of it (e.g. 4 first channels), we would still need to
transmit at least 13 bits (+padding), including all redundant
bits and octets.

In RLC/MAC frames though it's not required to make the bit-string
octet aligned, so we need to send exactly NF bits without padding.

In order to achieve that:

  a) add MA length field to INFO.ind (record PCUIF_InfoTrxTs);
  b) ajust the existing test cases to use this field.

It's safe to merge this change as the related patches have not
been merged to osmo-pcu and osmo-bts yet.

Change-Id: I2709673c90a0cd7d76de9db8b8ad82ac59ca84a0
Related: SYS#4868, OS#4547
2020-09-08 19:04:20 +00:00
Vadim Yanitskiy ef0c1b5943 PCU_Tests: introduce and use f_TC_pcuif_fh_params_gen()
Change-Id: I297b52410afafedad51d5b51734e946c4d62e8d2
Related: SYS#4868, OS#4547
2020-09-08 19:04:20 +00:00
Pau Espin c03eb12b58 pcu: Test Downlink UNIT_DATA messages from SGSN containing IMSI IE
osmo-pcu.git 0052051c07af63da98137c9f8e3b3119642eb587 introduced a bug
(fixed in 1d68cdff928f32941aff36c70e4543203c283d15) where no MS could
GMM attach to the network, but no test showed the issue.
This couple test verifies both correct behavior and also ensures wrong
IMSI is detected and reported.

Related: OS#4729
Change-Id: I5072d80b7ed9945a6083cdf3254efb8b8f119c54
2020-08-29 07:56:46 +00:00
Vadim Yanitskiy 3b464a9812 library/GSM_RR_Types: s/MobileAllocation/MobileAllocationLV/g
Change-Id: Ica803221e885b4746fd42c17cd2828c0ef35a6aa
2020-08-28 05:55:58 +07:00
Vadim Yanitskiy 0d59080469 library/PCUIF_Types: fix typo: s/local_pprt/local_port/g
Change-Id: Ic81469107d16c47f02db93a4fe9c35b7825d74b5
2020-08-21 11:59:00 +00:00
Vadim Yanitskiy 94fe83e8ab PCU_Tests: verify handling of frequency hopping parameters
Change-Id: I1beda9224998848f9243237413e5ae3e0ddab8a5
Related: SYS#4868, OS#4547
2020-08-09 20:03:38 +07:00
Vadim Yanitskiy 9e1206c791 library/PCUIF_Types: version 10: add frequency hopping parameters
This change introduces new version 10 specific extensions, in
particular: the frequency hopping parameters of each timeslot.
These parameters are used to compose Channel Description IE
in the packet resource assignment messages.

In order to maintain backwards compatibility with version 9 of
the PCUIF, and thus to still be able to run test cases against
the latest release of osmo-pcu, I kept the old parts of the
INFO.ind and gruoped them together with the new records
into union 'PCUIF_InfoTrxs'.

During decoding, the content of this union is resolved by the
TITAN's RAW codec itself, depending on value of the 'version'
field.  During the encoding, it's the responsibility of the
API user to set a proper field of the union.  I implemented
both f_PCUIF_ver_INFO_{Trxs,PDCHMask} helpers for that.

Version 9 is kept as default, so this change can be merged
independently of the actual implementation.  We can bump
it and remove the compatibility glue once the new versions
of both osmo-bts and osmo-pcu are released.

Change-Id: Idf11bc4ba3ff0b00b32f2beab8fd020c67119d05
Related: SYS#4868, OS#4547
2020-08-09 19:58:25 +07:00
Vadim Yanitskiy 7431e9e8db GPRS_Components: s/f_ms_rx_imm_ass_pacch/f_ms_rx_pkt_ass_pacch/g
Immediate Assignment is sent on AGCH/PCH, while on PACCH we have
Packet Uplink/Downlink Assignment instead (see 11.2.29, 11.2.7).

Change-Id: I56473ae5dfa565d2c9d26984b14685a4163bf69a
2020-07-23 04:57:05 +07:00
Vadim Yanitskiy f3cb4ddc86 library/RLCMAC_Templates: make ts_RLC_UL_CTRL_ACK accept a template
Change-Id: Ia71401b5c0d439eeb0dc58739ef0e68b15d4123f
2020-07-21 16:14:20 +00:00
Vadim Yanitskiy c155930c22 library/PCUIF_Types: make PCUIF version configurable
When changing the PCUIF, we have to maintain backwards compatibility
with the release versions of both osmo-pcu and osmo-bts, not only
with the recent master.  In order to achieve that, let's introduce
'mp_pcuif_version', so the PCUIF version can be adjusted.

Change-Id: I3cf7f908e606b91dd2cbddc168827dd074aed052
Related: SYS#4868, OS#4547
2020-07-20 04:32:59 +07:00