laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21035 )

Change subject: pcu: Introduce test TC_cs_initial_dl
......................................................................

pcu: Introduce test TC_cs_initial_dl

Change-Id: I00bae15a007935cc4e027e63de4367d83e994bd7
---
M pcu/PCU_Tests.ttcn
1 file changed, 46 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved
  neels: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve



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() );

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21035
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I00bae15a007935cc4e027e63de4367d83e994bd7
Gerrit-Change-Number: 21035
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: neels <nhofm...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to