pcu: Introduce test TC_countdown_procedure

Change-Id: I2b92bf4a17e89b1d68869aac4243c0e106ce3be5
This commit is contained in:
Pau Espin 2020-05-14 19:22:33 +02:00
parent 4cbb96079b
commit 487d634726
1 changed files with 60 additions and 0 deletions

View File

@ -1433,6 +1433,65 @@ testcase TC_t3193() runs on RAW_PCU_Test_CT {
f_shutdown(__BFILE__, __LINE__, final := true);
}
/* Verify PCU handles correctly Countdown Procedure based on BS_CV_MAX */
testcase TC_countdown_procedure() runs on RAW_PCU_Test_CT {
var GsmRrMessage rr_imm_ass;
var PacketUlAssign ul_tbf_ass;
var RlcmacDlBlock dl_block;
var boolean ok;
var uint32_t sched_fn;
var OCT4 tlli := '00000001'O;
var uint14_t bsn := 1;
var PDU_BSSGP bssgp_pdu;
var octetstring total_payload;
var integer padding_len;
/* Initialize NS/BSSGP side */
f_init_bssgp();
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
/* Establish BSSGP connection to the PCU */
f_bssgp_establish();
f_bssgp_client_llgmm_assign('FFFFFFFF'O, tlli);
/* Establish an Uplink TBF */
ok := f_establish_tbf(rr_imm_ass);
if (not ok) {
setverdict(fail, "Failed to establish TBF");
f_shutdown(__BFILE__, __LINE__);
}
/* Make sure we've got an Uplink TBF assignment */
f_imm_ass_verify_ul_tbf_ass(rr_imm_ass, ul_tbf_ass);
/* Send one UL block (with TLLI since we are in One-Phase Access
contention resoultion) and make sure it is ACKED fine. */
total_payload := f_rnd_octstring(16); /* 16 bytes fills the llc block (because TLLI takes 4 bytes) */
var template (value) RlcmacUlBlock ul_data := t_RLCMAC_UL_DATA_TLLI(
tfi := ul_tbf_ass.dynamic.tfi_assignment,
cv := 15, /* Set CV = 15 to signal there's still more than BS_CV_MAX blocks to be sent */
bsn := 0,
blocks := { valueof(t_RLCMAC_LLCBLOCK(total_payload)) },
tlli := tlli);
f_tx_rlcmac_ul_block(ul_data, 0);
f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn);
/* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */
f_tx_rlcmac_ul_block(ts_RLCMAC_CTRL_ACK(tlli), 0, sched_fn);
/* Send enough blocks to test whole procedure: Until Nth block
(N=BS_CV_MAX), CV=15 is sent, and then the decreasing countdown value is sent.
*/
total_payload := total_payload & f_tx_rlcmac_ul_n_blocks(ul_tbf_ass.dynamic.tfi_assignment, bsn, 20);
f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn);
/* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */
f_tx_rlcmac_ul_block(ts_RLCMAC_CTRL_ACK(tlli), 0, sched_fn);
/* receive one message on BSSGP with all aggregated data in payload: */
BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id, total_payload));
}
/* Test scenario where MS wants to send some data on PDCH against SGSN and it is
* answered, so TBFs for uplink and later for downlink are created.
*/
@ -2187,6 +2246,7 @@ control {
execute( TC_cs_max_ul() );
execute( TC_t3169() );
execute( TC_t3193() );
execute( TC_countdown_procedure() );
execute( TC_mo_ping_pong() );
execute( TC_mo_ping_pong_with_ul_racap() );
execute( TC_force_two_phase_access() );