pcu: Introduce test TC_ratectr_all_available_allocated

Related: SYS#4878
Change-Id: Ide1254954b5cf02a19e190b19d06c7aaeedb6ede
This commit is contained in:
Pau Espin 2021-11-15 11:53:40 +01:00
parent 907ba20f37
commit 6eb4d25ba0
1 changed files with 49 additions and 0 deletions

View File

@ -6504,6 +6504,54 @@ testcase TC_stat_pdch_avail_occ_ms_not_known_egprs() runs on RAW_PCU_Test_CT {
f_tc_stat_pdch_avail_occ_ms_not_known(true);
}
/* Make sure that bts.0.pdch.all_allocated is set when we allocate all resources */
testcase TC_ratectr_all_available_allocated() runs on RAW_PCU_Test_CT {
var PCUIF_info_ind info_ind;
var template IARRestOctets rest;
var BIT11 ra11;
info_ind := valueof(ts_PCUIF_INFO_default);
info_ind.t3142 := 3;
/* Only the first TRX is enabled. */
f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
f_PCUIF_PDCHMask_set(info_ind, '00000001'B, 0);
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename(), info_ind);
f_statsd_reset();
var EGPRSPktChRequest req := {
one_phase := {
tag := '0'B,
multislot_class := '10101'B,
priority := '01'B,
random_bits := '101'B
}
};
/* We send 7 requests, the IUT gives us all available USFs (0..6) */
for (var integer i := 0; i < 7; i := i + 1) {
req.one_phase.random_bits := int2bit(f_rnd_int(8), 3);
f_TC_egprs_pkt_chan_req(req, tr_IMM_TBF_ASS);
}
ra11 := enc_EGPRSPktChRequest2bits(req);
rest := tr_IARRestOctets({ *, tr_ExtRAOpt(substr(ra11, 6, 5)), * });
/* At this point, the IUT should run out of free USFs */
f_TC_egprs_pkt_chan_req_reject(ra11, 1870, rest, wi := info_ind.t3142);
/* bts.0.pdch.all_allocated is updated once per second, wait some time to make sure it was updated. */
f_sleep(2.0);
var StatsDExpects expect := {
{ name := "TTCN3.bts.0.pdch.all_allocated", mtype := "c", min := 1, max := 1 }
};
f_statsd_expect(expect);
f_shutdown(__BFILE__, __LINE__, final := true);
}
control {
execute( TC_pcuif_suspend() );
execute( TC_pcuif_suspend_active_tbf() );
@ -6618,6 +6666,7 @@ control {
execute( TC_stat_pdch_avail_occ() );
execute( TC_stat_pdch_avail_occ_ms_not_known_gprs() );
execute( TC_stat_pdch_avail_occ_ms_not_known_egprs() );
execute( TC_ratectr_all_available_allocated() );
}
}