pcu: Introduce test TC_imm_ass_dl_block_retrans
Change-Id: Icc60cebb8583c9dc97b658def69f17e6efced384
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index cf630d3..51b8ddf 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -1467,6 +1467,60 @@
f_tx_rlcmac_ul_block(ts_RLCMAC_DL_ACK_NACK(dl_block.data.mac_hdr.hdr_ext.tfi, ack_nack_desc), 0, sched_fn);
}
+/* Verify that if PCU doesn't get an ACK for first DL block after IMM ASS, it
+ * will retry by retransmitting both the IMM ASS + DL block after poll (ack)
+ * timeout occurs (specified by sent RRBP on DL block). */
+testcase TC_imm_ass_dl_block_retrans() runs on RAW_PCU_Test_CT {
+ var GsmRrMessage rr_imm_ass;
+ var PacketDlAssign dl_tbf_ass;
+ var RlcmacDlBlock dl_block;
+ var octetstring data := f_rnd_octstring(10);
+ var boolean ok;
+ var uint32_t sched_fn;
+ var OCT4 tlli := '00000001'O;
+ var AckNackDescription ack_nack_desc := valueof(t_AckNackDescription_init);
+
+ /* Initialize NS/BSSGP side */
+ f_init_bssgp();
+
+ /* Initialize the PCU interface abstraction */
+ f_init_raw(testcasename());
+
+ /* Establish BSSGP connection to the PCU */
+ f_bssgp_establish();
+ f_bssgp_client_llgmm_assign('FFFFFFFF'O, tlli);
+
+ /* SGSN sends some DL data, PCU will page on CCCH (PCH) */
+ BSSGP[0].send(ts_BSSGP_DL_UD(tlli, data));
+ f_pcuif_rx_pch_imm_tbf_ass(rr_imm_ass);
+ ok := f_imm_ass_verify_dl_tbf_ass(rr_imm_ass, dl_tbf_ass);
+ if (not ok) {
+ setverdict(fail, "Immediate Assignment not a Downlink TBF");
+ mtc.stop;
+ }
+
+ /* Wait timer X2002 and DL block is available after CCCH IMM ASS: */
+ f_sleep(X2002);
+ f_rx_rlcmac_dl_block_exp_data(dl_block, sched_fn, data, 0);
+
+ /* Now we don't ack the dl block (emulate MS failed receiveing IMM ASS
+ * or GPRS DL, or DL ACK was lost for some reason). As a result, PCU
+ * should retrigger IMM ASS + GPRS DL procedure after poll timeout. */
+ f_pcuif_rx_pch_imm_tbf_ass(rr_imm_ass);
+ ok := f_imm_ass_verify_dl_tbf_ass(rr_imm_ass, dl_tbf_ass);
+ if (not ok) {
+ setverdict(fail, "Immediate Assignment not a Downlink TBF");
+ mtc.stop;
+ }
+ /* Wait timer X2002 and DL block is available after CCCH IMM ASS: */
+ f_sleep(X2002);
+ f_rx_rlcmac_dl_block_exp_data(dl_block, sched_fn, data, 0);
+
+ /* ACK the DL block */
+ f_acknackdesc_ack_block(ack_nack_desc, dl_block.data.mac_hdr.hdr_ext.bsn, '1'B);
+ f_tx_rlcmac_ul_block(ts_RLCMAC_DL_ACK_NACK(dl_block.data.mac_hdr.hdr_ext.tfi, ack_nack_desc), 0, sched_fn);
+}
+
control {
execute( TC_ns_reset() );
execute( TC_ns_reset_retrans() );
@@ -1486,6 +1540,7 @@
execute( TC_cs_max_ul() );
execute( TC_t3169() );
execute( TC_mo_ping_pong() );
+ execute( TC_imm_ass_dl_block_retrans() );
}