BSC_Tests: Add TC_chan_exhaustion to test for channel exhaustion
We ensure that all channels are allocated, and that the first allocation beyond the avialable channels will fail and generate an IMM_ASS_REJ. WE also verify that the related counters are incremented as expected. Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198
This commit is contained in:
parent
618ef64574
commit
b5182047e6
|
@ -331,6 +331,53 @@ testcase TC_chan_act_nack() runs on test_CT {
|
|||
setverdict(pass);
|
||||
}
|
||||
|
||||
/* Test for channel exhaustion due to RACH overload */
|
||||
testcase TC_chan_exhaustion() runs on test_CT {
|
||||
var ASP_RSL_Unitdata rsl_ud;
|
||||
var integer i;
|
||||
var integer chreq_total, chreq_nochan;
|
||||
|
||||
f_init();
|
||||
f_bssap_reset();
|
||||
|
||||
chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total");
|
||||
chreq_nochan := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel");
|
||||
|
||||
/* expect 5xTCH/F to succeed */
|
||||
for (i := 0; i < NUM_TCHF_PER_BTS; i := i+1) {
|
||||
f_chreq_act_ack('23'O, i);
|
||||
}
|
||||
|
||||
IPA_RSL[0].clear;
|
||||
|
||||
f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", chreq_total+NUM_TCHF_PER_BTS);
|
||||
|
||||
/* now expect additional channel activations to fail */
|
||||
f_ipa_tx(0, ts_RSL_CHAN_RQD('42'O, 42));
|
||||
|
||||
alt {
|
||||
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
|
||||
tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV))) {
|
||||
setverdict(fail, "Received CHAN ACT ACK without resources?!?");
|
||||
}
|
||||
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_IMM_ASSIGN(?))) -> value rsl_ud {
|
||||
var GsmRrMessage rr;
|
||||
/* match on IMM ASS REJ */
|
||||
rr := dec_GsmRrMessage(rsl_ud.rsl.ies[1].body.full_imm_ass_info.payload);
|
||||
if (rr.header.message_type == IMMEDIATE_ASSIGNMENT_REJECT) {
|
||||
f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total",
|
||||
chreq_total+NUM_TCHF_PER_BTS+1);
|
||||
f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel",
|
||||
chreq_nochan+1);
|
||||
setverdict(pass);
|
||||
} else {
|
||||
repeat;
|
||||
}
|
||||
}
|
||||
[] IPA_RSL[0].receive { repeat; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
type record DchanTuple {
|
||||
integer sccp_conn_id,
|
||||
|
@ -1012,6 +1059,7 @@ control {
|
|||
execute( TC_chan_act_ack_est_ind_noreply() );
|
||||
execute( TC_chan_act_ack_est_ind_refused() );
|
||||
execute( TC_chan_act_nack() );
|
||||
execute( TC_chan_exhaustion() );
|
||||
execute( TC_chan_rel_rll_rel_ind() );
|
||||
execute( TC_chan_rel_conn_fail() );
|
||||
execute( TC_chan_rel_hard_clear() );
|
||||
|
|
Loading…
Reference in New Issue