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

laforge gerrit-no-reply at lists.osmocom.org
Mon Nov 9 10:48:09 UTC 2020


laforge has submitted this change. ( 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(+), 39 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index a7a32ab..d6e0867 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 3421c73..d114875 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
@@ -346,7 +347,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. */
@@ -626,7 +627,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();
@@ -713,7 +714,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;
@@ -788,7 +789,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;
@@ -834,7 +835,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;
 
@@ -933,7 +934,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();
@@ -982,7 +983,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();
@@ -1112,7 +1113,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();
@@ -1145,7 +1146,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();
@@ -1191,7 +1192,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 {
@@ -1210,7 +1212,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();
@@ -1263,13 +1265,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
@@ -1282,7 +1281,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 {
@@ -1297,7 +1296,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
@@ -1319,7 +1318,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();
@@ -1393,7 +1392,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();
@@ -1515,7 +1514,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();
 
@@ -1602,7 +1601,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();
@@ -1688,7 +1687,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;
@@ -1742,7 +1741,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;
@@ -1919,7 +1918,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();
@@ -1963,7 +1962,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();
@@ -2072,7 +2071,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();
 
@@ -2133,7 +2132,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();
@@ -2479,7 +2478,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 */
@@ -2497,7 +2496,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 */
@@ -2558,7 +2557,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;
 
@@ -2598,7 +2597,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;
@@ -2672,8 +2671,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. */
 	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (3 .. 7));

-- 
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: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201109/4a88d7d0/attachment.htm>


More information about the gerrit-log mailing list