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 uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16508 ) Change subject: pcu: Introduce test TC_t3193 ...................................................................... pcu: Introduce test TC_t3193 Change-Id: Ib11cd1793d985ff609b10b0e60bddadd5fcfa6d2 --- M library/RLCMAC_Types.ttcn M pcu/PCU_Tests_RAW.ttcn 2 files changed, 93 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/08/16508/1 diff --git a/library/RLCMAC_Types.ttcn b/library/RLCMAC_Types.ttcn index 3a1ecb1..7043785 100644 --- a/library/RLCMAC_Types.ttcn +++ b/library/RLCMAC_Types.ttcn @@ -361,6 +361,29 @@ } } + template RlcmacDlBlock tr_RLCMAC_DL_PACKET_ASS(template uint3_t usf := ?) := { + ctrl := { + mac_hdr := { + payload_type := (MAC_PT_RLCMAC_NO_OPT, MAC_PT_RLCMAC_OPT), + rrbp:= ?, + rrbp_valid := ?, + usf := usf + }, + opt := *, + payload := { + msg_type := PACKET_DL_ASSIGNMENT, + u := { + dl_assignment := { + page_mode := ?, + pres1 := ?, + persistence_levels := *, + tfi_or_tlli := ? + } + } + } + } + } + /* Receive Template for Uplink ACK/NACK */ template RlcmacDlBlock tr_RLCMAC_UL_ACK_NACK(template uint5_t ul_tfi, template GprsTlli tlli := ?) := { ctrl := { diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 452266b..1a8da3e 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -798,6 +798,19 @@ } } +private function f_rx_rlcmac_dl_block_exp_pkt_ass(out RlcmacDlBlock dl_block, out uint32_t poll_fn) +runs on RAW_PCU_Test_CT { + var uint32_t dl_fn; + + f_rx_rlcmac_dl_block(dl_block, dl_fn); + if (not match(dl_block, tr_RLCMAC_DL_PACKET_ASS())) { + setverdict(fail, "Failed to match Packet Downlink Assignment"); + mtc.stop; + } + + poll_fn := dl_fn + f_rrbp_fn_delay(dl_block.ctrl.mac_hdr.rrbp); +} + private function f_rx_rlcmac_dl_block_exp_data(out RlcmacDlBlock dl_block, out uint32_t ack_fn, octetstring data, uint7_t exp_bsn := 0) runs on RAW_PCU_Test_CT { var PCUIF_Message pcu_msg; @@ -1403,6 +1416,62 @@ f_rx_rlcmac_dl_block_exp_dummy(dl_block); } +/* Verify that a Downlink TBF can be assigned using PACCH shortly after the + * release of prev DL TBF due to MS staying in PDCH for a while (T3192, in PCU + * T3193) after DL TBF release */ +testcase TC_t3193() runs on RAW_PCU_Test_CT { + var GsmRrMessage rr_imm_ass; + var PacketDlAssign dl_tbf_ass; + var RlcmacDlBlock dl_block; + var octetstring data := f_rnd_octstring(10); + var boolean ok; + var uint32_t sched_fn; + var OCT4 tlli := '00000001'O; + var AckNackDescription ack_nack_desc; + + f_acknackdesc_init(ack_nack_desc); + + /* Initialize NS/BSSGP side */ + f_init_bssgp(); + + /* Initialize the PCU interface abstraction */ + f_init_raw(testcasename()); + + /* Establish BSSGP connection to the PCU */ + f_bssgp_establish(); + f_bssgp_client_llgmm_assign('FFFFFFFF'O, tlli); + + /* SGSN sends some DL data, PCU will page on CCCH (PCH) */ + BSSGP[0].send(ts_BSSGP_DL_UD(tlli, data)); + f_pcuif_rx_pch_imm_tbf_ass(rr_imm_ass); + ok := f_imm_ass_verify_dl_tbf_ass(rr_imm_ass, dl_tbf_ass); + if (not ok) { + setverdict(fail, "Immediate Assignment not a Downlink TBF"); + mtc.stop; + } + /* Wait timer X2002 and DL block is available after CCCH IMM ASS: */ + f_sleep(X2002); + f_rx_rlcmac_dl_block_exp_data(dl_block, sched_fn, data, 0); + + /* ACK the DL block */ + f_acknackdesc_ack_block(ack_nack_desc, dl_block.data.mac_hdr.hdr_ext.bsn, '1'B); + f_tx_rlcmac_ul_block(ts_RLCMAC_DL_ACK_NACK(dl_block.data.mac_hdr.hdr_ext.tfi, ack_nack_desc), 0, sched_fn); + /* we are done with the DL-TBF here so far, let's clean up our local state: */ + f_acknackdesc_init(ack_nack_desc); + + /* Now that final DL block is ACKED and TBF is released, T3193 in PCU + (T3192 in MS) was started and until it fires the MS will be abailable + on PDCH in case new data arrives from SGSN. Let's verify it: */ + BSSGP[0].send(ts_BSSGP_DL_UD(tlli, data)); + f_rx_rlcmac_dl_block_exp_pkt_ass(dl_block, sched_fn); + f_tx_rlcmac_ul_block(ts_RLCMAC_CTRL_ACK(tlli), 0, sched_fn); + + /* Now that we confirmed the new assignment in the dl-tbf, lets receive the data and ack it */ + f_rx_rlcmac_dl_block_exp_data(dl_block, sched_fn, data, 0); + f_acknackdesc_ack_block(ack_nack_desc, dl_block.data.mac_hdr.hdr_ext.bsn, '1'B); + f_tx_rlcmac_ul_block(ts_RLCMAC_DL_ACK_NACK(dl_block.data.mac_hdr.hdr_ext.tfi, ack_nack_desc), 0, sched_fn); +} + /* 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. */ @@ -1544,6 +1613,7 @@ execute( TC_cs_initial_ul() ); execute( TC_cs_max_ul() ); execute( TC_t3169() ); + execute( TC_t3193() ); execute( TC_mo_ping_pong() ); execute( TC_imm_ass_dl_block_retrans() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16508 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: Ib11cd1793d985ff609b10b0e60bddadd5fcfa6d2 Gerrit-Change-Number: 16508 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/20191205/9684f919/attachment.htm>