Commit Graph

317 Commits

Author SHA1 Message Date
Vadim Yanitskiy 40bc162398 PCU: remove deprecated 'alpha 0' from osmo-pcu.cfg
Change-Id: I38d2d141a0743cc4bb61f62a98d7cc5c1384cff5
2021-06-21 09:36:13 +00:00
Alexander Couzens bd6e9a1da9 RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
RAW_NS used previous a single TTCN3 port for a single UDP port
(source/listen side).
This has the limitation that only a single NSVC could be tested for a
local UDP port. However SNS tests require multiple NSVCs over a single UDP port.
NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation.
Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use
multiple NSVCs.

Related: OS#5036
Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976
2021-06-15 20:20:44 +00:00
Vadim Yanitskiy 866f870b7a PCU_Tests: new test case TC_ta_ul_ack_nack_first_block()
In a busy network, there can be a significant delay between resource
allocation (Packet Uplink Assignment above) and the actual time when
the MS is allowed to transmit the first Uplink data block.

Verify Timing Advance value indicated in Packet Uplink ACK/NACK message
sent in response to the first Uplink block after resource allocation.

Change-Id: I30f82c51b3e9a167af4dbce3e74697dd79ff15bf
2021-06-04 21:05:01 +00:00
Vadim Yanitskiy 474ec92c7f f_ms_tx_data_ind(): indicate actual Timing Advance in DATA.ind
Change-Id: Id89a5ed1ea82a81f0ce4e75204117afb322f5264
2021-06-04 19:57:35 +00:00
Pau Espin 1451f9f860 pcu: Introduce test TC_t3141
Change-Id: I5f30e93de4a109d60577394da4e00a15ab23d1d6
Related: OS#1940
2021-05-18 19:04:09 +00:00
Pau Espin 436e2bdb4c pcu: Introduce test TC_rim_ran_info_req_single_rep_eutran
Related: SYS#5314
Change-Id: I87f3daba1521d2dc8eed78ffdc6de5744484ba7a
2021-05-17 20:33:00 +00:00
Pau Espin 9fc065a3c3 pcu: Fix block_nr in tx PCUIF
Change-Id: Ic816862d8bdca1ea9b8c34b49129beb7e055258c
2021-05-13 18:03:24 +00:00
Pau Espin 93ae4527bf pcu: TC_n3103_max_t3169: Send TLLI in UL blocks
Otherwise MS is not behaving correctly and newer versions of PCU (more
strict checking TLLI and behaving better) may not accept it and make the
test fail.

Related: OS#1940
Change-Id: I2efa5ce97bf2c82727efcbdebdc0a0b686664e12
2021-05-13 18:03:24 +00:00
Pau Espin a5cee4c8e6 f_TC_egprs_pkt_chan_req_reject: Validate WaitIndication in ImmAssRej
Related: OS#3928
Change-Id: Id277f11b411d7b18e3a0445e0c76cbd107c6857d
2021-04-27 10:28:11 +02:00
Pau Espin 8f56ecd65c pcu: Drop test TC_t3169
This test was added a long time ago to test what used to be the previous
early implementation of T3169, which didn't follow specs as per TS
44.060.
Since recently, osmo-pcu supports tracking UL PDCH blocks and hence
properly implementing N3101 and N3101, finally also implementing T3169
correctly.
The counters N3101/3 and timer T3169 are already being tested in
following tests:
TC_n3101_max_t3169
TC_n3103_max_t3169

Since osmo-pcu I2cec531e2633281b88f69ba065c0105580c81076, time-based
T3169 is dropped and TC_t3169 doesn't pass anymore, since it had wrong
expectancies (because it's not sending RTS to osmo-pcu, hence not
triggering USF/RRBP N3101/3 timeouts).

Change-Id: I023fb406f1df6e67e16982cb11dc1fcb6fb9b544
2021-04-27 10:28:11 +02:00
Pau Espin dee557059b pcu: Take into account TbfStartingTime
New versions of osmo-pcu will validate the Pkt Resource Request is sent
on the correct FN, so we must send first UL block exactly when
requested.

Change-Id: I6dad0f3167ace8d4a763fed971db94f32faf6ced
2021-04-27 10:28:06 +02:00
Alexander Couzens 619213f8ef fix typo in NS_CAUSE_PROTOCOL_ERROR_UNSPECIFIED
Change-Id: Ifbf86138f3f2e9c053c99b6f58c510d38bad4e88
2021-04-24 14:07:20 +00:00
Pau Espin cc895dfc4d pcu: Introduce test TC_n3103_max_t3169
Related: OS#5033
Change-Id: I90661ce249ff2a2040b9e82688cf413eb65e0c8e
2021-04-21 18:19:47 +02:00
Pau Espin bf8c71f8ac pcu: Fix TC_n3105_max_t3195
The previously request Dummy block was processed later in an unrelated
place of the test, hence making expectations fail.

The condition T_3195.running doesn't really change the logic/behavior,
but removes an annoying warning in log files everytime the alt step is
run.

Change-Id: I4aa25d1220ccbeb8f1870f36651c9d6793a452b1
2021-04-21 18:08:15 +02:00
Pau Espin aa45707156 pcu: Fix DATA.ind with SAPI BCCH wrongly txed as PDTCH
This fixes failure of test TC_rim_ran_info_req_single_rep
It probably broke during some infra refactoring of the PCUIF_Components.

Change-Id: Idf9a38280abd6243cc9ef09fc7d033e515c5be15
2021-04-19 18:21:49 +02:00
Pau Espin 02a6d0c489 pcu: Fix typo in variable name
Change-Id: I8233b0b7f425fba4cbea9859a13b6e612cccede2
2021-04-19 17:11:07 +02:00
Alexander Couzens 4e048c3311 pcu: SNS: TC_sns_so_bvc_reset_unknown_bvci: use g_handle_rx_alive
The g_handle_rx_alive allows ignoring any ALIVE PDUs when
using f_exp_ns().
This improves the stability as the ALIVE and BVC-RESET
can come in any order.

Change-Id: I3b4ab4093b3e5bee7e32fdf6c1de3f692b13a35f
2021-04-12 08:24:33 +00:00
Alexander Couzens 3efa501b0d pcu: SNS: add TC_sns_1c1u_unconfigured_nsvc
There shouldn't any unconfigured NSVC after the configuration phase. The unconfigured
NSVC is used in the SNS configuration phase and must be removed when the configuration
is done and the NSVC is included in the configuration.

Related: SYS#5416
Change-Id: Iac6c8966aafd1cb2fab515de091e94607eb7c040
2021-04-06 15:57:51 +02:00
Alexander Couzens 8094254ff9 pcu: PCU_Tests_NS: add support for vty
Allow to use the vty by test cases. f_init_vty(id) must be called
before using the vty.

Related: SYS#5416
Change-Id: Ib2011babb123e1e1bb576e72b9bfbda90dce2df7
2021-04-06 15:57:51 +02:00
Harald Welte 424ec5211c SGSN: Some initial SNS tests for IP-SNS in OsmoSGSN
Change-Id: I821d998704756fa30278f41d0371051db9d3fc58
2021-04-01 21:27:33 +02:00
Pau Espin 73c5d37846 pcu: Adapt N3101_MAX verification expectations
There's some offset between Tx and Rx path, so we need to account for
differences counting and finding out USF blocks didn't arrive.

Change-Id: I868e7d24c8bdc9b85797f8fe4f9ee1bc5a3d1adb
2021-03-29 14:23:05 +02:00
Pau Espin 4ceb61c063 pcu: Avoid early TBF release due to N3101 in TC_multiplex_dl_gprs_egprs
Also change a bit expectations, since it can actually happen that DL
blocks for GPRS-only MS never signal USF for itself, which is
still fine.

Change-Id: Iedff87cedf55ab18b32bd0f159d1145901878203
2021-03-29 14:22:40 +02:00
Vadim Yanitskiy 1da1fefb73 library/PCUIF_Types: get rid of version 9 compatibility glue
Change-Id: Ia9f366ca1fdad700a90ca3367e43523f7bac39a1
Related: OS#5083
2021-03-23 13:41:09 +00:00
Harald Welte 093a69b3a6 pcu: sync configs with docker-playground
Change-Id: I41f6ebd63e5e551184f0863cd388c373ab0a1130
2021-03-23 13:14:21 +01:00
Pau Espin c62ebac3a3 pcuif: make variable const
Change-Id: I0450a49a4c9a8e0e1252d6561fb93f6fb4585748
2021-03-12 15:07:06 +01:00
Pau Espin ed9ca9719e pcu: Set up PCU TDMA clock by sending initial DATA.ind
In recent osmo-pcu commits, initial fn was changed to invalid value -1,
in order to be able to detect FN jumps. previously, the initial value
was set randomly to 0, which was wrong anyway because first FN received
from the BTS could be any other FN counted by the BTS at that time.

This makes some tests fail because they send RACH.ind + RTS.ind to
receive the Imm Assignment, and the Request reference in the Imm Assign
was calculated on the invalid unset FN "-1", hence it won't match test
expectancies.

In order to fix it, simply make sure the TDMA clock is initiated by
sending a DATA.ind to the PCU before tests start doing stuff
(f_init_raw() is blocked waiting for BTS_EV_SI13_NEGO).

Related: osmo-pcu.git Change-Id I29fb27981597edc69abb976049ba41aa840488cb
Related: OS#5020
Change-Id: I00c4dd9133ec9a236bf28fb8cb0afd0615791012
2021-03-12 12:59:30 +01:00
Pau Espin 873686f029 pcu: transmit PCUIF DATA.ind with len=0 when no UL data to transmit
PCUIF will be updated to always send DATA.ind for each expected block FN
on any activated PDCH slot, irrespective of whether valid data was
received or not, similarly to what's done already for TRXDv1 NOPE.ind in
TRXD and TCH channels in OsmoBTS. The aim at this change is to be able to
track TDMA clock in an accurate way without hops, and hence be able to
detect on time whether expected UL blocks (SF, RRBP poll) didn't arrive.

Older osmo-pcu versions can cope well with this change, they will simply
print an error upon ach data_len=0 messages received and submit a GSMTAP
block, then discard it, so tests still pass.
Nevertheless, a new module parameter is added to disable this new
behavior in order to avoid logs and pcap files ending up clogged with
uneeded information until a new osmo-pcu release appears.

Related: OS#5020
Change-Id: Ib4f97a9bcfa68230945effeb6412218faa64ec78
2021-03-12 11:44:42 +00:00
Harald Welte 5a8540f9c1 pcu: Fix PCU_Tests_SNS.TC_sns_so_bvc_reset_unknown_bvci
All BSS-originated BVC-Reset for PTP BVC must contain a Cell Identifier.
This test is not respecting that rule

libosmogb correctly detects this and discards the RESET, which is not
what is intended here:

20210305120722368 DLBSSGP ERROR BSSGP BVCI=1235 Rx RESET missing mandatory IE (gprs_bssgp.c:392)

Change-Id: I57ebfc50befc47d0690021d73b52c504f0df4f9a
Related: OS#3879
Fixes: Iea5519b453dd544c5a78b3b16ddb5132d20cf67c
2021-03-10 12:30:19 +00:00
Pau Espin f30fa1d24d pcu: Introduce test TC_n3101_max_t3169
This test currently fails to pass in master osmo-pcu (and latest) due to
T3169 not being implemented exactly as per specs (due to limitations in
detecting lost UL blocks with assigned USF).

Related: OS#5033
Change-Id: I56177850f084cdaf4fcac63ebdcdff9cef4e7a5d
2021-03-05 15:06:49 +01:00
Pau Espin 14ca7e3398 pcu: Introduce test TC_n3105_max_t3195
Related: OS#3928
Change-Id: I6f756c928509364fee14c552279f01b4e4f0e060
2021-03-05 15:04:50 +01:00
Pau Espin 84a8c3c3dd pcu: Introduce tests to validate X2301 and T3191
They are tested together since anyway in order to reach T3191 we need to
go through X2301 (IDLE TBF timeout).

Related: OS#3928
Change-Id: Ib6dfc5711b9c6f1fd404bce424bbf4b115fc930e
2021-03-05 15:04:47 +01:00
Pau Espin Pedrol 90fdfed829 pcu: Introduce test TC_dl_no_ack_retrans_imm_ass
Change-Id: I1c1d89f3de9ba158f802e7759ef78dc84f48218f
2021-03-04 12:43:25 +01:00
Pau Espin Pedrol ddd6c3f656 pcu: f_TC_mo_ping_pong_2phase_access(): Fix race condition
Sometimes the DL data may arrive too late to PCU and it may be requested
to tx before it arrives, hence the PCU will in that case schedule and
transmit a UL ACK/NACK instead of the expected DL data.

Change-Id: Iaee546e2021e86ca6da19ab73cc8d283a827a665
2021-03-03 14:38:53 +00:00
Pau Espin Pedrol fdbce84e7a pcu: f_TC_mo_ping_pong_2phase_access(): Drop sending TLLI after 2nd phase
There's no need to send the TLLI after 2nd phase access.

Change-Id: Id8230f8eebf0a3e1468b84f802c6704a19eb97d5
2021-03-03 14:38:53 +00:00
Pau Espin 76de166a56 PCUIF: Fix naming of counters in InfoInd
Change-Id: Ieb26020e0f18169f19322963e23358b6ca254545
2021-03-01 17:42:45 +01:00
Alexander Couzens 025bbc0b6d pcu: add TC_sns_so_bvc_reset_unknown_bvci
Do an SGSN originated reset of signalling BVCI,
then do a SGSN originated reset of an unknown BVCI.

PCU  -X SGSN: BVCI  0 BSSGP-RESET (ignores reset)
PCU <-  SGSN: BVCI  0 BSSGP-RESET
PCU  -> SGSN: BVCI  0 BSSGP-RESET-ACK (with cell information)
PCU  -X SGSN: BVCI 23 BSSGP-RESET (ignores reset, 23 is configured on PCU, 24 is not configured)
PCU <-  SGSN: BVCI 24 BSSGP-RESET (unconfigured BVCI)
PCU  -> SGSN: BVCI 24 BSSGP-STATUS Unknown BVCI

Related: OS#3879
Change-Id: Iea5519b453dd544c5a78b3b16ddb5132d20cf67c
2021-02-28 10:37:22 +00:00
Pau Espin eef4607203 BSSGP+pcu: Get rid of mp_tolerate_bvc_reset_cellid
Since we have new releases in -latest, we don't need this param since
it's never set to true.

Related: OS~5042
Change-Id: Ic496407fd2139b3a5221c30f1798797320cdee24
2021-02-26 13:39:45 +01:00
Pau Espin 4858184bd4 StatsD_Checker: Enable by default
It was previously disabled by default in order to avoid test breakage
with older versions of osmocom projects not supporting them. Since we
just did a new release, all -latest contian now master which should work
fine.

Don't remove the moduleparam yet in order to avoid breakage with some
cfg files in docker-playground.git still setting it to true.

Related: OS#5042
Change-Id: I4e2049c109986906d3c985ca2282174b1abff581
2021-02-26 12:42:35 +01:00
Vadim Yanitskiy 37f3333fcf PCU_Tests: make use of GprsMS in TC_ta_idle_dl_tbf_ass()
Change-Id: Ife9cea132f47c528702e653ac061fa3851090a24
2021-02-21 01:39:57 +01:00
Pau Espin 1303577b72 pcu: Introduce test TC_nacc_outbound_pkt_cell_chg_notif_nonassigned_dl_tbf
Triggers osmo-pcu assert in nacc_fsm.c due to scheduler not checking if
tbf has TFI assigned before deciding to transmit NACC related messages.

Related: osmo-pcu.git Change-Id I72b2dff28aacdb04909c098c94834ff79f55b31d
Related: SYS#4909
Change-Id: Id293e41e6b4380f2794007779ad430544bbe578a
2021-02-18 17:41:21 +01:00
Pau Espin Pedrol 179ddef0f1 pcu: Introduce several tests TC_nacc_outbound_pkt_cell_chg_notif_twice*
These tests verify the NACC FSM adapts to MS restarting the NACC
procedure at any point when it selects for another tgt cell.

Related: SYS#4909
Change-Id: I42908a00f8d076e3559efde298a739d6b26d090e
2021-02-13 08:20:20 +00:00
Pau Espin Pedrol 0d6ebb7f2c pcu: Introduce several tests TC_nacc_outbound_pkt_cell_chg_notif_dup*
These tests verify retransmission of duplicated Pkt Cell Change
Notification messages are ignored once the NACC procedure is already
ongoig.

Related: SYS#4909
Change-Id: Ib83eacfab7a73a2a51ab08801ff1c00c0058057c
2021-02-13 08:20:20 +00:00
Pau Espin Pedrol 6cb71cc2e0 pcu: Convert f_handle_pkt_neighbor_cell_data impl to use alt statements
Change-Id: Iac9306cdcf16d9eaa750f6ca10f0c9df6f2c7453
2021-02-13 08:20:20 +00:00
Pau Espin Pedrol d4ed360dbf pcu: Introduce tests checking Pkt Cell Chg Notif different msg retrans
Tests verify MS retransmitting a Pkt cell Chg Notif with different
target cell (hence a different NACC procedure) will be handled correctly
if PCU state was in the middle of handling a different NACC request.

Related: SYS#4909

Change-Id: I68c749aaabe9fe8272fc43045be09a46852359e5
2021-02-12 14:40:54 +00:00
Pau Espin Pedrol 6a71548d47 pcu: Introduce tests checking Pkt Cell Chg Notif dup retrans
Tests verify dup retrans triggered by MS timer are ignored if the target
cell is still the same (and hence no logic/behavior change is required,
current process can proceed onwards).

Related: SYS#4909
Change-Id: I00e8c1a63392bf8753f58f7d9d2d0e903ac5c529
2021-02-12 14:40:54 +00:00
Alexander Couzens 98ee6f6507 pcu: move generic RAW_NS_CT function to library/RAW_NS
Allow the NS tests to use the SNS functions.

Change-Id: I6c404475f39dd00023eb11e98da93ee423604039
2021-02-09 15:49:15 +01:00
Pau Espin Pedrol 0af478ebe1 pcu: TC_rim_ran_info_req_single_rep: don't duplicate si_default locally
The same values are available for several tests as gloval consts.

Change-Id: I32b7d841bc1fa896f9866c5d7fba857e1ca65ab3
2021-02-08 18:35:38 +01:00
Pau Espin Pedrol fa64e2885b Fix tons of warnings in RLCMAC and pcu
Change-Id: Ia3b7c5f9fdf571f99859027dbab8731ea1a8e830
2021-02-08 18:35:38 +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 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