Commit Graph

210 Commits

Author SHA1 Message Date
Philipp Maier 58c083302e PCU_Tests: verify that PacketCellChangeContine contains an ARFCN and BSIC
The testcase TC_nacc_outbound_success tests the NACC procedure. The cell
that is proposed in the PacketCellChangeNotification is a GERAN cell.
This means that the PCU should conclude the procedure with a
PacketCellChangeNotification that contains the ARFCN and BSIC of the
proposed cell. Let's make sure that this actually is the case.

Related: OS#6044
Change-Id: I4b8f3312088e3d2bc4b90702485e7c6a8d39f954
2023-07-05 10:16:18 +00:00
Pau Espin 7e50fa280c pcu: Wait for USF before start using UL TBF
Change-Id: Ibe8f8c24b239715c0a43d52e59475011e78cb4eb
2023-06-27 15:56:00 +02:00
Philipp Maier 7d187ae98e PCU_Tests: fix typo cell_chf_notif -> cell_chg_notif
Change-Id: I13126b19b65b88f0e73a8413f557f6fe0561ba37
2023-06-21 11:00:44 +00:00
Pau Espin 1c6a9e4e4a pcu: TC_t3193: Fix test to properly trigger tx of last DL data block
Since osmo-pcu.git 95ec50c9e4821ed1bdd15e9e30da1278ec1280c1, OsmoPCU
doesn't allow receiving a FINAL_ACK in FLOW state. This test was not
written properly and was taking advantage of that permissive logic in
osmo-pcu to trigger the target use case. Fix it to have the PCU send the
last DL data block (FBI=1) so that it can send a PKT DL ACK/NACK with
FinalAck=1 to terminate the DL TBF.

Change-Id: Ibd445bdd5cc1d1ffd810eea157829403b4b65f1f
2023-06-20 11:28:47 +00:00
Pau Espin 9584ef23ab pcu: Rework test TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max to base it on T3168
N3105 is used for DL TBFs only (as tested by TC_n3105_max_t3195). The
test TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max is hence
wrongly written and should be based on T3168. Since recently, osmo-pcu
also moved to using T3168 in the scenario triggered by this test, hence
move to using it.

Related: osmo-pcu.git Change-Id I87dff68dedd06b60501e7586d20faf02bb1f0c93
Change-Id: Ibdfa9879cc56f5e2090cee0d3d70ee5df7c90454
2023-06-14 09:10:26 +00:00
Pau Espin 002658a071 pcu: Fix some tests missing proper tear down
As a result, they sometimes end up in error during test tear down, and
they show up as failed.

Change-Id: I89047a57a508df5c18e0d7bd2366cf15cda055be
2023-04-13 11:35:22 +02:00
Vadim Yanitskiy 8a15b45ea1 PCU_Tests: fix TC_nacc_outbound_pkt_cell_chg_notif_dup
The TC_nacc_outbound_pkt_cell_chg_notif_dup is currently failing
because in [1] we changed the default hard-coded MCC/MNC values in
ts_BssgpCellIdDstAddr_default, however these it's still using
hardcoded MCC=023/MNC=43.  I overlooked this in [2].

Let's split up the f_handle_nacc_rac_ci_query() into four functions:

* f_ctrl_rx_nacc_rac_ci_req() / f_ctrl_tx_nacc_rac_ci_rsp(),
* f_pcuif_rx_nacc_rac_ci_req() / f_pcuif_tx_nacc_rac_ci_rsp(),

and use them in TC_nacc_outbound_pkt_cell_chg_notif_dup.  Also
employ them in TC_nacc_outbound_pkt_cell_chg_notif_twice.

Change-Id: I3e84f55eedd278fb239600d6a0465bd34fd8cd0b
Related: [1] 03f74d4132
Fixes: [2] 7295661af5
Related: OS#5901
2023-02-13 11:43:02 +00:00
Vadim Yanitskiy d8aa5e8a6e PCU_Tests: fix TC_nacc_outbound_si_resolve_timeout
This patch fixes TC_nacc_outbound_si_resolve_timeout, which is still
using old hard-coded MCC/MNC values.  The altstep does the same, but
relies on the updated values from ts_BssgpCellIdDstAddr_default.

Change-Id: I9f6dbe97e9a494a4e8fdb441a70999d3040f6cfd
Related: OS#5901
2023-02-13 11:43:02 +00:00
Vadim Yanitskiy 76c8b29489 PCU_Tests: remove unnecessary valueof() in NACC TCs
A string literal is already a value, valueof() is for templates.

Change-Id: I86970bb422ad1693829fd20ecf5ee34ef77f30af
2023-02-13 11:43:02 +00:00
Vadim Yanitskiy 03f74d4132 PCU_Tests: use real values for c_BssgpCell{Mcc,Mnc}
There is no such country/operator with MCC=023/MNC=43.  Wireshark
complains about that when looking at the BSSGP messahes:

  Mobile Country Code (MCC): Unknown (23)
  Mobile Network Code (MNC): Unknown (43)

This may look confusing, let's better use some real country/operator:

  Mobile Country Code (MCC): Central African Rep. (623)
  Mobile Network Code (MNC): Celca (Socatel) (03)

Change-Id: Idc22128657d10893aa5c6d8ec80538a764de5c42
Related: OS#5901
2023-02-10 20:53:10 +07:00
Vadim Yanitskiy 7295661af5 PCU_Tests: define ts_BssgpCellIdDstAddr_default
Define hard-coded default Destination Cell ID in one place.

Change-Id: I8f400ba52d4d32447e0b4a640a2f4b73699937c8
Related: OS#5901
2023-02-10 20:53:10 +07:00
Vadim Yanitskiy 88b87a49e0 PCU_Tests: improve coding style, use f_build_BcdMccMnc()
Change-Id: Ia7066c6f36678650ada61c1633977b824777194d
Related: OS#5901
2023-02-10 20:53:09 +07:00
Vadim Yanitskiy 8cc1f72289 library/GSM_Types: rename f_{enc->build}_BcdMccMnc[_int]()
The enc_* functions usually return an octetstring.  However, both
f_enc_BcdMccMnc[_int]() return a sub-type of hexstring (BcdMccMnc),
so let's rename them to avoid confusion.

A follow-up patch adds the actual encoding function for BcdMccMnc.

Change-Id: I0332fe7396310da49910e89571f7181fb1604182
2023-02-10 13:46:04 +00:00
Vadim Yanitskiy 7a92d5fbc0 library/GSM_Types: rework f_enc_BcdMccMnc: split and rename
* Rename f_enc_BcdMccMnc() -> f_enc_BcdMccMnc_int()
* Add f_enc_BcdMccMnc() accepting a pair of GsmMcc/GsmMnc

Change-Id: I033cce8f975f61ef2216de9f34f2ca418d71dc0b
Related: SYS#5602
2023-02-08 00:31:18 +07:00
Pau Espin 00fec58871 pcu: TC_paging_cs_from_sgsn_*: Fix race condition between BSSGP tx and RLCMAC rx
It can happen that the RLCMAC req arrives at osmo-pcu before the
CS_PAGING we send to it over BSSGP, in which case osmo-pcu will schedule
an RLCMAC DL Dummy Block. Take into account this scenario to avoid
failing id it occurs.

Change-Id: I30da93835c7738aefcd84691d83f39759dd4b599
2022-12-02 14:57:44 +01:00
Pau Espin 3f2b5e41ea pcu: TC_mt_ping_pong*: Fix race condition waiting for first DL data after X2002
Since recently osmo-pcu arms the X2002 in a more fitting place (later,
when paging.cnf is received from osmo-bts over PCUIF).
Since we use same X2002 value in TTCN3 to wait for the timer to trigger,
in the past it was always fine (the X2002 at osmo-pcu always already had
triggered before the one in ttcn3 after receiving the ImmAss).

However, now the timer is roughly set at the same time in both places (ttcn3 and
osmo-pcu) and hence there may be race conditions where we request a
DL data block before the X2002 triggered at osmo-pcu, in which case we
receive a DL dummy block because the TBF is not yet in the FLOW state

Change-Id: Icc94eb0544226facddcd65be65a8a41bcfc662cc
2022-12-02 14:56:03 +01:00
Pau Espin 45b98aa0ee pcu: TC_dl_flow_more_blocks: Fix race condition waiting for first DL data after X2002
Since recently osmo-pcu arms the X2002 in a more fitting place (later,
when paging.cnf is received from osmo-bts over PCUIF).
Since we use same X2002 value in TTCN3 to wait for the timer to trigger,
in the past it was always fine (the X2002 at osmo-pcu always already had
triggered before the one in ttcn3 after receiving the ImmAss).

However, now the timer is roughly set at the same time in both places (ttcn3 and
osmo-pcu) and hence there may be race conditions where we request a
DL data block before the X2002 triggered at osmo-pcu, in which case we
receive a DL dummy block because the TBF is not yet in the FLOW state

Change-Id: I67483bc423567d1fc98eb912ece1cf5cda746119
2022-12-02 14:53:31 +01:00
Pau Espin e3e2bf6e78 pcu: Fix race condition in TC_cs_max_dl waiting for timer first DL data after X2002
Since recently osmo-pcu arms the X2002 in a more fitting place (later,
when paging.cnf is received from osmo-bts over PCUIF).
Since we use same X2002 value in TTCN3 to wait for the timer to trigger,
in the past it was always fine (the X2002 at osmo-pcu always already had
triggered before the one in ttcn3 after receiving the ImmAss).

However, now the timer is roughly set at the same time in both places (ttcn3 and
osmo-pcu) and hence there may be race conditions where we request a
DL data block before the X2002 triggered at osmo-pcu, in which case we
receive a DL dummy block because the TBF is not yet in the FLOW state.

Change-Id: If7121473a3580b40d3a658dc38b9bb1421196127
2022-12-02 14:53:28 +01:00
Pau Espin 99e00b480d pcu: Introduce tests TC_ul_tbf_{1,2}phase_while_dl_ass_pch
Related: OS#5700
Change-Id: I6a72c36265bfdc757180cbb466492ad6bbbf16ad
2022-11-04 09:35:37 +00:00
Pau Espin 15b2b94883 cosmetic: pcu: Fix typo in several comments
Change-Id: I7a2419514582cb9efd8df126bf449711f78586fe
2022-10-28 15:08:44 +02:00
Pau Espin 0b6b0d0bdb pcu: Introduce test TC_ul_tbf_finished_pkt_dl_ass_pch
Related: OS#5700
Change-Id: Id99b048e7c305fe616bb54437313a1e45449ff57
2022-10-28 15:07:11 +02:00
Vadim Yanitskiy 150d6d1bdc library: move IA/IAR Rest Octets to GSM_RestOctets.ttcn
Change-Id: Icd96fc461e37d1346950a4fa158e0421bd7330c5
2022-10-21 10:35:27 +00:00
Vadim Yanitskiy 7179d3e8d2 library: s/tr_RLCMAC_DUMMY_CTRL/tr_RLCMAC_DL_DUMMY_CTRL/
There also exists UL equivalent of this message, for which I am
planning to add a template.  Let's clarify direction in the name.

Change-Id: I3b19c6679eb432b062e28aee9dd1220dbf33ee31
2022-10-05 09:09:28 +00:00
Pau Espin 6844c161f9 pcu: Introduce test TC_dl_llc_sapi_priority
Related: OS#5508
Related: SYS#5908
Change-Id: I26308a59718a6470853c964583a39986006e59c0
2022-04-05 10:22:14 +00:00
Pau Espin 835fd300f8 pcu: Start PCUIF related components as alive-type
This should prevent following race conditions at shutdown:
"""
131 - Terminating component type PCUIF_Components.RAW_PCU_BTS_CT.
...
PCUIF_Components.ttcn:642 Dynamic test case error: Sending data on the connection of port BTS to 131:PCUIF failed. (Broken pipe)
"""

Change-Id: I17b2cfed2edbea7427e608380059bb1b422ca600
2022-02-24 11:47:43 +00:00
Pau Espin e5fe6e7527 pcu: Fix race condition in TC_t3141
The test was expecting to always receive at least 1 DL packet with
USF_UNUSED, but since we implemented idle blocks in PCUIF that may not
always be the case anymore. If the TBF is freed in between last
requested block and next one, there may be no TBF and hence no MS
listening on the TS, so PCU will optimize and send an idle block.

Change-Id: Ia301c01a3f5c3fd0b11d8f20e39061aa7abc6127
2022-02-24 11:47:43 +00:00
Pau Espin 1538c3b616 pcu: Drop mp_osmo_pcu_newer_than_0_9_0
osmo-pcu 1.0.0 was released, so we can drop references to older osmo-pcu
versions.

Change-Id: Ife37fc92c5b1ebf7e87b66c136ae900f44861510
2021-11-16 19:22:07 +01:00
Pau Espin 59aa109194 pcu: Introduce test TC_ul_tbf_reestablish_with_pkt_dl_ack_nack
Change-Id: I2058862cf11d0027b040eb6d9c0a27524df593b5
2021-11-16 11:32:55 +01:00
Pau Espin e8a9444356 pcu: Introduce test TC_t3172_*
Related: OS#3928
Change-Id: I3f4368c99b00453b471c3d741fecb8864ecdc628
2021-11-16 11:32:25 +01:00
Pau Espin 209dc7d4e1 pcu: No need to set t3142 in TC_ratectr_all_available_allocated
That's a copy-paste artefact from another test.

Change-Id: Ib0ec4a9bb4f48330ab5ced94fe6b705a9fc69603
2021-11-15 17:07:35 +00:00
Pau Espin 6eb4d25ba0 pcu: Introduce test TC_ratectr_all_available_allocated
Related: SYS#4878
Change-Id: Ide1254954b5cf02a19e190b19d06c7aaeedb6ede
2021-11-15 12:51:45 +01:00
Pau Espin 907ba20f37 pcu: Fix race condition in TC_n3101_max_t3169 and TC_n3103_max_t3169
I cannot reproduce the issue in my local system with docker, probabluy
due to different performance from jenkins builder. It triggers almost
every time in jenkins nightly TTCN3 PCU_tests though.
A similar fix was already introduced recently for TC_n3105_max_t3195
since PCU started submitting empty (idle) blocks when there's no TBF
listening on that PDCH. We need to update the test to account for that,
since our TTCN3 timers are not necessarily exactly matching the one at
the PCU side.

Change-Id: Ia5344df15c612c70a6cdd7bb6f12dc7524a23bf4
2021-11-15 11:15:12 +01:00
Pau Espin 518e82faf9 pcu: Introduce as_ms_rx_ignore_empty helper
It will be further used in follow-up patches.

Change-Id: I3c80ba4b8d229fa4a75dfd04abb7c5aae26e221c
2021-11-15 11:13:11 +01:00
Pau Espin 023330db64 pcu: Improve counter validation
Validate some new counters recently added in osmo-pcu.

Related: SYS#4878
Change-Id: I98e340053c91abdbf28c6e9641190bc78df35eff
2021-11-08 18:42:31 +00:00
Pau Espin d658f345f6 pcu: Introduce test TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max
Change-Id: I3a50445c707430900c78623c7093ff7eb1f3ed95
2021-10-20 13:35:04 +00:00
Pau Espin 332aba85b0 pcu: Adapt tests to pass with new idle blocks from PCU
Depends: osmo-pcu.git Ife718eeed2af011479c03099ea109518f04567bc
Change-Id: I6e96a7569640695ccfaa94b471384fa301bccd62
2021-10-20 13:35:04 +00:00
Pau Espin 376045711a pcu: Add missing test TC_ul_tbf_reestablish_with_pkt_resource_req in control()
Fixes: cdbe90306b
Change-Id: I1c0bd188ec972e6224c980bf96d7f6da1de98fbc
2021-10-15 14:36:29 +02:00
Oliver Smith f04762d48d pcu: add TC_stat_pdch_avail_occ_ms_not_known_*
Add two new tests to verify occupied and available PDCH stats if MS is
not known by the PCU.

Related: SYS#4878
Change-Id: Id21d4056a21b73ff612956700d2056d838eb54f8
2021-09-17 16:59:32 +02:00
Oliver Smith 4b2a89f308 pcu: TC_stat_pdch_avail_occ: test gprs/egprs stats
Extend the test to verify that TTCN3.bts.0.pdch.occupied.gprs and
TTCN3.bts.0.pdch.occupied.egprs work as expected. These new stats are
needed for performance measurements in 3GPP TS 52.402 § B.2.1.54-55.

Related: SYS#4878
Depends: osmo-pcu I0c0a1121b4ae5f031782e7e63a0c28eb0b6c8b42
Change-Id: Ia98de17187810acb2e1b327c37beab79a0c211b8
2021-09-17 08:03:03 +00:00
Oliver Smith edcded2d81 pcu: TC_stat_pdch_avail_occ: enable 4 TRX
Enable multiple TRX to verify that counters work as expected if the
allocator spreads TBFs over multiple TRX.

Related: SYS#4878
Change-Id: Ibde5be120e893fcecceb72a888483d5a6bb8ce50
2021-09-17 08:03:03 +00:00
Pau Espin f28fd080fc pcu: Support Neighbor Address Resolution over PCUIF
New versions of osmo-pcu support Neighbor Address Resolution over this
interface, and deprecated the old CTRL interface.
Let's use it by default while still keeping support for the old one for
a while to avoid breakage of existing deployments.

Tests run to validate:
* Old osmo-pcu still passes tests using CTRL interface
* New osmo-pcu (with new iface support) still passes tests using CTRL
  interface
* New osmo-pcu (with new iface support) passes tests using new iface

Related: SYS#4971
Change-Id: I05f1aabc64fc5bc4740b0d8afd8990b485eacd50
2021-09-14 09:11:14 +00:00
Oliver Smith 72d0c693ab Cosmetic: pcu: fix GprsMS count comment
Related: SYS#4878
Change-Id: Ic11abb330eccf8572a95ddb7e7c59c57b018a713
2021-09-08 10:04:15 +02:00
Oliver Smith 3d174882ba pcu: add TC_stat_pdch_avail_occ
Test new stats bts.N.pdch.available/occupied, which count available
PDCHs (3GPP TS 52.402 § B.2.1.38) as well as occupied PDCHs
(§ B.2.1.42-44).

Related: SYS#4878
Related: osmo-pcu I74760a68ee055510a79e80854ec7bf1521669119
Change-Id: I607b4729740159c161af824317f9fc04878eb13d
2021-09-06 09:11:30 +00:00
Pau Espin 3aa61c66fa pcu: Introduce test TC_pdch_energy_saving
Related: SYS#4919
Related: OS#4772
Change-Id: Icf5cc467ecabe3fcbf86e0f4caf497669b76fb42
2021-08-31 10:10:29 +00:00
Oliver Smith e1a77c4c59 pcu: add test TC_paging_pch_timeout
Related: SYS#4878
Change-Id: I8a8a912908f42d16dc04e2abe8ee4117f08bc672
2021-08-15 17:21:48 +00:00
Oliver Smith fbd3931051 pcu: f_tc_paging_ps_from_sgsn: move init/shutdown
Prepare to use this shared function in a new test with additional
commands between init, the function and shutdown.

Related: SYS#4878
Change-Id: I6fd523c7f5ab496b3356cf896a8ceaf9b6e874d2
2021-08-15 17:21:48 +00:00
Oliver Smith 36d95d8502 pcu: test counter bts.0.pch.requests
Related: SYS#4878
Change-Id: I366b5c699708a69ca0e9d8c74319a241a46ed842
2021-08-10 10:38:12 +00:00
Oliver Smith 61b4e73379 pcu: test counter pcu.sgsn.0.rx_paging_ps
Related: SYS#4878
Depends: docker-playground 22c6ef9e6ba9c368dc058319662ff95ccbab8063
Change-Id: I20398eed7f462940bcd3d6354d1cd4d47329b74f
2021-08-10 10:38:12 +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
Pau Espin 1451f9f860 pcu: Introduce test TC_t3141
Change-Id: I5f30e93de4a109d60577394da4e00a15ab23d1d6
Related: OS#1940
2021-05-18 19:04:09 +00:00