summaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests.ttcn43
-rw-r--r--bsc/MSC_ConnectionHandler.ttcn20
2 files changed, 28 insertions, 35 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 2897a0b..d71d3dc 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -113,14 +113,8 @@ modulepar {
}
private function f_shutdown_helper() runs on test_CT {
- for (var integer i := 0; i < NUM_BTS; i := i+1) {
- if (isbound(bts[i]) and isbound(bts[i].rsl)) {
- f_ipa_rsl_stop(bts[i].rsl);
- }
- }
- f_ipa_ctrl_stop();
- all port.stop;
setverdict(pass);
+ mtc.stop;
}
private function f_legacy_bssap_reset() runs on test_CT {
@@ -199,7 +193,7 @@ runs on test_CT {
[] IPA_RSL[i].receive { repeat }
[] T.timeout {
setverdict(fail, "Timeout RSL waiting for ASP_IPA_EVENT_ID_ACK");
- self.stop;
+ mtc.stop;
}
}
}
@@ -230,7 +224,7 @@ function f_wait_oml(integer bts_nr, charstring status, float secs_max) runs on t
f_sleep(0.1);
if (not T.running) {
setverdict(fail, "Timeout waiting for oml-connection-state ", status);
- self.stop;
+ mtc.stop;
}
}
}
@@ -240,7 +234,7 @@ altstep as_Tguard() runs on test_CT {
var BSSAP_N_UNITDATA_ind ud_ind;
[] T_guard.timeout {
setverdict(fail, "Timeout of T_guard");
- self.stop;
+ mtc.stop;
}
/* always respond with RESET ACK to RESET */
[] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind {
@@ -253,7 +247,7 @@ altstep as_Tguard() runs on test_CT {
altstep no_bssmap_reset() runs on test_CT {
[] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) {
setverdict(fail, "unexpected BSSMAP Reset");
- self.stop;
+ mtc.stop;
}
}
@@ -340,7 +334,7 @@ runs on test_CT return RSL_Message {
[] IPA_RSL[bts_nr].receive { repeat; }
[] T.timeout {
setverdict(fail, "Timeout expecting ", t_rx);
- self.stop;
+ mtc.stop;
}
}
return rx_rsl_ud.rsl;
@@ -1325,7 +1319,7 @@ testcase TC_paging_imsi_load() runs on test_CT {
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after LOAD_IND(0)");
- self.stop;
+ mtc.stop;
}
[] T_retrans.timeout {
/* re-trnsmit the zero-space LOAD IND to avoid BSC 'auto credit' */
@@ -1404,15 +1398,15 @@ testcase TC_paging_imsi_a_reset() runs on test_CT {
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after A-RESET");
- self.stop;
+ mtc.stop;
}
[] IPA_RSL[1].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after A-RESET");
- self.stop;
+ mtc.stop;
}
[] IPA_RSL[2].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after A-RESET");
- self.stop;
+ mtc.stop;
}
[] T.timeout {
setverdict(pass);
@@ -1467,10 +1461,9 @@ function f_ipa_unknown_unit_id(integer mp_bsc_ipa_port) runs on test_CT return b
}
[] IPA_RSL[0].receive { repeat }
[] T.timeout {
- self.stop;
+ return false;
}
}
-
return false;
}
@@ -1762,7 +1755,7 @@ return BSSMAP_IE_ChannelType {
}
case else {
setverdict(fail, "Unsupported codec ", a_elem);
- self.stop;
+ mtc.stop;
}
}
return ret;
@@ -1835,7 +1828,7 @@ private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
var RSL_IE_Body mode_ie;
if (f_rsl_find_ie(rsl, RSL_IE_CHAN_MODE, mode_ie) == false) {
setverdict(fail, "Couldn't find CHAN_MODE IE");
- self.stop;
+ mtc.stop;
}
var template RSL_IE_Body t_mode_ie := f_rsl_chmod_tmpl_from_codec(g_pars.ass_codec_list.codecElements[0]);
if (not match(mode_ie, t_mode_ie)) {
@@ -1846,7 +1839,7 @@ private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
if (g_pars.expect_mr_conf_ie != omit) {
if (f_rsl_find_ie(rsl, RSL_IE_MR_CONFIG, mr_conf) == false) {
setverdict(fail, "Missing MR CONFIG IE in RSL Chan Activ");
- self.stop;
+ mtc.stop;
}
log("found RSL MR CONFIG IE: ", mr_conf);
@@ -1858,7 +1851,7 @@ private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
if (f_rsl_find_ie(rsl, RSL_IE_MR_CONFIG, mr_conf) == true) {
log("found RSL MR CONFIG IE: ", mr_conf);
setverdict(fail, "Found MR CONFIG IE in RSL Chan Activ, expecting omit");
- self.stop;
+ mtc.stop;
}
}
}
@@ -1973,7 +1966,7 @@ private function f_bssap_expect_nothing(float sec := 5.00) runs on MSC_ConnHdlr
alt {
[] BSSAP.receive(PDU_BSSAP:?) -> value bssap {
setverdict(fail, "Unexpected BSSMAP ", bssap);
- self.stop;
+ mtc.stop;
}
[] T.timeout {
setverdict(pass);
@@ -2087,7 +2080,7 @@ runs on MSC_ConnHdlr {
ss_nr := chan_nr.u.sdcch8.sub_chan;
} else {
setverdict(fail, "Invalid ChanNr ", chan_nr);
- self.stop;
+ mtc.stop;
}
var charstring cmd := "bts "&int2str(bts_nr)&" trx "&int2str(trx_nr)&
@@ -2337,7 +2330,7 @@ runs on test_CT {
var charstring mode := f_ts_dyn_mode_get(bts_nr, trx_nr, ts_nr);
if (not match(mode, exp)) {
setverdict(fail, "Unexpected TS Mode: ", mode);
- self.stop;
+ mtc.stop;
}
}
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index a82728a..102c30e 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -147,7 +147,7 @@ private function f_get_free_mgcp_conn() runs on MSC_ConnHdlr return integer {
}
}
setverdict(fail, "Only 2 Connections per EP!");
- self.stop;
+ mtc.stop;
}
/* Helper function to pick a specific connection by its cid. Since we reach out
@@ -160,7 +160,7 @@ private function f_get_mgcp_conn(MgcpConnectionId cid) runs on MSC_ConnHdlr retu
}
}
setverdict(fail, "No Connection for ID ", cid);
- self.stop;
+ mtc.stop;
}
/* altstep for handling of IPACC media related commands. Activated by as_Media() to test
@@ -189,7 +189,7 @@ altstep as_Media_ipacc() runs on MSC_ConnHdlr {
b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_CONN_ID, ie);
if (g_media.bts.conn_id != ie.ipa_conn_id) {
setverdict(fail, "IPA MDCX for unknown ConnId", rsl);
- self.stop;
+ mtc.stop;
}
/* mandatory */
b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_IP, ie);
@@ -233,7 +233,7 @@ altstep as_Media_ipacc() runs on MSC_ConnHdlr {
b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_CONN_ID, ie);
if (g_media.bts1.conn_id != ie.ipa_conn_id) {
setverdict(fail, "IPA MDCX for unknown ConnId", rsl);
- self.stop;
+ mtc.stop;
}
/* mandatory */
b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_IP, ie);
@@ -269,7 +269,7 @@ altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr {
if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) {
if (cid != 0) {
setverdict(fail, "MGCP wildcard EP only works in first CRCX");
- self.stop;
+ mtc.stop;
}
/* we keep the endpoint name allocated during MediaState_init */
} else {
@@ -575,12 +575,12 @@ function f_ChDesc2RslChanNr(ChannelDescription2_V ch_desc, out RslChannelNr chan
}
else {
setverdict(fail, "Unknown ChDesc!");
- self.stop;
+ mtc.stop;
}
if (ch_desc.octet3 and4b '10'O == '10'O) {
setverdict(fail, "No support for Hopping");
- self.stop;
+ mtc.stop;
} else {
var OCT2 concat := ch_desc.octet3 & ch_desc.octet4;
arfcn := oct2int(concat);
@@ -670,7 +670,7 @@ altstep as_assignment(inout AssignmentState st) runs on MSC_ConnHdlr {
repeat;
} else {
setverdict(fail, "Unexpected L3 received", l3);
- self.stop;
+ mtc.stop;
}
}
[st.rr_ass_cmpl_seen] RSL.receive(tr_RSL_REL_REQ(st.old_chan_nr, tr_RslLinkID_DCCH(0))) {
@@ -955,7 +955,7 @@ runs on MSC_ConnHdlr {
}
log("g_media ", g_media);
if (not isbound(bssap)) {
- self.stop;
+ mtc.stop;
}
/* When the BSC detects that LCLS is possible it will cross the
@@ -1019,7 +1019,7 @@ altstep as_handover(inout HandoverState st) runs on MSC_ConnHdlr {
repeat;
} else {
setverdict(fail, "Unexpected L3 received", l3);
- self.stop;
+ mtc.stop;
}
}
[st.rr_ho_cmpl_seen] as_Media_ipacc();