Change in osmo-ttcn3-hacks[master]: pcu: Introduce test TC_countdown_procedure

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Sun May 17 18:43:12 UTC 2020


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

Change subject: pcu: Introduce test TC_countdown_procedure
......................................................................

pcu: Introduce test TC_countdown_procedure

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

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 18eff7d..a87396c 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1433,6 +1433,65 @@
 	f_shutdown(__BFILE__, __LINE__, final := true);
 }
 
+/* Verify PCU handles correctly Countdown Procedure based on BS_CV_MAX */
+testcase TC_countdown_procedure() runs on RAW_PCU_Test_CT  {
+	var GsmRrMessage rr_imm_ass;
+	var PacketUlAssign ul_tbf_ass;
+	var RlcmacDlBlock dl_block;
+	var boolean ok;
+	var uint32_t sched_fn;
+	var OCT4 tlli := '00000001'O;
+	var uint14_t bsn := 1;
+	var PDU_BSSGP bssgp_pdu;
+	var octetstring total_payload;
+	var integer padding_len;
+
+	/* 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);
+
+	/* Establish an Uplink TBF */
+	ok := f_establish_tbf(rr_imm_ass);
+	if (not ok) {
+		setverdict(fail, "Failed to establish TBF");
+		f_shutdown(__BFILE__, __LINE__);
+	}
+	/* Make sure we've got an Uplink TBF assignment */
+	f_imm_ass_verify_ul_tbf_ass(rr_imm_ass, ul_tbf_ass);
+
+	/* Send one UL block (with TLLI since we are in One-Phase Access
+	   contention resoultion) and make sure it is ACKED fine. */
+	   total_payload := f_rnd_octstring(16); /* 16 bytes fills the llc block (because TLLI takes 4 bytes) */
+	var template (value) RlcmacUlBlock ul_data := t_RLCMAC_UL_DATA_TLLI(
+		tfi := ul_tbf_ass.dynamic.tfi_assignment,
+		cv := 15, /* Set CV = 15 to signal there's still more than BS_CV_MAX blocks to be sent */
+		bsn := 0,
+		blocks := { valueof(t_RLCMAC_LLCBLOCK(total_payload)) },
+		tlli := tlli);
+
+	f_tx_rlcmac_ul_block(ul_data, 0);
+	f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn);
+	/* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */
+	f_tx_rlcmac_ul_block(ts_RLCMAC_CTRL_ACK(tlli), 0, sched_fn);
+
+	/* Send enough blocks to test whole procedure: Until Nth block
+	   (N=BS_CV_MAX), CV=15 is sent, and then the decreasing countdown value is sent.
+	 */
+	total_payload := total_payload & f_tx_rlcmac_ul_n_blocks(ul_tbf_ass.dynamic.tfi_assignment, bsn, 20);
+	f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn);
+	/* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */
+	f_tx_rlcmac_ul_block(ts_RLCMAC_CTRL_ACK(tlli), 0, sched_fn);
+
+	/* receive one message on BSSGP with all aggregated data in payload: */
+	BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id, total_payload));
+}
+
 /* Test scenario where MS wants to send some data on PDCH against SGSN and it is
  * answered, so TBFs for uplink and later for downlink are created.
  */
@@ -2187,6 +2246,7 @@
 	execute( TC_cs_max_ul() );
 	execute( TC_t3169() );
 	execute( TC_t3193() );
+	execute( TC_countdown_procedure() );
 	execute( TC_mo_ping_pong() );
 	execute( TC_mo_ping_pong_with_ul_racap() );
 	execute( TC_force_two_phase_access() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18260
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: I2b92bf4a17e89b1d68869aac4243c0e106ce3be5
Gerrit-Change-Number: 18260
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200517/6345e7fd/attachment.htm>


More information about the gerrit-log mailing list