Change in osmo-ttcn3-hacks[master]: pcu: prepare tests for new GPRS/EGPRS multiplex support

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 Oct 30 15:28:56 UTC 2020


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


Change subject: pcu: prepare tests for new GPRS/EGPRS multiplex support
......................................................................

pcu: prepare tests for new GPRS/EGPRS multiplex support

Once GPRS/EGPRS multiplexed support is ready, it will be controlled
through pcu info_ind.flags by enabling
MCS or not; the "egprs only" VTY comamnd will be dropped.
The usual setup would be to support both GPRS+EGPRS, so make that the default.
Most tests require to be passed the _noMCS variant to work in older
versions of PCU, since those versions use the "egprs only" concept which
will reject egprs_ms_class=0. Same tests enabling MCS in newer osmo-pcu
shouldn't be a problem.

Related: OS#4544
Change-Id: Ib95aae155b0712313a30f0c5404a8cb1f28b98f5
---
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests.ttcn
2 files changed, 63 insertions(+), 38 deletions(-)



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

diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 935f82b..10b63be 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -749,6 +749,32 @@
 	spare2 := '000'B
 };
 
+const PCUIF_Flags c_PCUIF_Flags_noMCS := {
+	bts_active := true,
+	sysmo_direct_dsp := false,
+	spare := '00000000000000'B,
+	cs1 := true,
+	cs2 := true,
+	cs3 := true,
+	cs4 := true,
+	mcs1 := false,
+	mcs2 := false,
+	mcs3 := false,
+	mcs4 := false,
+	mcs5 := false,
+	mcs6 := false,
+	mcs7 := false,
+	mcs8 := false,
+	mcs9 := false,
+	spare2 := '000'B
+};
+
+function f_pcuif_ind_flags_egprs_enabled(PCUIF_Flags flags) return boolean {
+	return flags.mcs1 or flags.mcs2 or flags.mcs3 or flags.mcs4 or
+	       flags.mcs5 or flags.mcs6 or flags.mcs7 or flags.mcs8 or
+	       flags.mcs9;
+}
+
 template (value) PCUIF_InfoTrxTs ts_PCUIF_InfoTrxTsH0(template (value) uint3_t tsc := 7) := {
 	tsc := tsc,
 	hopping := 0,
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 36f0981..1cb8cf3 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -67,9 +67,10 @@
 
 
 /* FIXME: make sure to use parameters from mp_gb_cfg.cell_id in the PCU INFO IND */
-friend template (value) PCUIF_info_ind ts_PCUIF_INFO_default := {
+friend template (value) PCUIF_info_ind ts_PCUIF_INFO_default(template (value) PCUIF_Flags flags := c_PCUIF_Flags_default)
+:= {
 	version := PCUIF_Types.mp_pcuif_version,
-	flags := c_PCUIF_Flags_default,
+	flags := flags,
 	trx := f_PCUIF_ver_INFO_Trxs(GPRS_Components.mp_base_arfcn),
 	bsic := 7,
 	mcc := 262,
@@ -145,7 +146,6 @@
 	var uint8_t g_mcs_max_dl := 9;
 	var uint8_t g_mcs_max_ul := 9;
 
-	var boolean g_egprs_only := false;
 	var boolean g_force_two_phase_access := false;
 
 	/* Guard timeout */
@@ -190,12 +190,13 @@
 	f_vty_config2(PCUVTY, {"pcu"}, cmd);
 }
 
-private function f_init_vty(charstring id) runs on RAW_PCU_Test_CT {
+private function f_init_vty(charstring id, boolean egprs_only) runs on RAW_PCU_Test_CT {
 	map(self:PCUVTY, system:PCUVTY);
 	f_vty_set_prompts(PCUVTY);
 	f_vty_transceive(PCUVTY, "enable");
 
-	if (g_egprs_only) {
+	/* This will be removed soon, not needed. EGPRS support is controlled through pcu_ind flags */
+	if (egprs_only) {
 		f_vty_config2(PCUVTY, {"pcu"}, "egprs only");
 	} else {
 		f_vty_config2(PCUVTY, {"pcu"}, "no egprs");
@@ -224,7 +225,7 @@
 	connect(vc_BTS:PCUIF, vc_PCUIF:BTS);
 	connect(vc_BTS:TC, self:BTS);
 
-	f_init_vty(id);
+	f_init_vty(id, f_pcuif_ind_flags_egprs_enabled(valueof(info_ind.flags)));
 
 	f_init_statsd(id, vc_STATSD, mp_pcu_statsd_ip, mp_pcu_statsd_port);
 	/* This is normally done in the ConnHdlr component, but here
@@ -315,7 +316,7 @@
 	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());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* We cannot send too many TBF requests in a short time because
 	 * at some point the PCU will fail to allocate a new TBF. */
@@ -595,7 +596,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	f_pcuvty_set_allowed_cs_mcs();
 	f_pcuvty_set_link_quality_ranges();
@@ -682,7 +683,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Set initial UL CS to 3 */
 	g_cs_initial_ul := 3;
@@ -757,7 +758,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Set maximum allowed UL CS to 3 */
 	g_cs_max_ul := 3;
@@ -803,7 +804,7 @@
 	f_init_gprs_ms();
 	ms := g_ms[0]; /* We only use first MS in this test */
 
-	info_ind := valueof(ts_PCUIF_INFO_default);
+	info_ind := valueof(ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 	/* Set timer to 1 sec (default 5) to speedup test: */
 	info_ind.t3169 := 1;
 
@@ -902,7 +903,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -951,7 +952,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -1081,7 +1082,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -1114,7 +1115,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -1160,7 +1161,8 @@
 /* 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.
  */
-private function f_TC_mo_ping_pong_2phase_access(template (value) MSRadioAccessCapabilityV ms_racap,
+private function f_TC_mo_ping_pong_2phase_access(PCUIF_Flags ind_flags,
+						 template (value) MSRadioAccessCapabilityV ms_racap,
 						 template (present) CodingScheme exp_ul_cs_mcs := ?,
 						 template (present) CodingScheme exp_dl_cs_mcs := ?)
 runs on RAW_PCU_Test_CT {
@@ -1179,7 +1181,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(ind_flags));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -1232,13 +1234,10 @@
 	var CodingScheme exp_ul_cs_mcs := f_rlcmac_block_int2cs_mcs(g_mcs_initial_ul, false);
 	var CodingScheme exp_dl_cs_mcs := CS_2;
 
-	f_TC_mo_ping_pong_2phase_access(ms_racap, exp_ul_cs_mcs, exp_dl_cs_mcs);
+	f_TC_mo_ping_pong_2phase_access(c_PCUIF_Flags_noMCS, ms_racap, exp_ul_cs_mcs, exp_dl_cs_mcs);
 }
 
 testcase TC_mo_ping_pong_with_ul_racap_egprs_only() runs on RAW_PCU_Test_CT {
-	/* Initialize the PCU interface abstraction with EGPRS-only */
-	g_egprs_only := true;
-
 	var MultislotCap_GPRS mscap_gprs := {
 		gprsmultislotclass := '00011'B,
 		gprsextendeddynalloccap := '0'B
@@ -1251,7 +1250,7 @@
 	var CodingScheme exp_ul_cs_mcs := f_rlcmac_block_int2cs_mcs(g_mcs_initial_ul, true);
 	var CodingScheme exp_dl_cs_mcs := MCS_1;
 
-	f_TC_mo_ping_pong_2phase_access(ms_racap, exp_ul_cs_mcs, exp_dl_cs_mcs);
+	f_TC_mo_ping_pong_2phase_access(c_PCUIF_Flags_default, ms_racap, exp_ul_cs_mcs, exp_dl_cs_mcs);
 }
 
 testcase TC_force_two_phase_access() runs on RAW_PCU_Test_CT {
@@ -1266,7 +1265,7 @@
 	var CodingScheme exp_ul_cs_mcs := f_rlcmac_block_int2cs_mcs(g_mcs_initial_ul, false);
 	var CodingScheme exp_dl_cs_mcs := CS_2;
 
-	f_TC_mo_ping_pong_2phase_access(ms_racap, exp_ul_cs_mcs, exp_dl_cs_mcs);
+	f_TC_mo_ping_pong_2phase_access(c_PCUIF_Flags_noMCS, ms_racap, exp_ul_cs_mcs, exp_dl_cs_mcs);
 }
 
 /* Test scenario where SGSN wants to send some data against MS and it is
@@ -1288,7 +1287,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -1362,7 +1361,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -1484,7 +1483,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	f_statsd_reset();
 
@@ -1571,7 +1570,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -1657,7 +1656,7 @@
 
 /* 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 PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 	var octetstring data := f_rnd_octstring(10);
 	var PacketDlAssign dl_tbf_ass;
 	var RlcmacDlBlock dl_block;
@@ -1713,7 +1712,7 @@
 }
 
 testcase TC_dl_multislot_tbf_ms_class_from_2phase() runs on RAW_PCU_Test_CT {
-	var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default);
+	var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 	var RlcmacDlBlock dl_block;
 	var octetstring data := f_rnd_octstring(10);
 	var PollFnCtx pollctx;
@@ -1917,7 +1916,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -1958,7 +1957,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -2062,7 +2061,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	f_statsd_reset();
 
@@ -2123,7 +2122,7 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Initialize the PCU interface abstraction */
-	f_init_raw(testcasename());
+	f_init_raw(testcasename(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 
 	/* Establish BSSGP connection to the PCU */
 	f_bssgp_establish();
@@ -2478,7 +2477,7 @@
 
 /* Make sure that Immediate (UL TBF) Assignment contains hopping parameters */
 testcase TC_pcuif_fh_imm_ass_ul() runs on RAW_PCU_Test_CT {
-	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
+	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS);
 	var GprsMS ms := valueof(t_GprsMS_def);
 
 	/* Enable frequency hopping on TRX0/TS7 */
@@ -2496,7 +2495,7 @@
 
 /* Make sure that Immediate (DL TBF) Assignment contains hopping parameters */
 testcase TC_pcuif_fh_imm_ass_dl() runs on RAW_PCU_Test_CT {
-	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
+	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS)
 	var GprsMS ms := valueof(t_GprsMS_def);
 
 	/* Enable frequency hopping on TRX0/TS7 */
@@ -2557,7 +2556,7 @@
 
 /* Make sure that Packet Uplink Assignment contains hopping parameters */
 testcase TC_pcuif_fh_pkt_ass_ul() runs on RAW_PCU_Test_CT {
-	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
+	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS);
 	var GprsMS ms := valueof(t_GprsMS_def);
 	var uint32_t poll_fn;
 
@@ -2597,7 +2596,7 @@
 
 /* Make sure that Packet Downlink Assignment contains hopping parameters */
 testcase TC_pcuif_fh_pkt_ass_dl() runs on RAW_PCU_Test_CT {
-	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
+	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS);
 	var octetstring data := f_rnd_octstring(10);
 	var GprsMS ms := valueof(t_GprsMS_def);
 	var RlcmacDlBlock dl_block;
@@ -2671,7 +2670,7 @@
 	/* Initialize GPRS MS side */
 	f_init_gprs_ms(num_ms);
 
-	info_ind := valueof(ts_PCUIF_INFO_default);
+	info_ind := valueof(ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 	/* Only the 3 first TRX are enabled. The enabled ones all have same
 	   amount of resources, hence same amount of initial resources. */
 	for (i := 0; i < lengthof(info_ind.trx.v10); i := i + 1) {

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


More information about the gerrit-log mailing list