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/+/19077 ) Change subject: pcu: Introduce test TC_ull_all_sizes ...................................................................... pcu: Introduce test TC_ull_all_sizes Change-Id: I293c8dea2d44c5232a96c44b605e0d8c6dc1fa0e --- M pcu/PCU_Tests.ttcn 1 file changed, 91 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index ef689e2..76a2d9e 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -876,6 +876,96 @@ BSSGP[0].receive(tr_BSSGP_UL_UD(ms.tlli, mp_gb_cfg.cell_id, total_payload)); } +/* Verify PCU handles correctly CS1..4 with all possible LLC payload sizes fitting alone in one RLC block */ +testcase TC_ul_all_sizes() runs on RAW_PCU_Test_CT { + var RlcmacDlBlock dl_block; + var uint32_t dl_fn, sched_fn; + var octetstring payload; + var template (value) RlcmacUlBlock ul_data; + var GprsMS ms; + + /* 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 */ + + /* 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, ms.tlli); + + /* Establish an Uplink TBF */ + f_ms_establish_ul_tbf(ms); + + /* Send one UL block (with TLLI since we are in One-Phase Access + contention resoultion) and make sure it is ACKED fine. */ + payload := f_rnd_octstring(16); /* 16 bytes fills the llc block (because TLLI takes 4 bytes) */ + /* Set CV = 15 to signal there's still more than BS_CV_MAX blocks to be sent */ + ul_data := t_RLCMAC_UL_DATA_TLLI(tfi := ms.ul_tbf.tfi, + cv := 15, + bsn := ms.ul_tbf.bsn, + blocks := { t_RLCMAC_LLCBLOCK(payload, + t_RLCMAC_LLCBLOCK_HDR(length_ind := lengthof(payload), more := false, e := true)) + }, + tlli := ms.tlli); + f_ultbf_inc_bsn(ms.ul_tbf); + f_ms_tx_ul_block(ms, ul_data); + + /* ACK and check it was received fine */ + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn); + /* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */ + f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), sched_fn); + /* receive one message on BSSGP with all aggregated data in payload: */ + BSSGP[0].receive(tr_BSSGP_UL_UD(ms.tlli, mp_gb_cfg.cell_id, payload)); + + /* Test sending LLC PDUS of incrementing size */ + var integer max_size := 49; + for (var integer i := 1; i <= max_size; i := i + 1) { + var integer cv; + /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */ + log("Sending DATA.ind with LLC payload size ", i); + if (i < max_size - g_bs_cv_max) { + cv := 15; + } else { + cv := max_size - i; + } + + payload := f_rnd_octstring(i); + /* Set CV = 15 to signal there's still more than BS_CV_MAX blocks to be sent */ + ul_data := t_RLCMAC_UL_DATA(tfi := ms.ul_tbf.tfi, + cv := cv, + bsn := ms.ul_tbf.bsn, + blocks := { t_RLCMAC_LLCBLOCK(payload, + t_RLCMAC_LLCBLOCK_HDR(length_ind := lengthof(payload), more := false, e := true)) + }); + f_ultbf_inc_bsn(ms.ul_tbf); + f_ms_tx_ul_block(ms, ul_data); + + /* receive one message on BSSGP with all aggregated data in payload: */ + BSSGP[0].receive(tr_BSSGP_UL_UD(ms.tlli, mp_gb_cfg.cell_id, payload)); + + /* we will receive UL ACK/NACK from time to time, handle it. */ + f_rx_rlcmac_dl_block(dl_block, dl_fn); + if (match(dl_block, tr_RLCMAC_DUMMY_CTRL())) { + continue; + } + if (not match(dl_block, tr_RLCMAC_UL_ACK_NACK_GPRS(ul_tfi := ?)) and + not match(dl_block, tr_RLCMAC_UL_ACK_NACK_EGPRS(ul_tfi := ?))) { + setverdict(fail, "Failed to match Packet Uplink ACK / NACK:", dl_block); + f_shutdown(__BFILE__, __LINE__); + } + + log("Rx Packet Uplink ACK / NACK"); + sched_fn := f_rrbp_ack_fn(dl_fn, dl_block.ctrl.mac_hdr.rrbp); + /* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */ + f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), sched_fn); + } + setverdict(pass); +} + /* 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. */ @@ -1862,6 +1952,7 @@ execute( TC_t3169() ); execute( TC_t3193() ); execute( TC_countdown_procedure() ); + execute( TC_ul_all_sizes() ); execute( TC_mo_ping_pong() ); execute( TC_mo_ping_pong_with_ul_racap() ); execute( TC_force_two_phase_access() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19077 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: I293c8dea2d44c5232a96c44b605e0d8c6dc1fa0e Gerrit-Change-Number: 19077 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de> 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/20200706/ba118eee/attachment.htm>