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/+/15664
Change subject: pcu: Introduce some function helpers
......................................................................
pcu: Introduce some function helpers
Change-Id: I8608fac4375153d5020df5d05026513a7fe931d6
---
M pcu/PCU_Tests_RAW.ttcn
1 file changed, 44 insertions(+), 18 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/64/15664/1
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 6b45af2..90404d8 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -552,6 +552,48 @@
return false;
}
+/* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */
+private function f_tx_pcuif_data_ind(octetstring data, int16_t lqual_cb := 0)
+runs on RAW_PCU_Test_CT {
+
+ BTS.send(ts_PCUIF_DATA_IND(bts_nr := 0, trx_nr := 0, ts_nr := 7, block_nr := 0,
+ sapi := PCU_IF_SAPI_PDTCH, data := data,
+ fn := 0, arfcn := 871, lqual_cb := lqual_cb));
+ BTS.receive(tr_RAW_PCU_EV(TDMA_EV_PDTCH_BLOCK_SENT));
+}
+
+private function f_tx_pcuif_rlcmac_ul_block(template (value) RlcmacUlBlock ul_data, int16_t lqual_cb := 0)
+runs on RAW_PCU_Test_CT {
+ var octetstring data;
+ /* Encode the payload of DATA.ind */
+ data := enc_RlcmacUlBlock(valueof(ul_data));
+ data := f_pad_oct(data, 23, '00'O); /* CS-1 */
+
+ /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */
+ f_tx_pcuif_data_ind(data, lqual_cb);
+}
+
+/* Enqueue RTS.req, expect DATA.req with UL ACK from the PCU */
+private function f_rx_pcuif_rlcmac_dl_block(out RlcmacDlBlock dl_block)
+runs on RAW_PCU_Test_CT {
+ var PCUIF_Message pcu_msg;
+ BTS.send(ts_PCUIF_RTS_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7,
+ sapi := PCU_IF_SAPI_PDTCH, fn := 0,
+ arfcn := 871, block_nr := 0));
+ BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7,
+ sapi := PCU_IF_SAPI_PDTCH)) -> value pcu_msg;
+ dl_block := dec_RlcmacDlBlock(pcu_msg.u.data_req.data);
+}
+
+private function f_rx_pcuif_rlcmac_dl_block_exp_ack_nack(out RlcmacDlBlock dl_block)
+runs on RAW_PCU_Test_CT {
+ f_rx_pcuif_rlcmac_dl_block(dl_block);
+ if (not match(dl_block, tr_RLCMAC_ACK_NACK(ul_tfi := ?, tlli := ?))) {
+ setverdict(fail, "Failed to match Packet Uplink ACK / NACK");
+ mtc.stop;
+ }
+}
+
testcase TC_pcuif_suspend() runs on RAW_PCU_Test_CT {
var octetstring ra_id := enc_RoutingAreaIdentification(mp_gb_cfg.cell_id.ra_id);
var GprsTlli tlli := 'FFFFFFFF'O;
@@ -661,31 +703,15 @@
ul_data.data.mac_hdr.countdown := (15 - i);
ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) };
- /* Encode the payload of DATA.ind */
- data := enc_RlcmacUlBlock(valueof(ul_data));
- data := f_pad_oct(data, 23, '00'O); /* CS-1 */
-
/* Link quality in dB and our CS1-4 expectations */
var integer lqual := i * 2;
/* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */
log("Sending DATA.ind with link quality (dB): ", lqual);
- BTS.send(ts_PCUIF_DATA_IND(bts_nr := 0, trx_nr := 0, ts_nr := 7, block_nr := 0,
- sapi := PCU_IF_SAPI_PDTCH, data := data,
- fn := 0, arfcn := 871, lqual_cb := lqual * 10));
- BTS.receive(tr_RAW_PCU_EV(TDMA_EV_PDTCH_BLOCK_SENT));
+ f_tx_pcuif_rlcmac_ul_block(ul_data, lqual * 10);
/* Enqueue RTS.req, expect DATA.req with UL ACK from the PCU */
- BTS.send(ts_PCUIF_RTS_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7,
- sapi := PCU_IF_SAPI_PDTCH, fn := 0,
- arfcn := 871, block_nr := 0));
- BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7,
- sapi := PCU_IF_SAPI_PDTCH)) -> value pcu_msg;
- dl_block := dec_RlcmacDlBlock(pcu_msg.u.data_req.data);
- if (not match(dl_block, tr_RLCMAC_ACK_NACK(ul_tfi := ?, tlli := ?))) {
- setverdict(fail, "Failed to match Packet Uplink ACK / NACK");
- mtc.stop;
- }
+ f_rx_pcuif_rlcmac_dl_block_exp_ack_nack(dl_block);
log("Rx Packet Uplink ACK / NACK with Channel Coding Command: ",
dl_block.ctrl.payload.u.ul_ack_nack.gprs.ch_coding_cmd);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15664
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: I8608fac4375153d5020df5d05026513a7fe931d6
Gerrit-Change-Number: 15664
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/20191003/1bbf0d53/attachment.htm>