pcu: TC_mo_ping_pong: Check DL block is sent and ACK it
Function f_rx_rlcmac_dl_block_exp_data() still misses proper
verification of data. Apparently the received message has 2 blocks,
first with expected 10 bytes, but next one contains 18 bytes with 4
actual bytes and other bits are padding.
Last DL ACK/NACK sent is not yet working correctly. osmo-pcu seems to be
unable to match it against sent DL block (I think due to non-matching
FN), and instead drops it and schedules after timeout an IMM ASS to try
to send DL block again.
Change-Id: Icf66dd5c07690368722c586632c38fb7e770053c
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 4a6f54a..410dc31 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -46,6 +46,8 @@
modulepar {
charstring mp_pcu_sock_path := PCU_SOCK_DEFAULT;
+
+ float X2002 := 0.2; /* Timer -2002, IMM ASSIGN confirm delay */
}
type component RAW_NS_CT {
@@ -753,6 +755,19 @@
}
}
+private function f_rx_rlcmac_dl_block_exp_data(out RlcmacDlBlock dl_block, octetstring data)
+runs on RAW_PCU_Test_CT {
+ var template RlcmacDlBlock dl_template := tr_RLCMAC_DATA_RRBP;
+ dl_template.data.blocks := ?;
+ /* TODO: match data correctly: { valueof(t_RLCMAC_LLCBLOCK(data)) }; */
+
+ f_rx_rlcmac_dl_block(dl_block);
+ if (not match(dl_block, dl_template)) {
+ setverdict(fail, "Failed to match Packet data: ", dl_block, " vs ", dl_template);
+ 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;
@@ -1320,9 +1335,15 @@
var PacketDlAssign dl_tbf_ass;
var RlcmacDlBlock dl_block;
var PCUIF_Message pcu_msg;
- var octetstring data;
+ var octetstring data := f_rnd_octstring(10);
var boolean ok;
var OCT4 tlli := '00000001'O;
+ var AckNackDescription ack_nack_desc;
+
+ ack_nack_desc.final_ack := '0'B;
+ ack_nack_desc.starting_seq_nr := 0;
+ ack_nack_desc.receive_block_bitmap := '0000000000000000000000000000000000000000000000000000000000000000'B;
+
/* Initialize NS/BSSGP side */
f_init_bssgp();
@@ -1354,7 +1375,7 @@
BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id));
/* Now SGSN sends some DL data, PCU will page on CCCH (PCH) */
- BSSGP[0].send(ts_BSSGP_DL_UD(tlli, f_rnd_octstring(10)));
+ 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);
@@ -1363,7 +1384,12 @@
mtc.stop;
}
- /* TODO: ACK the assignment and the DL block somehow? */
+ /* Wait timer X2002 and DL block is available after CCCH IMM ASS: */
+ f_sleep(X2002);
+ f_rx_rlcmac_dl_block_exp_data(dl_block, data);
+
+ /* ACK the DL block */
+ f_tx_rlcmac_ul_block(ts_RLCMAC_DL_ACK_NACK(dl_block.data.mac_hdr.hdr_ext.tfi, ack_nack_desc));
}
control {