pcu: Verify CodingScheme of received data blocks
Change-Id: I0a5247650548f8a03f7b025aae65652fb424c156
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index ad89c69..2564617 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -419,12 +419,19 @@
}
}
-private function f_rx_rlcmac_dl_block(out RlcmacDlBlock dl_block, out uint32_t dl_fn)
+private function f_rx_rlcmac_dl_block(out RlcmacDlBlock dl_block, out uint32_t dl_fn, template (present) CodingScheme exp_cs_mcs := ?)
runs on RAW_PCU_Test_CT {
var PCUIF_Message pcu_msg;
f_pcuif_rx_data_req(pcu_msg);
dl_block := dec_RlcmacDlBlock(pcu_msg.u.data_req.data);
dl_fn := pcu_msg.u.data_req.fn;
+
+ var integer len := lengthof(pcu_msg.u.data_req.data);
+ var CodingScheme cs_mcs := f_rlcmac_block_len2cs_mcs(len)
+ if (not match(f_rlcmac_block_len2cs_mcs(len), exp_cs_mcs)) {
+ setverdict(fail, "Failed to match Coding Scheme exp ", exp_cs_mcs, " vs ", cs_mcs, " (", len, ")");
+ mtc.stop;
+ }
}
private function f_rx_rlcmac_dl_block_exp_ack_nack(out RlcmacDlBlock dl_block, out uint32_t poll_fn)
@@ -475,7 +482,7 @@
}
}
-private function f_rx_rlcmac_dl_block_exp_data(out RlcmacDlBlock dl_block, out uint32_t ack_fn, octetstring data, template (present) uint7_t exp_bsn := ?)
+private function f_rx_rlcmac_dl_block_exp_data(out RlcmacDlBlock dl_block, out uint32_t ack_fn, octetstring data, template (present) uint7_t exp_bsn := ?, template (present) CodingScheme exp_cs := ?)
runs on RAW_PCU_Test_CT {
var PCUIF_Message pcu_msg;
var uint32_t dl_fn;
@@ -1202,7 +1209,7 @@
/* Test scenario where SGSN wants to send some data against MS and it is
* answered by the MS on PDCH, so TBFs for downlink and later for uplink are created.
*/
-private function f_TC_mt_ping_pong(template (omit) MSRadioAccessCapabilityV_BSSGP ms_racap := omit) runs on RAW_PCU_Test_CT {
+private function f_TC_mt_ping_pong(template (omit) MSRadioAccessCapabilityV_BSSGP ms_racap := omit, template (present) CodingScheme exp_cs_mcs := ?) runs on RAW_PCU_Test_CT {
var GsmRrMessage rr_imm_ass;
var PacketUlAssign ul_tbf_ass;
var PacketDlAssign dl_tbf_ass;
@@ -1236,7 +1243,7 @@
/* 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);
+ f_rx_rlcmac_dl_block_exp_data(dl_block, sched_fn, data, 0, exp_cs_mcs);
/* ACK the DL block */
f_acknackdesc_ack_block(ack_nack_desc, dl_block.data.mac_hdr.hdr_ext.bsn, '1'B);
@@ -1265,7 +1272,8 @@
}
testcase TC_mt_ping_pong() runs on RAW_PCU_Test_CT {
- f_TC_mt_ping_pong(omit);
+ var CodingScheme exp_cs_mcs := CS_1;
+ f_TC_mt_ping_pong(omit, exp_cs_mcs);
}
/* TC_mt_ping_pong, but DL-UNITDATA contains RA Access capability with (M)CS
@@ -1276,7 +1284,8 @@
gprsextendeddynalloccap := '0'B
} ;
var MSRadioAccessCapabilityV_BSSGP ms_racap := { valueof(ts_RaCapRec_BSSGP('0001'B /* E-GSM */, mscap_gprs, omit)) };
- f_TC_mt_ping_pong(ms_racap);
+ var CodingScheme exp_cs_mcs := CS_2;
+ f_TC_mt_ping_pong(ms_racap, exp_cs_mcs);
}
/* Verify that if PCU doesn't get an ACK for first DL block after IMM ASS, it