summaryrefslogtreecommitdiffstats
path: root/library/BSSMAP_Emulation.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'library/BSSMAP_Emulation.ttcn')
-rw-r--r--library/BSSMAP_Emulation.ttcn58
1 files changed, 27 insertions, 31 deletions
diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn
index e65c550..921ac59 100644
--- a/library/BSSMAP_Emulation.ttcn
+++ b/library/BSSMAP_Emulation.ttcn
@@ -202,9 +202,8 @@ runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
return ConnectionTable[i].comp_ref;
}
}
- log("BSSMAP Connection table not found by SCCP Connection ID ", sccp_conn_id);
- setverdict(fail);
- self.stop;
+ setverdict(fail, "BSSMAP Connection table not found by SCCP Connection ID ", sccp_conn_id);
+ mtc.stop;
}
/* resolve component reference by CIC */
@@ -216,9 +215,8 @@ runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
return ConnectionTable[i].comp_ref;
}
}
- log("BSSMAP Connection table not found by MGCP Transaction ID ", tid);
- setverdict(fail);
- self.stop;
+ setverdict(fail, "BSSMAP Connection table not found by MGCP Transaction ID ", tid);
+ mtc.stop;
}
private function f_comp_store_mgcp_tid(BSSAP_ConnHdlr client, MgcpTransId tid)
@@ -230,9 +228,8 @@ runs on BSSMAP_Emulation_CT {
return;
}
}
- log("BSSMAP Connection table not found by component ", client);
- setverdict(fail);
- self.stop;
+ setverdict(fail, "BSSMAP Connection table not found by component ", client);
+ mtc.stop;
}
private function f_comp_by_cic(integer cic)
@@ -243,9 +240,8 @@ runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
return ConnectionTable[i].comp_ref;
}
}
- log("BSSMAP Connection table not found by CIC ", cic);
- setverdict(fail);
- self.stop;
+ setverdict(fail, "BSSMAP Connection table not found by CIC ", cic);
+ mtc.stop;
}
private function f_comp_store_cic(BSSAP_ConnHdlr client, integer cic)
@@ -257,8 +253,8 @@ runs on BSSMAP_Emulation_CT {
return;
}
}
- log("BSSMAP Connection table not found by component ", client);
- setverdict(fail);
+ setverdict(fail, "BSSMAP Connection table not found by component ", client);
+ mtc.stop;
}
/* resolve connection ID by component reference */
@@ -269,9 +265,8 @@ runs on BSSMAP_Emulation_CT return integer {
return ConnectionTable[i].sccp_conn_id;
}
}
- log("BSSMAP Connection table not found by component ", client);
- setverdict(fail);
- self.stop;
+ setverdict(fail, "BSSMAP Connection table not found by component ", client);
+ mtc.stop;
}
/* resolve ConnectionTable index component reference */
@@ -282,9 +277,8 @@ runs on BSSMAP_Emulation_CT return integer {
return i;
}
}
- log("BSSMAP Connection table not found by component ", client);
- setverdict(fail);
- self.stop;
+ setverdict(fail, "BSSMAP Connection table not found by component ", client);
+ mtc.stop;
}
private function f_gen_conn_id()
@@ -325,9 +319,7 @@ runs on BSSMAP_Emulation_CT {
return;
}
}
- log("BSSMAP Connection table full!");
- setverdict(fail);
- self.stop;
+ testcase.stop("BSSMAP Connection table full!");
}
private function f_conn_table_del(integer sccp_conn_id)
@@ -341,9 +333,8 @@ runs on BSSMAP_Emulation_CT {
return
}
}
- log("BSSMAP Connection table attempt to delete non-existant ", sccp_conn_id);
- setverdict(fail);
- self.stop;
+ setverdict(fail, "BSSMAP Connection table attempt to delete non-existant ", sccp_conn_id);
+ mtc.stop;
}
private function f_imsi_table_find(hexstring imsi, template OCT4 tmsi)
@@ -501,7 +492,8 @@ private function f_bssap_wait_for_reset() runs on BSSMAP_Emulation_CT {
repeat;
}
[] T.timeout {
- setverdict(fail);
+ setverdict(fail, "Timeout waiting for BSSAP RESET");
+ mtc.stop;
}
}
}
@@ -517,7 +509,10 @@ function f_bssap_reset(SCCP_PAR_Address peer, SCCP_PAR_Address own) runs on BSSM
}
[] as_reset_ack();
[] BSSAP.receive { repeat };
- [] T.timeout { setverdict(fail, "Waiting for RESET-ACK after sending RESET"); }
+ [] T.timeout {
+ setverdict(fail, "Timeout waiting for RESET-ACK after sending RESET");
+ mtc.stop;
+ }
}
}
@@ -763,6 +758,7 @@ runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
if (not ischosen(conn_ind.userData.pdu.bssmap.completeLayer3Information)) {
setverdict(fail, "N-CONNECT.ind with L3 != COMPLETE L3");
+ mtc.stop;
return ret;
}
l3_info := conn_ind.userData.pdu.bssmap.completeLayer3Information.layer3Information.layer3info;
@@ -782,6 +778,7 @@ runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
}
}
setverdict(fail, "Couldn't find Expect for incoming connection ", conn_ind);
+ mtc.stop;
return ret;
}
@@ -796,7 +793,7 @@ runs on BSSMAP_Emulation_CT {
return;
}
}
- setverdict(fail, "No space left in ExpectTable");
+ testcase.stop("No space left in ExpectTable");
}
private function f_create_imsi(hexstring imsi, OCT4 tmsi, BSSAP_ConnHdlr hdlr)
@@ -810,8 +807,7 @@ runs on BSSMAP_Emulation_CT {
return;
}
}
- setverdict(fail, "No space left in ImsiTable");
- self.stop;
+ testcase.stop("No space left in ImsiTable");
}