summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-11-30 19:34:16 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-11-30 20:09:55 +0100
commit2756019823fdcd8776ac91373fc35e25f1739f5a (patch)
tree0f3735d48758339284eb57987a8a886363653fb2
parent1b9aa78ee0de32e773e09868a782bb8ec0ee8257 (diff)
pcu: Verify LLC UI dummy frames are not appended at end of rlcmac DL blockpespin/pcu
-rw-r--r--pcu/GPRS_Components.ttcn14
-rw-r--r--pcu/PCU_Tests.ttcn81
2 files changed, 81 insertions, 14 deletions
diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index 0850a3d..16036ad 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -1001,13 +1001,6 @@ runs on MS_BTS_IFACE_CT {
f_shutdown(__BFILE__, __LINE__);
}
- /* Check next data blocks contain dummy frames */
- if (lengthof(data_block.blocks) > 1 and substr(data_block.blocks[1].payload, 0, 3) != '43C001'O) {
- setverdict(fail, "Second data payload is not a dummy frame: ",
- data_block.blocks[1].payload);
- f_shutdown(__BFILE__, __LINE__);
- }
-
if (not match(data_block.cs, exp_cs)) {
setverdict(fail, "Failed to match ", data_block.cs, " vs exp ", exp_cs);
f_shutdown(__BFILE__, __LINE__);
@@ -1036,13 +1029,6 @@ runs on MS_BTS_IFACE_CT {
f_shutdown(__BFILE__, __LINE__);
}
- /* Check next data blocks contain dummy frames */
- if (lengthof(data_block.blocks) > 1 and substr(data_block.blocks[1].payload, 0, 3) != '43C001'O) {
- setverdict(fail, "Second data payload is not a dummy frame: ",
- data_block.blocks[1].payload);
- f_shutdown(__BFILE__, __LINE__);
- }
-
if (not match(data_block.mcs, exp_cs)) {
setverdict(fail, "Failed to match ", data_block.mcs, " vs exp ", exp_cs);
f_shutdown(__BFILE__, __LINE__);
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 67a811d..d187011 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -2546,6 +2546,85 @@ testcase TC_bssgp_dl_unitdata_with_invalid_imsi() runs on RAW_PCU_Test_CT {
f_shutdown(__BFILE__, __LINE__, final := true);
}
+private function f_tc_dl_data_no_llc_ui_dummy(template (omit) MSRadioAccessCapabilityV_BSSGP ms_racap := omit) runs on RAW_PCU_Test_CT {
+ var AckNackDescription ack_nack_desc := valueof(t_AckNackDescription_init);
+ var octetstring data := f_rnd_octstring(6);
+ var RlcmacDlBlock dl_block;
+ var GprsMS ms;
+ var uint32_t fn;
+
+ /* 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(TLLI_UNUSED, ms.tlli);
+
+ /* SGSN sends some DL data, PCU will page on CCCH (PCH) */
+ BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data, ms_racap));
+ f_ms_exp_dl_tbf_ass_ccch(ms, PCU_IF_SAPI_PCH);
+
+ /* Wait timer X2002 and DL block is available after CCCH IMM ASS */
+ f_sleep(X2002);
+
+ /* Expect the first (GPRS DL) block with bsn=0 and rrbp_valid=1 */
+ f_rx_rlcmac_dl_block_exp_data(dl_block, fn, data, 0);
+
+ if (ischosen(dl_block.data_egprs)) {
+ if (lengthof(dl_block.data_egprs.blocks) != 2) {
+ setverdict(fail, "DL EGPRS block has unexpected number of LLC frames: ", dl_block.data_egprs);
+ f_shutdown(__BFILE__, __LINE__);
+ }
+ if (dl_block.data_egprs.blocks[1].hdr.length_ind != 127) {
+ setverdict(fail, "DL EGPRS block 2nd llc frame is not padding!: ", dl_block.data_egprs);
+ f_shutdown(__BFILE__, __LINE__);
+ }
+ if (dl_block.data_egprs.blocks[1].hdr.length_ind != 127) {
+ setverdict(fail, "DL EGPRS block 2nd llc frame is not padding!: ", dl_block.data_egprs);
+ f_shutdown(__BFILE__, __LINE__);
+ }
+ if (not match(dl_block.data_egprs.blocks[1].payload,
+ f_pad_oct(''O, lengthof(dl_block.data_egprs.blocks[1].payload), '2B'O))) {
+ setverdict(fail, "DL EGPRS block 2nd llc frame is not padding!: ", dl_block.data_egprs);
+ f_shutdown(__BFILE__, __LINE__);
+ }
+ } else if (lengthof(dl_block.data.blocks) > 1) {
+ setverdict(fail, "DL GPRS block has extra unexpected LLC frames: ", dl_block.data);
+ f_shutdown(__BFILE__, __LINE__);
+ }
+
+ f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
+/* Verify osmo-pcu Doesn't append LLC UI dummy frames to rclamc blocks
+ * containing llc data. See OS#4849 */
+testcase TC_dl_gprs_data_no_llc_ui_dummy() runs on RAW_PCU_Test_CT {
+ f_tc_dl_data_no_llc_ui_dummy(omit);
+}
+
+/* Verify osmo-pcu Doesn't append LLC UI dummy frames to rclamc blocks
+ * containing llc data. See OS#4849 */
+testcase TC_dl_egprs_data_no_llc_ui_dummy() runs on RAW_PCU_Test_CT {
+
+ var MultislotCap_GPRS_BSSGP mscap_gprs := {
+ gprsmultislotclass := '00011'B,
+ gprsextendeddynalloccap := '0'B
+ };
+ var MultislotCap_EGPRS_BSSGP mscap_egprs := {
+ egprsmultislotclass := '00011'B,
+ egprsextendeddynalloccap := '0'B
+ };
+ var MSRadioAccessCapabilityV_BSSGP ms_racap := { valueof(ts_RaCapRec_BSSGP('0001'B /* E-GSM */, mscap_gprs, mscap_egprs)) };
+
+ f_tc_dl_data_no_llc_ui_dummy(ms_racap);
+}
+
private function f_TC_egprs_pkt_chan_req(in EGPRSPktChRequest req,
template GsmRrMessage t_imm_ass := ?,
PCUIF_BurstType bt := BURST_TYPE_1)
@@ -3459,6 +3538,8 @@ control {
execute( TC_paging_cs_multi_ms_tmsi() );
execute( TC_bssgp_dl_unitdata_with_valid_imsi() );
execute( TC_bssgp_dl_unitdata_with_invalid_imsi() );
+ execute( TC_dl_gprs_data_no_llc_ui_dummy() );
+ execute( TC_dl_egprs_data_no_llc_ui_dummy() );
/* EGPRS specific test cases */
execute( TC_egprs_pkt_chan_req_signalling() );