pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18234 )


Change subject: pcu: Properly pass tlli in f_tx_rlcmac_ul_n_blocks()
......................................................................

pcu: Properly pass tlli in f_tx_rlcmac_ul_n_blocks()

Change-Id: Idb8febbbff732f02d05b0043c75e2a0729e01d4f
---
M pcu/PCU_Tests.ttcn
1 file changed, 14 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/34/18234/1

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index a232a7f..efb7d94 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -503,7 +503,7 @@
        f_pcuif_tx_data_ind(data, lqual_cb, fn);
 }

-private function f_tx_rlcmac_ul_n_blocks(PacketUlAssign ul_tbf_ass, integer 
num_blocks := 1)
+private function f_tx_rlcmac_ul_n_blocks(PacketUlAssign ul_tbf_ass, integer 
num_blocks := 1, template (omit) GprsTlli tlli := omit)
 runs on RAW_PCU_Test_CT {
        var template (value) RlcmacUlBlock ul_data := t_RLCMAC_UL_DATA(
                tfi := ul_tbf_ass.dynamic.tfi_assignment,
@@ -511,8 +511,10 @@
                bsn := 0, /* TODO: what should be here? */
                blocks := { /* To be generated in loop */ });

-       /* HACK: patch missing TLLI; otherwise OsmoPCU rejects DATA.req */
-       ul_data.data.tlli := '00000001'O;
+       if (not istemplatekind(tlli, "omit")) {
+               ul_data.data.mac_hdr.tlli_ind := true;
+               ul_data.data.tlli := tlli;
+       }

        for (var integer i := 0; i < num_blocks; i := i + 1) {
                /* Prepare a new UL block (CV, random payload) */
@@ -1295,8 +1297,9 @@
        /* Make sure we've got an Uplink TBF assignment */
        f_imm_ass_verify_ul_tbf_ass(rr_imm_ass, ul_tbf_ass);

-       /* Send one UL block and make sure it is ACKED fine */
-       f_tx_rlcmac_ul_n_blocks(ul_tbf_ass, 1);
+       /* Send one UL block (with TLLI since we are in One-Phase Access
+          contention resoultion) and make sure it is ACKED fine */
+       f_tx_rlcmac_ul_n_blocks(ul_tbf_ass, 1, tlli);
        f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, unused_fn);
        /* UL block should be received in SGSN */
        BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id));
@@ -1417,8 +1420,9 @@
                }
        }

-       /* Send one UL block and make sure it is ACKED fine */
-       f_tx_rlcmac_ul_n_blocks(ul_tbf_ass, 1);
+       /* Send one UL block (with TLLI since we are in One-Phase Access
+          contention resoultion) and make sure it is ACKED fine */
+       f_tx_rlcmac_ul_n_blocks(ul_tbf_ass, 1, tlli);
        f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn);
        /* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */
        f_tx_rlcmac_ul_block(ts_RLCMAC_CTRL_ACK(tlli), 0, sched_fn);
@@ -1517,8 +1521,9 @@
        /* Make sure we've got an Uplink TBF assignment */
        f_imm_ass_verify_ul_tbf_ass(rr_imm_ass, ul_tbf_ass);

-       /* Send one UL block and make sure it is ACKED fine */
-       f_tx_rlcmac_ul_n_blocks(ul_tbf_ass, 1);
+       /* Send one UL block (with TLLI since we are in One-Phase Access
+          contention resoultion) and make sure it is ACKED fine */
+       f_tx_rlcmac_ul_n_blocks(ul_tbf_ass, 1, tlli);
        f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn);
        /* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */
        f_tx_rlcmac_ul_block(ts_RLCMAC_CTRL_ACK(tlli), 0, sched_fn);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18234
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: Idb8febbbff732f02d05b0043c75e2a0729e01d4f
Gerrit-Change-Number: 18234
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to