pcu: TC_paging_cs_from_sgsn_*: Fix race condition between BSSGP tx and RLCMAC rx

It can happen that the RLCMAC req arrives at osmo-pcu before the
CS_PAGING we send to it over BSSGP, in which case osmo-pcu will schedule
an RLCMAC DL Dummy Block. Take into account this scenario to avoid
failing id it occurs.

Change-Id: I30da93835c7738aefcd84691d83f39759dd4b599
This commit is contained in:
Pau Espin 2022-11-29 16:03:13 +01:00
parent 3f2b5e41ea
commit 00fec58871
1 changed files with 10 additions and 2 deletions

View File

@ -3627,8 +3627,16 @@ runs on RAW_PCU_Test_CT {
BSSGP[0].send(ts_BSSGP_CS_PAGING_IMSI(bvci, imsi));
}
/* Receive it on BTS side towards MS */
f_rx_rlcmac_dl_block_exp_pkt_pag_req(dl_block);
/* Now receive it on BTS side towards MS.
* Skip any dummy blocks in case the PCUIF req arrives before the BSSP CS_PAGING:
*/
f_rx_rlcmac_dl_block_skip_dummy(dl_block, max_dummy := 10);
if (not match(dl_block, tr_RLCMAC_PACKET_PAG_REQ())) {
setverdict(fail, "Failed to match Packet Paging Request: ",
dl_block, " vs ", tr_RLCMAC_PACKET_PAG_REQ());
f_shutdown(__BFILE__, __LINE__);
}
/* Make sure that Packet Paging Request contains the same P-TMSI/IMSI */
var PacketPagingReq req := dl_block.ctrl.payload.u.paging;