pcu: Introduce test TC_cs_initial_dl
Change-Id: I00bae15a007935cc4e027e63de4367d83e994bd7
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 427eb35..aa4d28d 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -822,6 +822,51 @@
f_shutdown(__BFILE__, __LINE__, final := true);
}
+/* Test the initial DL CS set by VTY works fine */
+testcase TC_cs_initial_dl() runs on RAW_PCU_Test_CT {
+ var octetstring data := f_rnd_octstring(10);
+ var CodingScheme exp_dl_cs_mcs;
+ var RlcmacDlBlock dl_block;
+ var uint32_t poll_fn;
+ var GprsMS ms;
+
+ /* 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(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
+
+ /* Set initial allowed DL CS to 3 */
+ g_cs_initial_dl := 3;
+ exp_dl_cs_mcs := CS_3;
+ /* Set maximum allowed UL CS to 4 */
+ g_cs_max_dl := 4;
+ f_pcuvty_set_allowed_cs_mcs();
+ f_pcuvty_set_link_quality_ranges();
+
+ /* 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));
+ 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, poll_fn, data, 0, exp_dl_cs_mcs);
+
+ /* ACK the DL block */
+ f_acknackdesc_ack_block(ms.dl_tbf.acknack_desc, dl_block, '1'B);
+ f_ms_tx_ul_block(ms, ts_RLCMAC_DL_ACK_NACK(ms.dl_tbf.tfi, ms.dl_tbf.acknack_desc),
+ f_dl_block_ack_fn(dl_block, poll_fn));
+
+ f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
/* Verify PCU drops TBF after some time of inactivity. */
testcase TC_t3169() runs on RAW_PCU_Test_CT {
var PCUIF_info_ind info_ind;
@@ -2869,6 +2914,7 @@
execute( TC_cs_lqual_ul_tbf() );
execute( TC_cs_initial_ul() );
execute( TC_cs_max_ul() );
+ execute( TC_cs_initial_dl() );
execute( TC_t3169() );
execute( TC_t3193() );
execute( TC_countdown_procedure() );