pcu: Introduce test TC_ul_tbf_reestablish_with_pkt_dl_ack_nack
Change-Id: I2058862cf11d0027b040eb6d9c0a27524df593b5
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 6c59917..d7ab69b 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -3400,6 +3400,60 @@
f_shutdown(__BFILE__, __LINE__, final := true);
}
+/* Test scenario where MS wants to request a new UL TBF using a DL (EGPRS) ACK/NACK
+ * transmitted on ul slot provided by its DL TBF.
+ * See 3GPP TS 44.060 sec 9.3.2.4.2 "Non-extended uplink TBF mode" */
+function f_TC_ul_tbf_reestablish_with_pkt_dl_ack_nack(boolean use_egprs) runs on RAW_PCU_Test_CT {
+ var GprsMS ms;
+ var octetstring data := f_rnd_octstring(10);
+ var RlcmacDlBlock dl_block;
+ var template RlcmacDlBlock rej_tmpl;
+ var uint32_t dl_fn;
+ var uint32_t sched_fn;
+ var template (value) MSRadioAccessCapabilityV_BSSGP racap_tmpl;
+
+ if (use_egprs == true) {
+ racap_tmpl := bssgp_ms_racap_egprs_def;
+ } else {
+ racap_tmpl := bssgp_ms_racap_gprs_def;
+ }
+
+ /* 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 */
+ /* Initialize the PCU interface abstraction */
+ f_init_raw(testcasename());
+
+ /* Establish BSSGP connection to the PCU */
+ f_bssgp_establish();
+ f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli);
+
+ /* SGSN sends some DL data, PCU will page on CCCH (PCH) */
+ BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data, racap_tmpl));
+ f_ms_exp_dl_tbf_ass_ccch(ms, PCU_IF_SAPI_PCH);
+
+ /* Wait timer X2002 and DL block is available after CCCH IMM ASS: */
+ f_sleep(X2002);
+ f_rx_rlcmac_dl_block_exp_data(dl_block, dl_fn, data, 0);
+
+ /* ACK the DL block, asking for new UL TBF by including ChanReqDesc */
+ f_dltbf_ack_block(ms.dl_tbf, dl_block, '1'B);
+ f_ms_tx_ul_block(ms, f_dltbf_ts_RLCMAC_DL_ACK_NACK(ms.dl_tbf, use_egprs, ts_ChannelReqDescription()),
+ f_dl_block_ack_fn(dl_block, dl_fn));
+
+ /* We should receive a Pkt Ul ASS */
+ f_ms_rx_pkt_ass_pacch(ms, sched_fn, tr_RLCMAC_UL_PACKET_ASS);
+ f_shutdown(__BFILE__, __LINE__, final := true);
+}
+testcase TC_ul_tbf_reestablish_with_pkt_dl_ack_nack() runs on RAW_PCU_Test_CT {
+ f_TC_ul_tbf_reestablish_with_pkt_dl_ack_nack(false);
+}
+testcase TC_ul_tbf_reestablish_with_pkt_dl_ack_nack_egprs() runs on RAW_PCU_Test_CT {
+ f_TC_ul_tbf_reestablish_with_pkt_dl_ack_nack(true);
+}
+
/* Test CS paging over the BTS<->PCU socket.
* When a (class B or C, not A) MS has an active TBF (or is on the PDCH), the MS can not react on CS paging over CCCH.
* Paging should be send on the PACCH.
@@ -6742,6 +6796,8 @@
execute( TC_ul_multislot_tbf_ms_class_from_2phase() );
execute( TC_ul_tbf_reestablish_with_pkt_resource_req() );
execute( TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max() );
+ execute( TC_ul_tbf_reestablish_with_pkt_dl_ack_nack() );
+ execute( TC_ul_tbf_reestablish_with_pkt_dl_ack_nack_egprs() );
execute( TC_multiplex_dl_gprs_egprs() );