Commit Graph

407 Commits

Author SHA1 Message Date
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
Pau Espin Pedrol db317650b4 pcu: Fix inadequate restriction on the referenced template parameter
Fixes:
 warning: Inadequate restriction on the referenced template parameter
 `chreq_desc', this may cause a dynamic test case error at runtime

Change-Id: I10b170c13aedc8abaaaf3b67d563ade8c3586c5b
2021-02-08 12:32:07 +01:00
Alexander Couzens 03f6606181 pcu: fix syntax in PCU_Tests.cfg
There was a missing comma in the configuration as well the
indention was misaligned.

Related: OS#4953
Fixes: be7afce974 ("NS_Emulation: Respect data_weight==0 or signalling_weight==0")
Change-Id: I7f146ff71c107983e5787982970d0f6cd313cde9
2021-02-05 20:45:52 +00:00
Pau Espin Pedrol 13ab5eaeca pcu: Define a global default set of MS RaCap
We initialize those verbose structures over and over in different tests,
and we usually don't care about detials, only whether they enable EGPRS
or not.
So let's define them once and reuse them in tests whenever possible.
Some tests requiring specific values (eg to test allocation of 8 PDCH on
a single TBF) are left intact.

Change-Id: Id047929ad71dc7e330b09fd6cbfab2da43320fde
2021-02-05 12:01:14 +01:00
Pau Espin b34bb061cd pcu: Rewrite GPRS_Components functions to use pre-decoded RLCMAC blocks coming from PCUIF
This is only a step towards a major set of changes.
This specific commit changes internal implementation of functions to stay
compatible with existing tests.
Later on, changes will be modified to use the new altsteps directly.

Related: OS#4927
Change-Id: Iecc33565fdc673e3499db12a0d4e0587290cfd45
2021-02-05 12:01:14 +01:00
Pau Espin cf5c33e0cd PCUIF: Allow receiving decoded RR/RLCMAC blocks in DATA REQ
This way tests can match directly on specific RLCMAC blocks, giving the
opportunity to handle different types using altsteps.
Before this, a user of the port could only receive a pcu_msg DATA_REQ
with a octetstring containing the rlcmac block, then decode it in a
second step when already in the alt step.

Related: OS#4927

Change-Id: Id8628e327d16c3a57e680e5a1ba0a2a8874f3a23
2021-02-05 12:01:14 +01:00
Pau Espin f7e947af0b pcu: TC_bssgp_dl_unitdata_with_invalid_imsi: Expect BSSGP STATUS on correct port
Change-Id: I0457302fef24a362f0720247ea653b06af9e1c87
2021-02-03 08:38:47 +00:00
Pau Espin Pedrol 2abbba90f1 pcu: Introduce test TC_nacc_outbound_success_no_ctrl_ack
Related: OS#4909
Change-Id: I371033604db8ae845e7c3fb03aef1821520064d9
2021-02-03 08:34:32 +00:00
Pau Espin Pedrol a846e619a7 pcu: ACK Pkt Cell Change Continue
Related: OS#4909
Change-Id: I73aaa80e73b2abb06fd0084433122337dc9c4e3f
2021-02-03 08:34:32 +00:00
Philipp Maier d55fe7e7c2 PCU_Tests: add testcase TC_rim_ran_info_req_single_rep and _no_si
Perform a full RAN information request (single report) against the PCU
and check the results. Also test what happens when the request is issued
at a time where osmo-bts has no system information available.

Depends: osmo-pcu Id72118120c14984d2fb1b918b41fac4868150d41
Change-Id: I9054ab0e969c0fbfdc671c92d44cc61360959adc
Related: SYS#5103
2021-02-02 21:56:31 +01:00
Pau Espin 853666813e pcu: Introduce test TC_nacc_outbound_success_twice_nocache
Change-Id: I64369eb02fa611f9249696ffe249b0d6d917fa70
2021-02-01 12:24:59 +01:00
Pau Espin e51c17ae4a pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_conn_refused
Change-Id: Ia0452879edb958098598e9e1c943f4e1e458a9bf
2021-01-30 19:17:49 +00:00
Pau Espin 43be42557e pcu: Introduce test TC_nacc_outbound_success_twice
Change-Id: Ia7b1584b3f7abfa2697a1f155c8b7788a3b0722e
2021-01-30 19:17:49 +00:00
Pau Espin 4b5227ccf1 pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_fail_parse_response
Related: SYS#4909
Change-Id: If7efddb1ae2ccb580fe85c8df45c9ccdb818c6f3
2021-01-30 19:17:49 +00:00
Pau Espin 9076ee7412 pcu: Introduce test TC_nacc_outbound_si_resolve_timeout
Related: SYS#4909
Change-Id: If0032b940685efaaa8f65357c56c3383fab3e283
2021-01-30 19:17:49 +00:00
Pau Espin 31e30646cf pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_timeout
Related: SYS#4909
Change-Id: Ia09fbfe9aba34a51e0715d1c307de280e3ae0249
2021-01-30 19:17:49 +00:00
Pau Espin 0637ba0728 pcu: Introduce test TC_nacc_outbound_success
Related: SYS#4909
Change-Id: I951db4af731e5a7c207f0f407dd78d166e2d3d26
2021-01-30 19:17:49 +00:00
Pau Espin 46e3604fc8 pcu: Ignore dummy rlcmac packets in f_ms_rx_pkt_ass_pacch
Allow ignoring for received dumy packets while waiting for a Pkt Ass on
PACCH. This fixes some tests failing sometimes due to race condition
where rlcmac packet is requested too quicky, after the PCU has received
the BSSGP packet we sent to it.

The function is splitted into an internal altestep + a wrap function
which is compatible with tests already using it.

Related: OS#4779
Change-Id: I0a10d3a7383d8534e9263864b4130a96392e6198
2021-01-26 12:46:56 +00:00
Harald Welte be7afce974 NS_Emulation: Respect data_weight==0 or signalling_weight==0
* allow configuration of signalling + data weight for each NS-VC
* advertise per-NSVC signalling/data weight in SNS-CONFIG
* keep track of unblocked NS-VCS separately for data / signalling
* transmit BVCI=0 traffic only over signalling NS-VC
* transmit BVCI>0 traffic only over data NS-VC
* accept incoming BVCI=0 traffic only if signalling_weight > 0
* accept incoming BVCI>0 traffic only if data_weight > 0

Related: OS#4953
Change-Id: I9798e639b4bc8658482945970775b012b5840779
2021-01-20 15:56:31 +01:00
Pau Espin efe66646aa pcu: Connect to RIM port from BSSGP_Emulation
It will be used in next commits to test RIM related topics (such as
NACC).

Change-Id: I8113d9ef5433ae0976227408133a53397aeae41a
2021-01-20 14:42:23 +00:00
Alexander Couzens c316572db1 RAW_NS: rework NS connection to use NS_Provider
Previous RAW_NS only supported NS over UDP because
it handled the UDP connection on it's own.
Because of this there was no cleanup function for the tests
because no virtual component were started.
Using the new NS_Provider allows to use the same tests over
UDP and FR with no changes.

Change-Id: I8a3b6c72798a75f434f54229fdbfc802cd13967e
2021-01-17 15:59:26 +00:00
Alexander Couzens 7d8c0e3b35 update expected-results.xml
Change-Id: Ib4399aa488afd917e3eda5e79d56ea3797ef7c78
2021-01-14 21:40:30 +01:00
Pau Espin 9e04d5e039 pcu: Introduce test TC_pcuif_suspend_active_tbf
Related: OS#4761
Change-Id: I9538fbdc806eb26e93a0421b520c8d34de61f91f
2021-01-11 16:42:52 +01:00
Pau Espin 2889f87d20 pcu: Assign TLLI_UNUSED instead of string literal
Change-Id: I7a505527458ed716b7b0912e88c6fcf58e0ff044
2021-01-11 13:54:48 +00:00
Pau Espin 7b761e2850 pcu: Use TLLI_UNUSED constant everywhere
Change-Id: I0399e98dc726061ac272465288e2a4ba0a61be81
2021-01-11 13:45:40 +00:00
Alexander Couzens 195c9e70c2 PCU_Tests_SNS: improve SGSN originated BVC-RESETs
The BVC-RESETs are a little bit more complicated. The PCU will send
a BVC-RESET after the NSE become available.
Ensure the RESET is received and ignored so there is no race condition
if both sides send a BVC-RESET at the same time.

The test case TC_sns_1c1u_so_bvc_reset is still failing because the PCU can't
handle BVC-RESETs properly (both PTP and signalling).

Change-Id: Id681749d75073c1d50a4b0a2e86f0a2dd0955b45
2020-12-16 22:27:36 +01:00
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
Alexander Couzens 2373afc482 pcu: SNS: fix typo
Change-Id: Iedb6b3f38d87ea3ac29c4bcaaf50e771b0b8a750
2020-12-10 15:21:30 +00:00
Alexander Couzens 2a0ac80fd1 pcu: SNS: add TC_sns_add_existent
Try to add via SNS an already existent NSVC which should
fail.

Change-Id: I096bcbe38d82d08a150a2f8e56f6bc02353273a1
2020-12-10 15:21:30 +00:00
Alexander Couzens 1e21fd40a1 pcu: SNS: remove TODO expect FLOW-CONTROL BVC
It should not be expected in a new NSVC.

Change-Id: I142c87d496f08d603ab8e1e13c5a29ebe6596bb0
2020-12-10 15:21:30 +00:00
Alexander Couzens a8fb621aba pcu: TC_sns_add: fix wrong udp port in SNS ADD message
When sending the SNS ADD in the test case the ip/port to add must be different
from the current NSVCs.

Fixes: 90f1974fb0 ("NS_Emulation: Support multiple NS-VC within one NSE (NS-VCG)")

Change-Id: I9bbbf1431468a452df324a7559518496e3eb48e3
2020-12-10 15:21:30 +00: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 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 4d112c926c BSSGP_Emulation: Allow a "CreateCb" to handle unknown inbound TLLI
The existing BSSGP Code assumed that the TLLIs were always known "a
priori" by the test case.  With the newly-introduced create_cb,
the user can provide a function to handle any incoming messages for an
unknown TLLL.  The default handler behaves like before: fail +
terminate.

Change-Id: Ice0e145f5a6518ff79547dd851042b7965f38e00
2020-11-16 19:13:26 +00:00
Pau Espin e582f20aa3 pcu: Call f_shutdown if BSN doesn't match
Change-Id: I208f5100f9891874a8a61510edc8c5d215570b14
2020-11-16 10:48:25 +01:00
Pau Espin aa0d7ccf6a pcu: Fix f_dl_block_ack_fn for Dl EGPRS data block
Change-Id: I012b18ef084df0faa4cce79c4778e793af39b199
2020-11-16 10:48:25 +01: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 9a2d61bb3c pcu: f_acknackdesc_ack_block: Fix BSN wrap-around
Change-Id: Ibe90e58e04ae5e24c36a0b3dda6742080107bd51
2020-11-06 14:20:37 +01: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 e5e64c1246 pcu: Implement check for expected (M)CS in received data block
Change-Id: Ibdc63f6b695c08e4ddf5894c22767d07acf21311
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 b6aae9980d GPRS_Components: remove even more unused module imports
Change-Id: I25b1f1e02c95db0f0aed3867f814f9476d3c0d0d
2020-11-02 19:24:45 +07:00
Vadim Yanitskiy 316b0c6d78 GPRS_Components: remove unused import of MobileL3_GMM_SM_Types
Change-Id: I502c2b9905e18915da179c1bdf57402f56bdf7bf
2020-11-02 19:24:45 +07:00
Vadim Yanitskiy 7d72a7627b GPRS_Components: remove unused NS / BSSGP module imports
Change-Id: Idf8a92b03015e6a44512e820d8a8bdba7ce556e9
2020-11-02 19:24:45 +07:00
Vadim Yanitskiy 0544e5d625 GPRS_Components: neither TELNET nor VTY API is used in this module
Change-Id: I41813e1e2a8d7c54dffbabee9de4e0706293743e
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 7942580e23 GPRS_Components: ensure cyclic RA in f_init_gprs_ms()
Change-Id: I9896bb6bf1ceb592bae22139bf48c6aa7c0265bd
2020-11-01 02:01:59 +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 e12b2acd95 GPRS_Components: ensure unique IMSI/TLLI in f_init_gprs_ms()
Change-Id: I4beeeac600515458c2aeaf9e0be1cf2546ff0584
2020-11-01 02:01:59 +07:00
Vadim Yanitskiy cff3e1b46c GPRS_Components: rename 'GprsMSArray' to 'GprsMSList'
In TTCN-3, array assumes a fixed number of elements.  A 'record of'
type is more like a 'list' in Python, so let's call it this way.

Change-Id: Ib7df7efaa28a53a45d981d1c99f9eb1ac26fd91c
2020-11-01 02:01:59 +07:00
Vadim Yanitskiy fa6b882657 GPRS_Components: allow arbitrary number of GprsMS instances
Change-Id: Ia118d58fafa50547f109c68829aa869785e0dc9c
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 25e0f29c46 pcu: Verify TLLI for Dl Assignemnt in f_ms_rx_pkt_ass_pacch()
The same is already done for Ul Assignment. Dl assigment check was a
TODO until now.

Change-Id: Ib44a315d9ce80da05aeee642d033198f4addf6c3
2020-10-29 12:36:43 +01: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
Alexander Couzens 7b1e44f791 PCU: add IPv6 support for SNS
With PCUIF 10 the remote can be IPv4 or IPv6.
Add all missing parts including SNS IPv6 elements,
the support to omit IPv4 elements and a PCU_Tests_SNSv6.cfg
configuration to run all tests with IPv6

Change-Id: I43d64caca600fff78f3fbbb3e8179f447f235d46
2020-10-21 11:49:54 +00: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 c776ded961 PCU_Tests.cfg: synchronize with docker-playground
Otherwise neither of the test cases would even start.

Change-Id: Ibbef1875b266e3512e5ada731bac5f2246a1446d
2020-10-17 11:27:45 +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
Alexander Couzens 50493b3503 pcu/PCU_Tests_SNS.cfg: fix configuration to match new NS provider
The NS uses now a provider to support FR and IP at the same time.

Change-Id: I6b0fa97a1098070a4f63228568092084503d6164
2020-10-13 19:49:14 +00: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 e97e3af203 PCU_Tests_{NS,SNS}: Fix our expectations regarding CellID in BVC-RESET
The BVC-RESET / BVC-RESEt-ACK follow a set of rules:

* Signaling BVCI=0 never has a CellId in BVC-RESET nor BVC-RESET-ACK
* Any BVC-RESET or BVC-RESET ack in BSS->SGSN direction must have CellID
* Any BVC-RESET or BVC-RESET ack in SGSN->BSS direction must NOT have CellID

Let's adjust our test expectations accordingly.

This will break tests against "latest", but the amount of work-arounds
needed in this code outweighs the benefit.

Change-Id: Ic8a83f5214c372faa15178dd9b54364e7d2a60cb
2020-10-09 14:59:56 +02: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 23e274919d PCU_Tests_NS: Fix our expectations regarding CellID presence/absence
This is required by the spec, and implemented libosmocore since
Change-Id Ie87820537d6d616da4fd4bbf73eab06e28fda5e1

So let's change our test expectations.  Meanwhile, introduce
mp_tolerate_bvc_reset_cellid for working around the bug in 'latest'.

Change-Id: Icebee25b53fef623db6ae91ca0d943e70a3c86b7
2020-10-09 12:27:11 +02:00
Harald Welte 04ce4c6047 pcu: Don't log timer operations of ClkGen-0 (every 4.16ms)
We don't need to spam the console with that kind of information.

Change-Id: I029193f6e21415f53424ebf4417e3fcd9a53c86c
2020-10-04 23:41:45 +02:00
Harald Welte 867243a3ec NS_Emulation: Add [optional] support for FrameRelay transport
This adds a NS_Provider_FR which interfaces between FrameRelay_Emulation
and NS_Emulation.  Include support for it only if enabled at compile
time to avoid pulling in a dependency on the FrameRelay stack for every
user of NS_Emulation.

Change-Id: I42ca811d23e383e362d2527c8ff2c916a62a5b42
2020-10-03 18:24:50 +02:00
Neels Hofmeyr 929b406940 update expected results
Change-Id: Icb534a2b00fc48c3ead009a620e6061e595cb581
2020-10-01 06:48:55 +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 904f50115d Move RAW_NS to library to use it in SGSN NS tests
Change-Id: I5a0e62cc9f032c515188530c0ceee29061fe11d2
2020-09-25 01:31:44 +02:00
Vadim Yanitskiy befa21c5c9 {BTS,PCU}_Tests: bump default PCUIF version: 9 -> 10
Both osmo-bts and osmo-pcu are switching to PCUIFv10 soon, so let's
use the new version by default.  For older (latest) IUT versions
not supporting PCUIFv10, one would need to override this module
parameter in {BTS,PCU}_Tests.cfg.

Change-Id: I9350c4a54434c3d46ce9424f382ca0057e58d053
Related: SYS#4868, SYS#4915
2020-09-22 00:53:26 +07:00
Vadim Yanitskiy 4b7473d99c pcu/GPRS_Components: allow passing/matching of TS/TRX/BTS/BLK numbers
This change will facilitate adding test cases for multi-slot TBF
allocation across several TS and/or TRX instances of a BTS.

Change-Id: I9bff9e912bf73ad6259946a6ea5b08f3e2f728c8
Related: OS#4756
2020-09-21 17:06:08 +07:00
Harald Welte e18fccd5ab {PCU,SGSN}: Add missing address_family field in NSConfiguration
Change-Id: If63a96ec7ad28e87ff8bd18bf189d9395dda9c0d
2020-09-18 01:03:46 +02: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
Harald Welte 60408e3f57 Don't map NS_Emulation_CT:NSCP anymore
NS_Emulation_CT:NSCP used to be a NS_CODEC_PT, which is a translation
port on top of the IPL4asp.  Such ports need to be mapped to a system
port at start-up.

However, in I4d0b7ad0ed9447a038dd3eeee2b975146d10fba0 we introduced
a new underlying component called NS_Provider.  Hence, NSCP is actually
connected to that underlying component, and no longer mapped.

The corresponding change in pcu/SGSN_Components.ttcn and sgsn/SGSN_Tests.ttcn
has unfortunately been missed in the above-mentioned change.  Fix that.

Change-Id: I4c085210e6021e38a38ebc052ec3d9b345638cd2
2020-09-17 20:32:37 +02:00
Harald Welte 013d65af1e NS_Emulation: Introduce NS_Provider underneath NS_Emulation
This is a step to prepare the NS_Emulation for operating on top of
Frame Relay, not just UDP/IP.  We replace the NS_CodecPort (mapping to
a IPL4asp) with a newly introduced NS_Provider_CT, specifically a
NS_Provider_IPL4_CT.

This change removes any IP specific bits from NS_Emulation and moves
it into the newly-created NS_ProvideR_IPL4.

Change-Id: I4d0b7ad0ed9447a038dd3eeee2b975146d10fba0
2020-09-17 15:26:52 +00:00
Alexander Couzens ad70991d51 RAW_NS: remove usage of mp_gb_cfg
RAW_NS uses module parameter from SGSN_Components. To decouple
RAW_NS from SGSN_Component pass the cell_id via a function argument.

Change-Id: I91d9db85519675054aaab83c85fac43e67391f33
2020-09-14 12:01:42 +00:00
Alexander Couzens 2beaa20295 RAW_NS: remove usage of mp_nsconfig
RAW_NS uses module parameter from SGSN_Components. To decouple
RAW_NS from SGSN_Component pass the NSConfiguration via f_init_ns_codec()

Change-Id: Ida8b8a6af815dc11b2ff4c65e19cc5ec25f18ae2
2020-09-14 12:01:42 +00:00
Alexander Couzens b3d4c670ad RAW_NS: f_init_ns_codec: add argument tc_idx to modify the port
In preparation for the SGSN tests allow to change the source udp port
for every test case.

Change-Id: I465ad2c8580e74cce4dab46f4ec29a9043df9938
2020-09-14 12:01:42 +00:00
Harald Welte 93331e736b BSSGP_Emulation: Make L3 (SM/GMM) decoding a compile-time option
This allows us to build low-level tests that don't require all of L3.

Change-Id: I7ef7e93e2cd1d37e7e4a62947ca8dfde30d93b95
2020-09-13 10:18:41 +02:00
Alexander Couzens f57ff03acb PCU_Tests_NS: add missing bound of nrf
Otherwise it will try to use setverdict() with an unbound PDU

Change-Id: Ieafe9017126dd293aad09dad3c8a4180c9c29fa0
2020-09-11 12:56:39 +00: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
Alexander Couzens 355ab56a24 PCU_Tests_NS: allow an UNBLOCK message to arrive before ALIVE
The ALIVE PDU does not have to be sent before an UNBLOCK message.
Ignore UNBLOCK messages in cases a single ALIVE is expected.

According to TS 48.016 v5.2.0, 7.4:
"Upon successful completion of an NS-VC reset procedure,
a BSS (or SGSN) shall start timer Tns-test, then [..]"
The ALIVE should arive Tns-test after the reset procedure (typ. 1s-60s).

Change-Id: I11d77b7477981998082967e5123b61636af2b980
2020-09-07 07:10:01 +00:00
Alexander Couzens 1220a24ebd RAW_NS: implement f_outgoing_ns_reset
-> RESET
<- RESET ACK

Change-Id: I1a50615de4650266ca99216f8e4a18202678d669
2020-09-07 06:12:51 +02:00
Alexander Couzens 3c268daa0e PCU: move RAW_NS into own file to use it in the SGSN tests
In preparation to test the SGSN role of NS

Change-Id: Id91aa81c4fb6689cd1353d88b4806d26868769e8
2020-09-07 06:12:25 +02: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