BSC_Tests_ASCI: Add test to seize or release uplink by MSC
The MSC will block (seize) or unblock (release) the uplink on one BSC, if a talker requests or releases uplink on a different BSC. An UPLINK BUSY or UPLINK FREE message es expected to be sent to the BTS. Change-Id: I7ebf03662e81f59d76ca8d8fa29f581043053564
This commit is contained in:
parent
5e3dd362f6
commit
35874922b7
|
@ -95,8 +95,9 @@ private function f_tc_vgcs_vbs_setup(charstring id) runs on MSC_ConnHdlr {
|
|||
var boolean assign_res := false;
|
||||
var boolean assign_fail := false;
|
||||
/* Note: This timer is used to receive messages after the expected event.
|
||||
* After timeout, the outcome of the test is checked. */
|
||||
timer T := 0.2;
|
||||
* After timeout, the outcome of the test is checked.
|
||||
* The timeout must be large enough, so all the messages pass before checking the outcome. */
|
||||
timer T := 1.0;
|
||||
|
||||
/* Wait for the COORD ports to be connected. */
|
||||
f_sleep(1.0);
|
||||
|
@ -155,6 +156,19 @@ private function f_tc_vgcs_vbs_setup(charstring id) runs on MSC_ConnHdlr {
|
|||
if (g_pars.asci_test.vgcs_assign_ok) {
|
||||
T.start;
|
||||
}
|
||||
if (g_pars.asci_test.vgcs_uplink_seized or
|
||||
g_pars.asci_test.vgcs_uplink_release) {
|
||||
log("VGCS: sending Uplink Seized Cmd");
|
||||
BSSAP.send(ts_BSSMAP_UplinkSeizedCmd(9, omit, omit, omit));
|
||||
}
|
||||
if (g_pars.asci_test.vgcs_uplink_release) {
|
||||
log("VGCS: sending Uplink Release Cmd");
|
||||
BSSAP.send(ts_BSSMAP_UplinkRelCmd(9));
|
||||
}
|
||||
if (g_pars.asci_test.vgcs_uplink_seized or
|
||||
g_pars.asci_test.vgcs_uplink_release) {
|
||||
T.start;
|
||||
}
|
||||
repeat;
|
||||
}
|
||||
[] COORD.receive(COORD_VGCS_ASSIGN_FAIL) {
|
||||
|
@ -249,6 +263,24 @@ private function f_tc_vgcs_vbs_setup(charstring id) runs on MSC_ConnHdlr {
|
|||
setverdict(pass);
|
||||
return;
|
||||
}
|
||||
if (g_pars.asci_test.vgcs_uplink_seized) {
|
||||
if (not uplink_busy) {
|
||||
setverdict(fail, "VGCS: Uplink not busy as expected!");
|
||||
return;
|
||||
}
|
||||
log("VGCS: Uplink established+released and uplink marked free as expected!");
|
||||
setverdict(pass);
|
||||
return;
|
||||
}
|
||||
if (g_pars.asci_test.vgcs_uplink_release) {
|
||||
if (not uplink_free) {
|
||||
setverdict(fail, "VGCS: Uplink not free as expected!");
|
||||
return;
|
||||
}
|
||||
log("VGCS: Uplink established+released and uplink marked free as expected!");
|
||||
setverdict(pass);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -505,6 +537,50 @@ testcase TC_vgcs_vbs_talker_rel() runs on test_CT {
|
|||
f_shutdown_helper();
|
||||
}
|
||||
|
||||
testcase TC_vgcs_vbs_uplink_seized() runs on test_CT {
|
||||
var MSC_ConnHdlr call_conn, chan_conn;
|
||||
var TestHdlrParams pars := f_gen_test_hdlr_pars();
|
||||
|
||||
f_init(1, true);
|
||||
|
||||
pars.sccp_addr_msc := g_bssap[0].sccp_addr_own;
|
||||
pars.sccp_addr_bsc := g_bssap[0].sccp_addr_peer;
|
||||
|
||||
pars.asci_test.vgcs_uplink_seized := true;
|
||||
|
||||
call_conn := f_start_handler(refers(f_tc_vgcs_vbs_setup), pars);
|
||||
chan_conn := f_start_handler(refers(f_tc_asci_assignment), pars);
|
||||
/* Connect COORD ports of both functions. The functions will delay before using them. */
|
||||
connect(call_conn:COORD, chan_conn:COORD);
|
||||
|
||||
call_conn.done;
|
||||
chan_conn.done;
|
||||
|
||||
f_shutdown_helper();
|
||||
}
|
||||
|
||||
testcase TC_vgcs_vbs_uplink_release() runs on test_CT {
|
||||
var MSC_ConnHdlr call_conn, chan_conn;
|
||||
var TestHdlrParams pars := f_gen_test_hdlr_pars();
|
||||
|
||||
f_init(1, true);
|
||||
|
||||
pars.sccp_addr_msc := g_bssap[0].sccp_addr_own;
|
||||
pars.sccp_addr_bsc := g_bssap[0].sccp_addr_peer;
|
||||
|
||||
pars.asci_test.vgcs_uplink_release := true;
|
||||
|
||||
call_conn := f_start_handler(refers(f_tc_vgcs_vbs_setup), pars);
|
||||
chan_conn := f_start_handler(refers(f_tc_asci_assignment), pars);
|
||||
/* Connect COORD ports of both functions. The functions will delay before using them. */
|
||||
connect(call_conn:COORD, chan_conn:COORD);
|
||||
|
||||
call_conn.done;
|
||||
chan_conn.done;
|
||||
|
||||
f_shutdown_helper();
|
||||
}
|
||||
|
||||
control {
|
||||
execute( TC_vgcs_vbs_setup_only() );
|
||||
execute( TC_vgcs_vbs_assignment() );
|
||||
|
@ -512,6 +588,8 @@ control {
|
|||
execute( TC_vgcs_vbs_talker_req() );
|
||||
execute( TC_vgcs_vbs_talker_est() );
|
||||
execute( TC_vgcs_vbs_talker_rel() );
|
||||
execute( TC_vgcs_vbs_uplink_seized() );
|
||||
execute( TC_vgcs_vbs_uplink_release() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -758,7 +758,9 @@ type record ASCITest {
|
|||
boolean vgcs_assign_fail,
|
||||
boolean vgcs_talker_req,
|
||||
boolean vgcs_talker_est,
|
||||
boolean vgcs_talker_rel
|
||||
boolean vgcs_talker_rel,
|
||||
boolean vgcs_uplink_seized,
|
||||
boolean vgcs_uplink_release
|
||||
};
|
||||
|
||||
type record TestHdlrParams {
|
||||
|
@ -851,7 +853,9 @@ template (value) TestHdlrParams t_def_TestHdlrPars := {
|
|||
vgcs_assign_fail := false,
|
||||
vgcs_talker_req := false,
|
||||
vgcs_talker_est := false,
|
||||
vgcs_talker_rel := false
|
||||
vgcs_talker_rel := false,
|
||||
vgcs_uplink_seized := false,
|
||||
vgcs_uplink_release := false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue