fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29629 )
Change subject: pcu: add TC_dl_multislot_tbf_ack_wrong_ts reproducing OS#5696 ......................................................................
pcu: add TC_dl_multislot_tbf_ack_wrong_ts reproducing OS#5696
Change-Id: I0c632721e167ae14c0f3d57b08019f0650771df5 Related: OS#5696 --- M pcu/PCU_Tests.ttcn 1 file changed, 67 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/29/29629/1
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 611ca23..504de08 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -4543,6 +4543,72 @@ f_shutdown(__BFILE__, __LINE__, final := true); }
+/* Reproduce weird behavior explained in OS#5696 */ +testcase TC_dl_multislot_tbf_ack_wrong_ts() runs on RAW_PCU_Test_CT { + var octetstring data := f_rnd_octstring(8); + const TsTrxBtsNum nr_ts6 := {6, 0, 0, 0}; + const TsTrxBtsNum nr_ts7 := {7, 0, 0, 0}; + var GprsMS ms := valueof(t_GprsMS_def); + var RlcmacDlBlock dl_block; + var uint32_t poll_fn; + var uint32_t dl_fn; + + /* Initialize NS/BSSGP side */ + f_init_bssgp(); + + var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS)); + /* Configure both TS6 and TS7 as PDCH to enable multi-slot TBFs */ + f_PCUIF_PDCHMask_set(info_ind, '00000011'B, 0); + f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (1 .. 7)); + /* Initialize the PCU interface abstraction */ + f_init_raw(testcasename(), info_ind); + + /* Establish BSSGP connection to the PCU */ + f_bssgp_establish(); + f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli); + + /* Establish an Uplink TBF (assuming TS6) */ + f_ms_establish_ul_tbf(ms); + + /* (TS6) Send an Uplink block, so this TBF becomes "active" */ + f_ms_tx_ul_data_block(ms, data, with_tlli := true, nr := nr_ts6); + + /* (TS6) DL ACK/NACK ends contention resolution */ + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, poll_fn, nr := nr_ts6); + + /* SGSN sends some DL data, PCU will assign Downlink resource on PACCH */ + BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data)); + + /* (TS6) Expect an RLC/MAC block with Packet Downlink Assignment on PACCH (see 11.2.29) */ + f_ms_rx_pkt_ass_pacch(ms, poll_fn, tr_RLCMAC_DL_PACKET_ASS, nr := nr_ts6); + /* Expect a multi-slot TBF including TS6 and TS7 */ + if (not match(ms.dl_tbf.ass.pacch.timeslot_alloc, '00000011'B)) { + setverdict(fail, "Unexpected TIMESLOT_ALLOCATION in Pkt DL Ass"); + f_shutdown(__BFILE__, __LINE__); + } + + /* Packet Downlink Assignment polls the MS, so we need to ACKnowledge it. + * SE K800i sends a dummy block on TS6 and then the ACK on TS7. */ + f_ms_tx_ul_block(ms, ts_RLCMAC_UL_DUMMY_CTRL(ms.tlli), + poll_fn, wait := false, nr := nr_ts6); + f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), + poll_fn, wait := false, nr := nr_ts7); + BTS.receive(tr_RAW_PCU_EV(TDMA_EV_PDTCH_BLOCK_SENT, { tdma_fn := poll_fn })); + BTS.receive(tr_RAW_PCU_EV(TDMA_EV_PDTCH_BLOCK_SENT, { tdma_fn := poll_fn })); + + if (false) { /* for debugging only */ + var BTS_PDTCH_Block pdtch_msg; + f_pcuif_rx_data_req_pdtch(pdtch_msg, nr := nr_ts6); + log("======== (TS6) Rx data: ", pdtch_msg.dl_block); + f_pcuif_rx_data_req_pdtch(pdtch_msg, nr := nr_ts7); + log("======== (TS7) Rx data: ", pdtch_msg.dl_block); + } + + f_rx_rlcmac_dl_block_exp_data(dl_block, dl_fn, data, nr := nr_ts6); + + f_shutdown(__BFILE__, __LINE__, final := true); +} + /* Verify concurrent PDCH use of EGPRS and GPRS (EGPRS dl rlcmac blk is * downgraded to CS1-4 so that GPRS can read the USF). * See 3GPP TS 44.060 5.2.4a "Multiplexing of GPRS, EGPRS and EGPRS2 capable mobile stations" @@ -6866,6 +6932,7 @@ execute( TC_ul_tbf_reestablish_with_pkt_dl_ack_nack() ); execute( TC_ul_tbf_reestablish_with_pkt_dl_ack_nack_egprs() );
+ execute( TC_dl_multislot_tbf_ack_wrong_ts() ); execute( TC_multiplex_dl_gprs_egprs() );
execute( TC_pcuif_info_ind_subsequent() );