aboutsummaryrefslogtreecommitdiffstats
path: root/pcu
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-12-05 16:39:55 +0100
committerlaforge <laforge@osmocom.org>2019-12-17 13:53:44 +0000
commita7b7566e0bc931d59c2d82ac2cc6d35c2446d25c (patch)
tree5ba62e1bcb31e39d91efff26edd6551719dc7dbf /pcu
parent8948633e8cbdb22fd9695c7e6fc668dca206a87d (diff)
pcu: Introduce test TC_imm_ass_dl_block_retrans
Diffstat (limited to 'pcu')
-rw-r--r--pcu/PCU_Tests_RAW.ttcn55
1 files changed, 55 insertions, 0 deletions
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index cf630d34..51b8ddf4 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -1467,6 +1467,60 @@ testcase TC_mo_ping_pong() runs on RAW_PCU_Test_CT {
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 @@ control {
execute( TC_cs_max_ul() );
execute( TC_t3169() );
execute( TC_mo_ping_pong() );
+ execute( TC_imm_ass_dl_block_retrans() );
}