Change in osmo-ttcn3-hacks[master]: PCU_Tests: WIP: add f_TC_paging_cs_multi_tuwat

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Fri Oct 30 22:52:52 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20998 )


Change subject: PCU_Tests: WIP: add f_TC_paging_cs_multi_tuwat
......................................................................

PCU_Tests: WIP: add f_TC_paging_cs_multi_tuwat

Change-Id: Ie8b4006f969598c9b0c452002d559f985d108a66
Related: OS#4838
---
M pcu/PCU_Tests.ttcn
1 file changed, 100 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/20998/1

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 4888855..cdb3708 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1771,6 +1771,106 @@
 	f_shutdown(__BFILE__, __LINE__, final := true);
 }
 
+/* Allocate the given number of Uplink TBFs on all available TRX/TS
+ * TODO: re-use the upcoming multi-TBF API by Pau */
+private function f_TC_paging_cs_multi_alloc(inout GprsMSArray msl, integer n := 7)
+runs on RAW_PCU_Test_CT {
+	for (var integer i := 0; i < n; i := i + 1) {
+		var template TsTrxBtsNum nr := ts_TsTrxBtsNum(7, i mod 8);
+		var GprsMS ms := valueof(t_GprsMS_def);
+		var RlcmacDlBlock dl_block;
+		var uint32_t poll_fn;
+
+		ms.imsi := f_gen_imsi(i + 1);
+		ms.tlli := int2oct(i + 1, 4);
+
+		/* Append to the given list */
+		msl := msl & { ms };
+
+		f_bssgp_client_llgmm_assign('FFFFFFFF'O, ms.tlli);
+
+		f_ms_use_ra(ms, (bit2int(chan_req_def) + i) mod 8);
+
+		/* Establish an Uplink TBF */
+		f_ms_establish_ul_tbf(ms);
+
+		/* Send a random block, so this TBF becomes "active" */
+		f_ms_tx_ul_data_block(ms, f_rnd_octstring(12), with_tlli := true, nr := nr);
+		f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, poll_fn, nr := nr);
+	}
+}
+
+private function f_TC_paging_cs_multi_keep_alive(inout GprsMSArray msl)
+runs on RAW_PCU_Test_CT {
+	for (var integer i := 0; i < lengthof(msl); i := i + 1) {
+		var template TsTrxBtsNum nr := ts_TsTrxBtsNum(7, i mod 8);
+
+		/* Send a random block, so this TBF remains "active" */
+		f_ms_tx_ul_data_block(msl[i], f_rnd_octstring(12), nr := nr);
+		// f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, poll_fn, nr := nr);
+	}
+}
+
+/* TODO: test P-TMSI, IMSI, P-TMSI + IMSI separately */
+testcase TC_paging_cs_multi_tuwat() runs on RAW_PCU_Test_CT {
+	const BssgpBvci bvci := mp_gb_cfg.bvc[0].bvci;
+	var GprsMSArray msl := { };
+
+	/* Initialize NS/BSSGP side */
+	f_init_bssgp();
+
+	/* TODO: explicitly configure PDCH slot masks */
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename());
+
+	/* Establish BSSGP connection to the PCU */
+	f_bssgp_establish();
+
+	/* Allocate n = 56 Uplink TBFs on all available TRX/TS */
+	f_TC_paging_cs_multi_alloc(msl, 7 * 8);
+
+	/* Send n * 2 CS PAGING requests (IMSI + TLLI == P-TMSI) */
+	for (var integer i := 0; i < lengthof(msl); i := i + 1) {
+		BSSGP[0].send(ts_BSSGP_CS_PAGING_PTMSI(bvci, msl[i].imsi,
+						       oct2int(msl[i].tlli)));
+		BSSGP[0].send(ts_BSSGP_CS_PAGING_IMSI(bvci, msl[i].imsi));
+	}
+
+	/* FIXME: work around a race condition between PCUIF and BSSGP */
+	f_sleep(0.2);
+
+	/* A single Packet Paging Request may contain up to:
+	 * P-TMSI + IMSI: 2 MIs;  P-TMSI: 4 MIs;  IMSI: 3 MIs. */
+	for (var integer i := lengthof(msl); i > 0; i := i - 2) { /* LIFO */
+		var RlcmacDlBlock dl_block;
+		var uint32_t poll_fn;
+
+		f_rx_rlcmac_dl_block(dl_block, poll_fn);
+		if (not match(dl_block, tr_RLCMAC_PACKET_PAG_REQ)) {
+			setverdict(fail, "Rx unexpected DL block: ", dl_block);
+			break;
+		}
+
+		if (not ispresent(dl_block.ctrl.payload.u.paging.repeated_pageinfo)) {
+			setverdict(fail, "Repeated Page Info IE is absent?!?");
+			break;
+		}
+
+		var RepeatedPageInfo rpi := dl_block.ctrl.payload.u.paging.repeated_pageinfo;
+		for (var integer j := 0; j < lengthof(rpi); j := j + 1) {
+			var PageInfo info := rpi[j].item;
+
+			/* TODO: check and match received MIs */
+			log("Rx paging MI: ", info);
+		}
+
+		setverdict(pass);
+	}
+
+	f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
 /* Test CS paging over Gb (SGSN->PCU->BTS[PDCH]).
  */
 private function f_tc_paging_cs_from_sgsn(Nsvci bvci, boolean use_ptmsi := false)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20998
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: Ie8b4006f969598c9b0c452002d559f985d108a66
Gerrit-Change-Number: 20998
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201030/5e1e1f0c/attachment.htm>


More information about the gerrit-log mailing list