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.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20967 ) Change subject: pcu: Introduce test TC_dl_multislot_tbf_ms_class_from_2phase ...................................................................... pcu: Introduce test TC_dl_multislot_tbf_ms_class_from_2phase Change-Id: Ie0035bab79c286a968394d7b724d975f43d187ce --- M pcu/GPRS_Components.ttcn M pcu/PCU_Tests.ttcn 2 files changed, 101 insertions(+), 24 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/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn index f2b0efb..f9697a1 100644 --- a/pcu/GPRS_Components.ttcn +++ b/pcu/GPRS_Components.ttcn @@ -41,6 +41,12 @@ uint8_t blk_nr }; +/* Useful to store poll FN + BTS+TRX+TS requested by network */ +type record PollFnCtx { + TsTrxBtsNum tstrxbts, + uint32_t fn +}; + template (value) TsTrxBtsNum ts_TsTrxBtsNum(uint3_t ts_nr := 7, uint3_t trx_nr := 0, uint8_t bts_nr := 0, diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 44213a7..bb17190 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -267,6 +267,47 @@ } } +private function f_ms_establish_ul_tbf_2phase_access(inout GprsMS ms, + template (omit) RlcmacUlCtrlMsg pkt_res_req := omit) +runs on RAW_PCU_Test_CT return PollFnCtx { + var PollFnCtx pollctx; + + /* Single block (two phase) packet access */ + var uint16_t ra := bit2int(chan_req_sb); + if (g_force_two_phase_access) { + /* If 2phase access is enforced by the network, then let's + * request a One phase packet access, we'll receive a single block + * anyway + */ + ra := bit2int(chan_req_def); + } + + /* Establish an Uplink TBF */ + f_ms_use_ra(ms, ra, ra_is_11bit := 0); + f_ms_establish_ul_tbf(ms); + + /* Make sure we've got an Uplink TBF assignment */ + if (not match(ms.ul_tbf.ass.ccch, tr_PacketUlSglAssign)) { + setverdict(fail, "Wrong Packet Uplink Assignment received: ", ms.ul_tbf.ass.ccch, " vs exp: ", tr_PacketUlSglAssign); + f_shutdown(__BFILE__, __LINE__); + } + + /* Send PACKET RESOURCE REQUEST + * (see 3GPP TS 04.60 "7.1.3.1 Initiation of the Packet resource request procedure") + */ + if (istemplatekind(pkt_res_req, "omit")) { + pkt_res_req := ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, omit); + } + + f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(pkt_res_req), 0, nr := f_ms_tx_TsTrxBtsNum(ms)); + /* Store 1st UlTBF context before receiving next one, will will + * overwrite the TS allocation on MS with info from new UL TBF: + */ + pollctx.tstrxbts := f_ms_tx_TsTrxBtsNum(ms); + f_ms_rx_pkt_ass_pacch(ms, pollctx.fn, tr_RLCMAC_UL_PACKET_ASS, nr := f_ms_tx_TsTrxBtsNum(ms)); + return pollctx; +} + testcase TC_pcuif_suspend() runs on RAW_PCU_Test_CT { var octetstring ra_id := enc_RoutingAreaIdentification(mp_gb_cfg.bvc[0].cell_id.ra_id); var GprsTlli tlli := 'FFFFFFFF'O; @@ -1156,20 +1197,12 @@ runs on RAW_PCU_Test_CT { var RlcmacDlBlock dl_block; var octetstring data := f_rnd_octstring(10); + var PollFnCtx pollctx; var uint32_t sched_fn; var uint32_t dl_fn; var uint32_t unused_fn; var GprsMS ms; - /* Single block (two phase) packet access */ - var uint16_t ra := bit2int(chan_req_sb); - if (g_force_two_phase_access) { - /* If 2phase access is enforced by the network, then let's - request a One phase packet access, we'll receive a single block - anyway */ - ra := bit2int(chan_req_def); - } - /* Initialize NS/BSSGP side */ f_init_bssgp(); /* Initialize GPRS MS side */ @@ -1183,21 +1216,9 @@ f_bssgp_establish(); f_bssgp_client_llgmm_assign('FFFFFFFF'O, ms.tlli); - /* Establish an Uplink TBF */ - f_ms_use_ra(ms, ra, ra_is_11bit := 0); - f_ms_establish_ul_tbf(ms); + /* Send PACKET RESOURCE REQUEST to upgrade to EGPRS */ + pollctx := f_ms_establish_ul_tbf_2phase_access(ms, ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, ms_racap)); - /* Make sure we've got an Uplink TBF assignment */ - if (not match(ms.ul_tbf.ass.ccch, tr_PacketUlSglAssign)) { - setverdict(fail, "Wrong Packet Uplink Assignment received: ", ms.ul_tbf.ass.ccch, " vs exp: ", tr_PacketUlSglAssign); - f_shutdown(__BFILE__, __LINE__); - } - - /* Send PACKET RESOURCE REQUEST to upgrade to EGPRS - * (see 3GPP TS 04.60 "7.1.3.1 Initiation of the Packet resource request procedure") - */ - f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, ms_racap)), 0); - f_ms_rx_pkt_ass_pacch(ms, sched_fn, tr_RLCMAC_UL_PACKET_ASS); if (not match(ms.ul_tbf.tx_cs_mcs, exp_ul_cs_mcs)) { setverdict(fail, "Wrong CS_MCS ", ms.ul_tbf.tx_cs_mcs, " received vs exp ", exp_ul_cs_mcs); f_shutdown(__BFILE__, __LINE__); @@ -1208,7 +1229,7 @@ f_ms_tx_ul_data_block_multi(ms, 1, with_tlli := true); /* TODO: send using cs_mcs */ /* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */ - f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), sched_fn); + f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), pollctx.fn, nr := pollctx.tstrxbts); /* UL block should be received in SGSN */ BSSGP[0].receive(tr_BSSGP_UL_UD(ms.tlli, mp_gb_cfg.bvc[0].cell_id)); @@ -1720,6 +1741,55 @@ f_shutdown(__BFILE__, __LINE__, final := true); } +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 RlcmacDlBlock dl_block; + var octetstring data := f_rnd_octstring(10); + var PollFnCtx pollctx; + var uint32_t sched_fn; + var GprsMS ms; + + var MultislotCap_GPRS mscap_gprs := { + gprsmultislotclass := '10010'B, /* MS class 18, supports 8 DL and 8 UL */ + gprsextendeddynalloccap := '0'B + }; + var MSRadioAccessCapabilityV ms_racap := { valueof(ts_RaCapRec('0001'B /* E-GSM */, mscap_gprs, omit)) }; + + + /* 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); + + /* Send PACKET RESOURCE REQUEST to notify the MultiSlot Class */ + pollctx := f_ms_establish_ul_tbf_2phase_access(ms, ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, ms_racap)); + + /* Pkt Uplink Assignment above sets poll+rrbp requesting PACKET CONTROL ACK */ + f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), pollctx.fn, nr := pollctx.tstrxbts); + + BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data)); + 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 slot 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. @@ -2807,6 +2877,7 @@ execute( TC_pcuif_fh_pkt_ass_dl() ); execute( TC_multitrx_multims_alloc() ); execute( TC_dl_multislot_tbf_ms_class_from_sgsn() ); + execute( TC_dl_multislot_tbf_ms_class_from_2phase() ); } execute( TC_pcuif_info_ind_subsequent() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20967 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: Ie0035bab79c286a968394d7b724d975f43d187ce Gerrit-Change-Number: 20967 Gerrit-PatchSet: 5 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/e755fd1e/attachment.htm>