From 0ea8b6f35525b4c7f216ef2fe558d181f07ef2f4 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 29 Oct 2020 20:48:43 +0100 Subject: [PATCH] pcu: Introduce test TC_dl_multislot_tbf_ms_class_from_sgsn Related: SYS#5131 Change-Id: I417953a4c89dec82500b3b66f08ed648d266d813 --- pcu/PCU_Tests.ttcn | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 1b5fb78e5..44213a79f 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -1665,6 +1665,61 @@ testcase TC_ul_flow_multiple_llc_blocks() runs on RAW_PCU_Test_CT { f_shutdown(__BFILE__, __LINE__, final := true); } +/* Verify allocation and use of multislot tbf, triggered by MS class provided in SGSN. SYS#5131 */ +testcase TC_dl_multislot_tbf_ms_class_from_sgsn() runs on RAW_PCU_Test_CT { + var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default); + var octetstring data := f_rnd_octstring(10); + var PacketDlAssign dl_tbf_ass; + var RlcmacDlBlock dl_block; + var uint32_t poll_fn; + var uint32_t sched_fn; + var GprsMS ms; + timer T := 5.0; + + /* Initialize NS/BSSGP side */ + f_init_bssgp(); + /* Initialize GPRS MS side */ + f_init_gprs_ms(); + ms := g_ms[0]; /* We only use first MS in this test */ + + /* Only 1 TRX with 8 PDCH */ + f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '11111111'B, 0); + f_PCUIF_ver_INFO_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, this way the PCU can send DL Assignment + through PDCH (no multiblock assignment possible through PCH) */ + f_ms_establish_ul_tbf(ms); + + /* Send one UL block (with TLLI since we are in One-Phase Access + contention resoultion) and make sure it is ACKED fine */ + f_ms_tx_ul_data_block(ms, data, with_tlli := true, nr := f_ms_tx_TsTrxBtsNum(ms)); + /* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */ + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, poll_fn, nr := f_ms_tx_TsTrxBtsNum(ms)); + + /* SGSN sends some DL data, PCU will assign DL TBF through PACCH */ + var MultislotCap_GPRS_BSSGP mscap_gprs := { + gprsmultislotclass := '10010'B, /* MS class 18, supports 8 DL and 8 UL */ + gprsextendeddynalloccap := '0'B + }; + var MSRadioAccessCapabilityV_BSSGP ms_racap := { valueof(ts_RaCapRec_BSSGP('0001'B /* E-GSM */, mscap_gprs, omit)) }; + BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data, ms_racap)); + dl_block := f_ms_rx_pkt_ass_pacch(ms, sched_fn, tr_RLCMAC_DL_PACKET_ASS, nr := f_ms_tx_TsTrxBtsNum(ms)); + if (f_dltbf_num_slots(ms.dl_tbf) != 8) { + setverdict(fail, "Expected 8 PDCH slots allocated but got ", f_dltbf_num_slots(ms.dl_tbf)); + f_shutdown(__BFILE__, __LINE__); + } + f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), sched_fn, nr := f_ms_tx_TsTrxBtsNum(ms)); + + f_shutdown(__BFILE__, __LINE__, final := true); +} + /* Test scenario where MS wants to request a new TBF once the current one is * ending, by means of sending a Packet Resource Request on ul slot provided by * last Pkt Ul ACK's RRBP. @@ -2751,6 +2806,7 @@ control { execute( TC_pcuif_fh_pkt_ass_ul() ); execute( TC_pcuif_fh_pkt_ass_dl() ); execute( TC_multitrx_multims_alloc() ); + execute( TC_dl_multislot_tbf_ms_class_from_sgsn() ); } execute( TC_pcuif_info_ind_subsequent() );