aboutsummaryrefslogtreecommitdiffstats
path: root/pcu
AgeCommit message (Collapse)AuthorFilesLines
2020-07-08cosmetic: pcu: Fix whitespacing typosPau Espin Pedrol1-2/+2
Change-Id: I38f752f709e593d1cfd3489a6ac590360f22a10f
2020-07-06pcu: Introduce TC_ul_data_toolong_fills_paddingPau Espin Pedrol1-0/+66
Change-Id: Ic37294efac005ed6c0ce48dea566fd20284b5868
2020-07-06pcu: Introduce test TC_ull_all_sizesPau Espin Pedrol1-0/+91
Change-Id: I293c8dea2d44c5232a96c44b605e0d8c6dc1fa0e
2020-07-06pcu: Support sending with CS other than CS1 in f_ms_tx_ul_block()Pau Espin Pedrol1-3/+21
Change-Id: Ibafa4246b442e7c26666eb0d37570bfbbf1dbda7
2020-07-06pcu: Introduce test TC_ul_flow_multiple_llc_blocksPau Espin Pedrol2-3/+112
Related: OS#4559 Change-Id: I62f42981d31bc5c2e4c61e92bea329bd74cb2d19
2020-05-29PCU: s/f_establish_tbf/f_pcuif_tx_rach_rx_imm_ass/gVadim Yanitskiy2-6/+6
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
2020-05-29PCU: revert changes to f_TC_egprs_pkt_chan_req(), fix testsVadim Yanitskiy1-17/+5
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
2020-05-28pcu: Add missing f_shutdown() to exit as soon as possible without final=truePau Espin Pedrol1-0/+3
Change-Id: I9703f7c81a98b6ef826db48c107ee833c125e5cc
2020-05-28pcu: TC_mt_ping_pong: Request UL TBF on last DL ACKPau Espin Pedrol1-4/+4
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
2020-05-28pcu: Parse ChCodingCommand on CCHAN Ul AssPau Espin Pedrol1-0/+2
Change-Id: I8bf13f763bd8aa8d8a39f6b2757d5da01437cc05
2020-05-28pcu: Parse USF from Pkt Ul AssPau Espin Pedrol1-8/+31
Change-Id: If786d838f24755f3207d57c849ac28e58a7ee1c6
2020-05-28fixup pcu/GPRS_Components: do not duplicate existing functionsVadim Yanitskiy2-72/+14
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
2020-05-28pcu/GPRS_Components: return GsmRrMessage from f_pcuif_rx_imm_ass()Vadim Yanitskiy2-16/+8
Change-Id: Ide6a00348b81a637309644be82a523c99f9fd30a
2020-05-28pcu: Refactor GPRS infrastructure to keep state and simplify testsPau Espin Pedrol2-564/+633
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
2020-05-28pcu/GPRS_Components: send DATA.cnf in f_pcuif_rx_imm_ass()Pau Espin Pedrol1-0/+6
The IUT expects a confirmation when Immediate Assignment is sent on PCH. Change-Id: I585a1933dfb2119f1d3223b24db191282fd698b7
2020-05-28pcu/GPRS_Components: call f_shutdown() immediately on timeoutPau Espin Pedrol1-0/+1
Change-Id: I1fa31d95ea393aaf80d8f6c03c3fcf3484daa565
2020-05-28pcu/GPRS_Components: get rid of meaningless bts_nr argumentPau Espin Pedrol2-8/+6
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
2020-05-22PCU: introduce TC_egprs_pkt_chan_req_reject_exhaustionVadim Yanitskiy1-0/+34
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
2020-05-22PCU: introduce TC_egprs_pkt_chan_req_reject_emergencyVadim Yanitskiy1-0/+30
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
2020-05-22PCU: introduce TC_egprs_pkt_chan_req_reject_contentVadim Yanitskiy1-1/+70
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
2020-05-19update expected resultsNeels Hofmeyr1-5/+45
Change-Id: I37014274ee97f09985c31966e7cc9122fe11a856
2020-05-19pcu: Expect UL ACK/NACK after all UL data is transmittedPau Espin Pedrol1-0/+4
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
2020-05-19Add initial support for Packet Uplink Ack/nack EGPRS StructPau Espin Pedrol1-5/+6
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
2020-05-19Move all GPRS helper function to its own file and componentPau Espin Pedrol3-571/+623
This is a first step towards refactoring of all functions to use MS and Ul/DlTBF objects containing state. Change-Id: Ieae27d6e707f79ec2145864ef5cd67ddbbec9314
2020-05-17Introduce test TC_ul_intermediate_retransPau Espin Pedrol1-0/+95
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
2020-05-17pcu: Introduce test TC_countdown_procedurePau Espin Pedrol1-0/+60
Change-Id: I2b92bf4a17e89b1d68869aac4243c0e106ce3be5
2020-05-17pcu: f_tx_rlcmac_ul_n_blocks(): Keep BSN state and return all payload sentPau Espin Pedrol1-12/+30
These features will be used in test added in next commit. Change-Id: I7dde6a2e71a9e64cf6c704eda37b47838460102b
2020-05-17pcu: Use BS_CV_MAX in f_tx_rlcmac_ul_n_blocksPau Espin Pedrol1-3/+11
Also increment BSN with each new submitted packet. Change-Id: I685d1535154197bb85e18875e0a4d41122a24fa0
2020-05-17Introduce test TC_force_two_phase_accessPau Espin Pedrol1-0/+29
Change-Id: Icce25b5d113eb5b37ec1e5b6c6c14aacdb01cd8d
2020-05-17pcu: Introduce TC_mo_ping_pong_with_ul_racap_egprs_onlyPau Espin Pedrol1-5/+50
Change-Id: I396dbd0ca200fbf9365c534f4d479f903d0417ff
2020-05-15pcu: Support decoding Egprs Pkt Ul Ass on PDCHPau Espin Pedrol1-1/+4
Change-Id: I30fb98aab67303997b803a0359ffc2e0b65ebf01
2020-05-15pcu: use correct RA type to properly test 2phase accessPau Espin Pedrol1-31/+109
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
2020-05-13pcu: f_dl_block_ack_fn(): Allow passing ctrl dl_blockPau Espin Pedrol1-3/+2
Downlink Control blocks like Packet Uplink Assignment (PACCH) contain rrbp + rrbp_valid in mac headers Change-Id: I0401b0b378c7770d06a15d14dac6436303b4ccab
2020-05-13pcu: Properly pass tlli in f_tx_rlcmac_ul_n_blocks()Pau Espin Pedrol1-9/+14
Change-Id: Idb8febbbff732f02d05b0043c75e2a0729e01d4f
2020-05-11PCU: introduce a new test case TC_dl_flow_more_blocksVadim Yanitskiy1-0/+81
Change-Id: I45edbc943194c15b084eb04dda390db75b4bfa0f Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com> Related: OS#4506
2020-05-10PCU: refactor and simplify f_rx_rlcmac_dl_block_exp_data()Vadim Yanitskiy1-72/+92
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>
2020-05-10library: enrich tr_RLCMAC_DATA_RRBP, rename to tr_RLCMAC_DATA_GPRSVadim Yanitskiy1-1/+2
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>
2020-05-10PCU: introduce f_rrbp_ack_fn(), fix poll frame number calculationVadim Yanitskiy1-5/+5
The resulting frame number shall be within the period of TDMA hyperframe. Change-Id: I794a14f69293cbbc937d62d09dd5794956b882db Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-07PCU: fix f_pkt_paging_match_tmsi(): drop copy-pasted lineVadim Yanitskiy1-1/+0
Change [1] broke the following test cases: - TC_paging_cs_from_sgsn_sign_ptmsi, - TC_paging_cs_from_sgsn_ptp. Let's fix this! Change-Id: I9ec798e44138570bed726ffcd842448e199c1b54 Fixes: [1] I6a859687d9605cc08c51ff44d946c279b79bedfa Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-07PCU: PCU_Tests.default: add 'USER' category to ConsoleMaskVadim Yanitskiy1-1/+1
Change-Id: I12bffab01e52d92d313edddc000b5f3ec62c5139 Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-07PCU: refactor f_imm_ass_verify_{ul,dl}_tbf_ass(): call f_shutdown()Vadim Yanitskiy1-75/+38
This allows us to reduce code duplication. Change-Id: Ib74285177a5d8e3c4a27df1321e7eab3462318bc Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-07PCU: introduce f_shutdown() to ensure proper tear downVadim Yanitskiy2-82/+142
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>
2020-05-07PCU: fix TC_ta_rach_imm_ass(): properly match Timing AdvanceVadim Yanitskiy1-2/+5
This test case would not fail even in case of Timing Advance mismatch. Change-Id: Ife86e5e0e39f0112b854ed9a13e9c6f3c49531c9 Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06PCU: f_imm_ass_verify_{ul,dl}_tbf_ass(): use 'in' qualifierVadim Yanitskiy1-2/+2
We don't need a copy of the whole RR Immediate Assignment message. Change-Id: I44417460126e507a0a47a5aee8c4a995085023fa Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06PCU: fix f_establish_tbf(): always expect Uplink TBFVadim Yanitskiy1-1/+2
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>
2020-05-06PCU: fix f_establish_tbf(): use proper CHANNEL REQUEST by defaultVadim Yanitskiy1-2/+5
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>
2020-05-06PCU: drop meaningless 'udpReuseAddress' optionVadim Yanitskiy1-1/+0
The PCU interface has nothing to do with UDP... Change-Id: I8d919e686c6ef311517eb53496d008987f984794 Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-01RLCMAC_EncDec.cc: Fix egprs data block encode alignmentPau Espin Pedrol2-3/+53
Selftests I'm using in the pcu testsuite to verify encoding are attached too. Change-Id: Id0e21248853eb5fac89e863822804cfbecf3c865
2020-04-29Split templates in RLCMAC_{CSN1_}Types into their own _Templates filePau Espin Pedrol3-2/+5
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
2020-04-29pcu: Rename PCU*RAW* content to PCUPau Espin Pedrol8-1915/+1913
Basically what's done here: * mv PCU_Tests_RAW${suffix}.ttcn -> PCU_Tests${suffix}.ttcn * mv PCUIF_RAW_Components.ttcn -> PCUIF_Components.ttcn * Change module names according to file names and fix all references in code and configuration. Change-Id: Iacaddb56e41012ba58ef6d1b9e79d2c012259bed