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
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
Fix confusion: f_ms_establish_ul_tbf() vs f_establish_tbf(). The
new name precisely describes what the function does. Sending a
RACH.ind and receiving a DATA.req with RR Immediate Assignment
is just a part of the TBF establishment process.
Change-Id: I1e22b9936bf68ebcaf70cefbc57345995ebbbaed
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
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
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
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
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
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
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
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
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
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
This is a first step towards refactoring of all functions to use MS and
Ul/DlTBF objects containing state.
Change-Id: Ieae27d6e707f79ec2145864ef5cd67ddbbec9314
Test Verifies that if PCU doesn't get one of the intermediate UL data blocks in a UL
TBF, it will request retransmission through UL ACK/NACK (with missing block
in its bitmap) when CV=0 is received (and hence it knows no more data is to be
transferred).
This test fails as of current osmo-pcu master, and it's fixed there by
osmo-pcu.git Change-Id I9b4ef7b7277efa645bdb5becf2e9f6b32c99a9b1.
Change-Id: I204a470e47fcc5965de758ad9a275837e0c8034d
Old code was not setting Single Block Packet Access type, and 2phase
access was not properly triggered.
Once it's triggered, message flow changes quite a lot from the 1phase
access, specially because the 2nd Ul Assignment arrives through PDCH
instead of CCCH, which means a different record is received and hence
code for 1phase cannot be easily re-used.
For similar reasons, f_tx_rlcmac_ul_n_blocks() is modified to receive
the only required tfi param instead of a full dl_block.
Some functions are also extended to support SingleBlock Allocation
instead of usual DynamicAllocation.
Change-Id: If636a4898dfa175fdbd6baf04f7f2c955a9c525d
Downlink Control blocks like Packet Uplink Assignment (PACCH)
contain rrbp + rrbp_valid in mac headers
Change-Id: I0401b0b378c7770d06a15d14dac6436303b4ccab
This function was written in a way that it tries to do as
many different (but related) things as possible:
a) send an RTS.req to the IUT, expect a DATA.ind in return,
b) decode RLC/MAC message contained in the received DATA.ind,
c) make sure that it's either GPRS or EGPRS data block,
d) calculate the last TDMA frame number of RRBP using
f_rrbp_ack_fn() regardless of its validity,
e) make sure that the block contains a given LLC payload.
Everything is ok except point d). The problem is that this is
only the case for the first block of RRBP, and not applicable
to the rest having 'rrbp_valid' flag unset. Furthermore, this
function did not match GPRS DL blocks with 'rrbp_valid' flag
unset, for some odd reason.
Let's move RRBP calculation into a separate function called
f_dl_block_ack_fn() and return TDMA frame number of the
received DATA.ind message instead.
Among with that, there are more little changes:
- simplify matching of (E)GPRS DL data blocks,
- use 'in' qualifier in parameter list where possible,
- turn parameter 'data' into a template (present).
Change-Id: I1528408b4399d0a149a23961805277eaab90d407
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
Let's make this template more flexible, so it can be used to match
any GPRS DL data blocks, not only those with rrbp_valid == true.
Note that behavior of f_rx_rlcmac_dl_block_exp_data() is
intentionally left unchanged, and will be fixed later.
Change-Id: I3940216368cdbb58fe89420675d1d8d5f5e49b05
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
The resulting frame number shall be within the period of TDMA hyperframe.
Change-Id: I794a14f69293cbbc937d62d09dd5794956b882db
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
Most of existing test cases are built on top of the PCU interface
abstraction components (see PCUIF_Components.ttcn). This means
that during the test case execution, additional components are
running in parallel, among with the MTC (Main Test Component).
When a test case terminates, either normally or due to an error,
it may happen that the virtual BTS component is stopped before
the associated TDMA clock generator. In this situation, sending
a clock indication towards the stopped BTS component would
lead to a dynamic test case error.
Let's take the process of tear down under control, and ensure that
the clock generator is stopped first. To achieve that, every test
case needs to call f_shutdown() in case of an error, as well as
in case of the normal termination.
Note we cannot use the existing f_shutdown() from Misc_Helpers,
because doing 'all component.stop' does not gurantee that the
clock generator is stopped first, and I experienced at least
one DTE while trying to integrate it.
Change-Id: I6a859687d9605cc08c51ff44d946c279b79bedfa
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
This test case would not fail even in case of Timing Advance mismatch.
Change-Id: Ife86e5e0e39f0112b854ed9a13e9c6f3c49531c9
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
We don't need a copy of the whole RR Immediate Assignment message.
Change-Id: I44417460126e507a0a47a5aee8c4a995085023fa
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
In response to a CHANNEL REQUEST received on BCCH, the network
would never allocate a Downlink TBF, so we should always expect
an Uplink TBF assignment.
Change-Id: I6b4c108bed39ba9ac9b6144827bc1e20b04333b4
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
Back in September 2019, while writing the first lines of the new
test infrastructure for OsmoPCU, I picked a random value as the
default RA (CHANNEL REQUEST message) for Uplink TBF establishment.
It has been accepted by the IUT so far, and still works, but
according to 3GPP TS 44.018, table 9.1.8.1, value '3A'O has
nothing to do with GPRS - it actually means 'Answer to paging'.
The new value belongs to range '011110xx' - one phase packet
access with request for single timeslot uplink transmission.
Change-Id: Ic036d380af3667d54a3a0a011a9d56a87e0f949b
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
The PCU interface has nothing to do with UDP...
Change-Id: I8d919e686c6ef311517eb53496d008987f984794
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
RLCMAC blocks have a lot of fields and we will potentially require lots
of different templates, as well as functions to handle related structs.
Change-Id: I9c6597178168aa3848b21930f33be698dd2ce545
Delete PCU_Tests.ttcn along with the configs, since they are broken and
we are only adding new tests to PCU_Tests_RAW.ttcn. They are broken
because it's not possible to run multiple tests after another.
Some components which used to be in PCU_Tests.ttcn and which were used
by other PCU_Tests*.ttcn files have been moved to SGSN_Components.ttcn
Selftests have been moved to PCU_selftest.ttcn.
Small placeholder for module PCU_Tests is left in PCU_Tests.ttcn to
still be able to compile the binary as "PCU_Tests" and avoid changing
that part of docker setup. We'll eventually rename RAW tests soon
anyway.
Change-Id: Ie862a1525e9f4f9a3f2427ac3898810e3d044d2f
function helpers are slightly modified or added to accomodate for fields
in egprs data blocks being in different places.
Change-Id: I570fb7346519b2a161515e0ec40bd1870a89d673
Test sending MS RA capabilities through Packet Resource Request to
update GPRS multislot class.
EGPRS multislot will come in a later commit.
Change-Id: I5026d8b78a3fb82093956b65989d18fa6f6d5424
This test case initiates the packet Downlink assignment procedure
by sending a DL-UNITDATA PDU containing a random TLLI and checks
Timing Advance value indicated in the Immediate Assignment.
Currently fails due to a bug in the IUT (TA=220).
Change-Id: I410abedcc549495f30b5355d399a85648408a946
This change introduces three similar test cases:
- TC_egprs_pkt_chan_req_signalling,
- TC_egprs_pkt_chan_req_one_phase,
- TC_egprs_pkt_chan_req_two_phase,
which basically send several 11 bit RACH.ind messages to the IUT
containing different variations of EGPRS Packet Channel Request.
Depending on the establisment cause, for each RACH.ind we expect
to receive an Immediate Assignment containing an EGPRS Packet
Uplink Assignment in its Rest Octets.
All test cases make sure that Request Reference in the received
Immediate Assignment messages is set to 127 as required by 3GPP
TS 44.018 (see table 9.1.8.1, note 2b), and the Extended RA IE in
the Rest Octets matches 5 LSBs of the RA value that was sent.
Change-Id: Ib5732956ea160f93d82f06bf82bea45501f439d2
Related: OS#1548
All the records related to Mobile Identity IE (see 3GPP TS 24.008,
section 10.5.1.4) are defined in [1], so there is no real need to
dumplicate them. Moreover, most of the related templates in
library/L3_Templates.ttcn are based on these records.
[1] titan.ProtocolModules.MobileL3_v13.4.0/src/MobileL3_CommonIE_Types.ttcn
Change-Id: I27c2743c59db770d6f7e9447dc8c1f539b228ced
This additional couple of test cases reveals several bugs:
1) the IUT encodes a erroneous RR Paging Request message
containing P-TMSI, so TITAN fails to decode it;
2) the IUT prints an invalid P-TMSI in its log output
due to load of misaligned address (found by UBSan).
[1] I97fd5ffc15a4a58112d7c37c69b7ac42b0741a0e
[2] Icf8836f216793e342b239c8e6645aac1e82bf324
Change-Id: I7fbec5b2c5c3943a7413417b623f55c135c152d7
Tests from PCU_Tests_RAW_SNS inherit most infrastructure from NS tests
defined in PCU_Tests_RAW, which in turn don't share that much with other
tests present in that file. This way we simplify file PCU_Tests_RAW.ttcn,
which will potentially grow once more tests are added.
Change-Id: If680d1bd7dbfe98829f330c33705e0f13bedf3c7
The event FN contains the current FN, but the message should contain the
FN of the first burst of the block.
Change-Id: Iba0b1d1a3d7d875c5443a7bcaff399f9681624ad
Function f_rx_rlcmac_dl_block_exp_data() still misses proper
verification of data. Apparently the received message has 2 blocks,
first with expected 10 bytes, but next one contains 18 bytes with 4
actual bytes and other bits are padding.
Last DL ACK/NACK sent is not yet working correctly. osmo-pcu seems to be
unable to match it against sent DL block (I think due to non-matching
FN), and instead drops it and schedules after timeout an IMM ASS to try
to send DL block again.
Change-Id: Icf66dd5c07690368722c586632c38fb7e770053c
There's also DL_ACK_NACK message for which a template will be introduced
soon, so let's rename and fix typos/wrong descriptions to avoid
confusion later.
Change-Id: I4a2025ad282006953fcfadf429c980b77cb94371
Requires osmo-pcu.git I3430abb5fc622dec293457466e760de95fa3a05c, before
that commit OsmoPCU cmd prompt contained a dash which resulted in TTCN3
being unable to match it.
Change-Id: I221675721b65b3ab44179e9657da70ba4004d7de
Ideally some more checks should be done on this test at the end, but
it's fine keeping it as it is for now and can be extended later.
Change-Id: I3be5123ff5294e5851652ec14d54589442082b28
Since there can be multiple PDCH channels configured on different
timeslots, different TRXes, and BTSes, the PTCCH/U handling code
in OsmoPCU needs to know the exact origin of a given RACH.ind.
Otherwise, it is not known which subscriber originated a given
PTCCH/U indication, and hence it is impossible to send PTCCH/D
Timing Advance notification properly.
Fortunately, we can extend the RACH.ind message without even
bumping the protocol version, because every single PDU has a
fixed size defined by the largest message - INFO.ind. In case
if the actual message payload is smaller, the rest is filled
with a constant padding byte (0x00).
Older versions of OsmoPCU will consider the new fields as padding,
while the messages from older OsmoBTS versions will always have
both fields set to 0x00. Since C0/TS0 cannot be configured to
PDCH, this can be easily detected on the other end.
Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1
Related: OS#4102, OS#1545
As it turned out, OsmoPCU is not supposed to change the Coding
Scheme immediately when the recent link quality value leaves the
current window. Instead, in order to avoid rapid changes of the
Coding Scheme, it also takes the previous value into account.
Thus the current Coding Scheme is only changed if both current
and old values fit into a new window.
This change makes the test case pass.
Change-Id: I5d503d5a9c46cb9de84fbabd2d591afbe4216fdb
Some stuff was wrong and some was missing after new features being
implemented in tests over time.
Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0
As it turns out, it was a bad idea to use a counter in altstep
as_ta_ptcch(), because its value is getting lost. Let's instead
introduce a new type PTCCH_TAI_ToA_MAP, which is basically a
list of ToA values for each PTCCH/U sub-slot (TA Index), and
pass it to the altstep.
Change-Id: I74252dfb929fcb32d07e8728d692674931fae727
Both TDMA_EV_PTCCH_DL_BLOCK and TDMA_EV_PTCCH_UL_BURST events may
happen together during the same TDMA frame (fn % 104 == 90). We
shall not skip TDMA_EV_PTCCH_UL_BURST. Let's fix this.
Change-Id: Ifc66d5d1c5f9eaa7bed6882105298c45257ebef0