summaryrefslogtreecommitdiffstats
path: root/msc/MSC_Tests.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-18 23:32:21 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-18 23:33:42 +0100
commit5946b33e37b1b45bdedec37966a88dffa228ec25 (patch)
tree159b6dc60ed8513d72e05577b8c1309bfbcba4c4 /msc/MSC_Tests.ttcn
parent04b5ec3ec724174c9eb5b5b3329e392d827567df (diff)
msc: wait for clear-command/complete/sccp-release
Not all tests were waiting/expecting the complete connection shutdown, which results in the possibility for CLEAR CMD to arrive during shutdown of the TITAN components and cause related errors. Change-Id: I3a6c2e1f78b58f86ef84d4e323f432016a9afa7e
Diffstat (limited to 'msc/MSC_Tests.ttcn')
-rw-r--r--msc/MSC_Tests.ttcn45
1 files changed, 17 insertions, 28 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 156bdd9..698b341 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -457,7 +457,9 @@ private function f_tc_lu_imsi_reject(charstring id, BSC_ConnHdlrPars pars) runs
GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
GSUP.send(ts_GSUP_UL_ERR(g_pars.imsi, 23));
alt {
- [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej(int2oct(23,1)))) { }
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej(int2oct(23,1)))) {
+ f_expect_clear();
+ }
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Acc)) {
setverdict(fail, "Expecting LU REJ, but got ACCEPT");
self.stop;
@@ -484,7 +486,9 @@ private function f_tc_lu_imsi_timeout_gsup(charstring id, BSC_ConnHdlrPars pars)
/* Normally the HLR would need to respond here, but we decide to force a timeout here */
alt {
/* FIXME: Expect specific reject cause */
- [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { }
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) {
+ f_expect_clear();
+ }
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Acc)) {
setverdict(fail, "Expecting LU REJ, but got ACCEPT");
self.stop;
@@ -1042,12 +1046,9 @@ private function f_tc_cl3_no_payload(charstring id, BSC_ConnHdlrPars pars) runs
alt {
[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
/* Expect LU REJECT with Cause == Illegal MS */
- [] BSSAP.receive(tr_BSSMAP_ClearCommand) {
- BSSAP.send(ts_BSSMAP_ClearComplete);
- BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
- }
[] BSSAP.receive(tr_PDU_DTAP_MT(?)) { repeat; }
[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) { repeat; }
+ [] as_clear_cmd_compl_disc();
[] T.timeout {
setverdict(fail, "Timeout waiting for ClearCommand or SCCP Release");
self.stop;
@@ -1079,13 +1080,9 @@ private function f_tc_cl3_rnd_payload(charstring id, BSC_ConnHdlrPars pars) runs
alt {
/* Immediate disconnect */
[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
- /* Expect LU REJECT with Cause == Illegal MS */
- [] BSSAP.receive(tr_BSSMAP_ClearCommand) {
- BSSAP.send(ts_BSSMAP_ClearComplete);
- BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
- }
[] BSSAP.receive(tr_PDU_DTAP_MT(?)) { repeat; }
[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) { repeat; }
+ [] as_clear_cmd_compl_disc();
[] T.timeout {
setverdict(fail, "Timeout waiting for ClearCommand or SCCP Release");
self.stop;
@@ -1233,11 +1230,6 @@ private function f_tc_mo_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) r
T.start;
alt {
[] T.timeout { setverdict(fail, "Timeout waiting for channel release"); self.stop; }
- [] BSSAP.receive(tr_BSSMAP_ClearCommand) {
- BSSAP.send(ts_BSSMAP_ClearComplete);
- BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
- setverdict(pass);
- }
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) {
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id)));
repeat;
@@ -1253,6 +1245,7 @@ private function f_tc_mo_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) r
repeat;
}
[] MGCP.receive { repeat; }
+ [] as_clear_cmd_compl_disc();
}
}
testcase TC_mo_crcx_ran_reject() runs on MTC_CT {
@@ -1340,11 +1333,6 @@ private function f_tc_mt_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) r
T.start;
alt {
[] T.timeout { setverdict(fail, "Timeout waiting for channel release"); self.stop; }
- [] BSSAP.receive(tr_BSSMAP_ClearCommand) {
- BSSAP.send(ts_BSSMAP_ClearComplete);
- BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
- setverdict(pass);
- }
[] BSSAP.receive { repeat; }
[] MNCC.receive { repeat; }
[] GSUP.receive { repeat; }
@@ -1354,6 +1342,7 @@ private function f_tc_mt_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) r
repeat;
}
[] MGCP.receive { repeat; }
+ [] as_clear_cmd_compl_disc();
}
}
testcase TC_mt_crcx_ran_reject() runs on MTC_CT {
@@ -1398,16 +1387,12 @@ private function f_tc_mt_t310(charstring id, BSC_ConnHdlrPars pars) runs on BSC_
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id)));
alt {
- [] BSSAP.receive(tr_BSSMAP_ClearCommand) {
- BSSAP.send(ts_BSSMAP_ClearComplete);
- BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
- setverdict(pass);
- }
[] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd {
MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id));
f_create_mgcp_delete_ep(cpars.mgcp_ep);
repeat;
}
+ [] as_clear_cmd_compl_disc();
}
}
testcase TC_mt_t310() runs on MTC_CT {
@@ -1518,7 +1503,9 @@ private function f_tc_lu_imsi_auth_tmsi_encr_3_1(charstring id, BSC_ConnHdlrPars
}
f_mm_auth();
alt {
- [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { }
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) {
+ f_expect_clear();
+ }
[] BSSAP.receive(tr_BSSMAP_CipherModeCmd(?,?)) {
setverdict(fail, "CipherModeCommand despite no A5 intersection");
self.stop;
@@ -1583,7 +1570,9 @@ private function f_tc_lu_imsi_auth_tmsi_encr_13_2(charstring id, BSC_ConnHdlrPar
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
f_mm_auth();
alt {
- [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { }
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) {
+ f_expect_clear();
+ }
[] BSSAP.receive(tr_BSSMAP_CipherModeCmd(?,?)) {
setverdict(fail, "CipherModeCommand despite no A5 intersection");
self.stop;