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
This commit is contained in:
Pau Espin 2020-10-30 15:31:07 +01:00
parent a9f27fa4f6
commit 745a48bce3
2 changed files with 63 additions and 39 deletions

View File

@ -749,6 +749,32 @@ const PCUIF_Flags c_PCUIF_Flags_default := {
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,

View File

@ -67,9 +67,10 @@ modulepar {
/* 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 @@ type component RAW_PCU_Test_CT extends bssgp_CT, MS_BTS_IFACE_CT, StatsD_ConnHdl
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 @@ private function f_pcuvty_set_link_quality_ranges() runs on RAW_PCU_Test_CT {
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 @@ runs on RAW_PCU_Test_CT {
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 @@ testcase TC_ta_rach_imm_ass() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_cs_lqual_ul_tbf() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_cs_initial_ul() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_cs_max_ul() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_t3169() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_countdown_procedure() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_ul_all_sizes() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_ul_data_toolong_fills_padding() runs on RAW_PCU_Test_CT {
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 @@ private function f_TC_mo_ping_pong_1phase_access(template (present) CodingScheme
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 @@ testcase TC_mo_ping_pong() runs on RAW_PCU_Test_CT {
/* 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 @@ runs on RAW_PCU_Test_CT {
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 @@ testcase TC_mo_ping_pong_with_ul_racap() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_mo_ping_pong_with_ul_racap_egprs_only() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_force_two_phase_access() runs on RAW_PCU_Test_CT {
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 @@ runs on RAW_PCU_Test_CT {
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 @@ testcase TC_ul_intermediate_retrans() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_dl_flow_more_blocks() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_ul_flow_multiple_llc_blocks() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_ul_flow_multiple_llc_blocks() runs on RAW_PCU_Test_CT {
/* 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_sgsn() runs on RAW_PCU_Test_CT {
}
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 @@ testcase TC_paging_cs_from_bts() runs on RAW_PCU_Test_CT {
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 @@ runs on RAW_PCU_Test_CT {
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 @@ testcase TC_bssgp_dl_unitdata_with_valid_imsi() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_bssgp_dl_unitdata_with_invalid_imsi() runs on RAW_PCU_Test_CT {
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 @@ testcase TC_pcuif_fh_imm_ass_ul_egprs() runs on RAW_PCU_Test_CT {
/* 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 @@ testcase TC_pcuif_fh_imm_ass_ul() runs on RAW_PCU_Test_CT {
/* 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 @@ private function f_TC_pcuif_fh_check_pkt_ass(in PCUIF_info_ind info_ind,
/* 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 @@ testcase TC_pcuif_fh_pkt_ass_ul() runs on RAW_PCU_Test_CT {
/* 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 @@ testcase TC_multitrx_multims_alloc() runs on RAW_PCU_Test_CT {
/* 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));