BSC_Tests: test emergency call preemption
Fill all channels of the BTS and then try to do a channel request for an emergency call. Osmo-bsc should pick one of the TCH channels and release it so that there is room for the emergency call. Change-Id: I7d544680f492cb825d909b86b2e1131ab652df13 Related: OS#4549
This commit is contained in:
parent
d8051724ff
commit
8281200718
|
@ -6285,6 +6285,48 @@ testcase TC_assignment_emerg_setup_deny_bts() runs on test_CT {
|
|||
vc_conn.done;
|
||||
}
|
||||
|
||||
/* Test what happens when an emergency call arrives while all TCH channels are
|
||||
* busy, the BSC is expected to terminate one call in favor of the incoming
|
||||
* emergency call */
|
||||
testcase TC_emerg_premption() runs on test_CT {
|
||||
var ASP_RSL_Unitdata rsl_ud;
|
||||
var integer i;
|
||||
var integer chreq_total, chreq_nochan;
|
||||
var RSL_Message rx_rsl;
|
||||
var RslChannelNr chan_nr;
|
||||
|
||||
f_init(1);
|
||||
f_sleep(1.0);
|
||||
|
||||
f_vty_allow_emerg_msc(true);
|
||||
f_vty_allow_emerg_bts(true, 0);
|
||||
|
||||
/* Fill up all channels on the BTS */
|
||||
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");
|
||||
for (i := 0; i < NUM_TCHF_PER_BTS + NUM_TCHH_PER_BTS + NUM_SDCCH_PER_BTS; i := i+1) {
|
||||
chan_nr := f_chreq_act_ack('33'O, i);
|
||||
}
|
||||
IPA_RSL[0].clear;
|
||||
f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total",
|
||||
chreq_total + NUM_TCHF_PER_BTS + NUM_TCHH_PER_BTS + NUM_SDCCH_PER_BTS);
|
||||
|
||||
/* Send Channel request for emegergency call */
|
||||
f_ipa_tx(0, ts_RSL_CHAN_RQD('A5'O, 23));
|
||||
|
||||
/* Expect the BSC to release one (the first) TCH/F on the BTS */
|
||||
chan_nr := valueof(t_RslChanNr_Bm(1));
|
||||
f_expect_chan_rel(0, chan_nr, expect_rr_chan_rel := false, expect_rll_rel_req := false);
|
||||
|
||||
/* Expect the BSC to send activate/assign the a channel for the emergency call */
|
||||
rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
|
||||
chan_nr := rx_rsl.ies[0].body.chan_nr;
|
||||
f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 33));
|
||||
rx_rsl := f_exp_ipa_rx(0, tr_RSL_IMM_ASSIGN(0));
|
||||
|
||||
setverdict(pass);
|
||||
}
|
||||
|
||||
/* Dyn PDCH todo:
|
||||
* activate OSMO as TCH/F
|
||||
* activate OSMO as TCH/H
|
||||
|
@ -6506,6 +6548,8 @@ control {
|
|||
execute( TC_assignment_emerg_setup_allow() );
|
||||
execute( TC_assignment_emerg_setup_deny_msc() );
|
||||
execute( TC_assignment_emerg_setup_deny_bts() );
|
||||
execute( TC_emerg_premption() );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue