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

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
Fri Nov 6 17:51:54 UTC 2020


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

Change subject: pcu: Introduce test TC_dl_multislot_tbf_ms_class_from_sgsn
......................................................................

pcu: Introduce test TC_dl_multislot_tbf_ms_class_from_sgsn

Related: SYS#5131
Change-Id: I417953a4c89dec82500b3b66f08ed648d266d813
---
M pcu/PCU_Tests.ttcn
1 file changed, 56 insertions(+), 0 deletions(-)

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 1b5fb78..44213a7 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1665,6 +1665,61 @@
 	f_shutdown(__BFILE__, __LINE__, final := true);
 }
 
+/* Verify allocation and use of multislot tbf, triggered by MS class provided in SGSN. SYS#5131 */
+testcase TC_dl_multislot_tbf_ms_class_from_sgsn() runs on RAW_PCU_Test_CT {
+	var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default);
+	var octetstring data := f_rnd_octstring(10);
+	var PacketDlAssign dl_tbf_ass;
+	var RlcmacDlBlock dl_block;
+	var uint32_t poll_fn;
+	var uint32_t sched_fn;
+	var GprsMS ms;
+	timer T := 5.0;
+
+	/* 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 */
+
+	/* Only 1 TRX with 8 PDCH */
+	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '11111111'B, 0);
+	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename(), info_ind);
+
+	/* Establish BSSGP connection to the PCU */
+	f_bssgp_establish();
+	f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli);
+
+	/* Establish an Uplink TBF, this way the PCU can send DL Assignment
+	  through PDCH (no multiblock assignment possible through PCH) */
+	f_ms_establish_ul_tbf(ms);
+
+	/* Send one UL block (with TLLI since we are in One-Phase Access
+	   contention resoultion) and make sure it is ACKED fine */
+	f_ms_tx_ul_data_block(ms, data, with_tlli := true, nr := f_ms_tx_TsTrxBtsNum(ms));
+	/* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */
+	f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, poll_fn, nr := f_ms_tx_TsTrxBtsNum(ms));
+
+	/* SGSN sends some DL data, PCU will assign DL TBF through PACCH */
+	var MultislotCap_GPRS_BSSGP mscap_gprs := {
+		gprsmultislotclass := '10010'B, /* MS class 18, supports 8 DL and 8 UL */
+		gprsextendeddynalloccap := '0'B
+	};
+	var MSRadioAccessCapabilityV_BSSGP ms_racap := { valueof(ts_RaCapRec_BSSGP('0001'B /* E-GSM */, mscap_gprs, omit)) };
+	BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data, ms_racap));
+	dl_block := f_ms_rx_pkt_ass_pacch(ms, sched_fn, tr_RLCMAC_DL_PACKET_ASS, nr := f_ms_tx_TsTrxBtsNum(ms));
+	if (f_dltbf_num_slots(ms.dl_tbf) != 8) {
+		setverdict(fail, "Expected 8 PDCH slots allocated but got ", f_dltbf_num_slots(ms.dl_tbf));
+		f_shutdown(__BFILE__, __LINE__);
+	}
+	f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), sched_fn, nr := f_ms_tx_TsTrxBtsNum(ms));
+
+	f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
 /* Test scenario where MS wants to request a new TBF once the current one is
  * ending, by means of sending a Packet Resource Request on ul slot provided by
  * last Pkt Ul ACK's RRBP.
@@ -2751,6 +2806,7 @@
 		execute( TC_pcuif_fh_pkt_ass_ul() );
 		execute( TC_pcuif_fh_pkt_ass_dl() );
 		execute( TC_multitrx_multims_alloc() );
+		execute( TC_dl_multislot_tbf_ms_class_from_sgsn() );
 	}
 
 	execute( TC_pcuif_info_ind_subsequent() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20947
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: I417953a4c89dec82500b3b66f08ed648d266d813
Gerrit-Change-Number: 20947
Gerrit-PatchSet: 7
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
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/20201106/ba5413e4/attachment.htm>


More information about the gerrit-log mailing list