summaryrefslogtreecommitdiffstats
path: root/msc/MSC_Tests.ttcn
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-02-05 05:36:02 +0100
committerlaforge <laforge@osmocom.org>2021-02-08 20:18:13 +0000
commit109e755161661314926850b8776ffa44b825fce5 (patch)
treeaa90a129ace5ad654b98a1632ae9aa297bdd2c15 /msc/MSC_Tests.ttcn
parentb56701e0213366b5579e0438fb4278f194d94689 (diff)
msc: test reaction on Clear Request during a MO/MT Call
Diffstat (limited to 'msc/MSC_Tests.ttcn')
-rw-r--r--msc/MSC_Tests.ttcn62
1 files changed, 62 insertions, 0 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 206effa..6bad9c3 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -935,6 +935,66 @@ testcase TC_lu_clear_request() runs on MTC_CT {
vc_conn.done;
}
+/* Test reaction on Clear Request during a MO Call */
+friend function f_TC_mo_mt_call_clear_request(charstring id, BSC_ConnHdlrPars pars)
+runs on BSC_ConnHdlr {
+ var CallParameters cpars := valueof(t_CallParams);
+ var MNCC_PDU mncc_pdu;
+ timer T := 2.0;
+
+ f_init_handler(pars);
+
+ f_perform_lu();
+
+ /* HACK: reducing code duplication ('66'H - MO, '68'H - MT) */
+ if (pars.imsi == '262420002532766'H)
+ { f_mo_call_establish(cpars); }
+ else
+ { f_mt_call_establish(cpars); }
+
+ /* Hold the line for a while... */
+ f_sleep(2.0);
+
+ /* BSC sends BSSMAP Clear Request (e.g. due to RR failure) */
+ BSSAP.send(ts_BSSMAP_ClearRequest(1));
+
+ /* Expect (optional) CC RELEASE and Clear Command */
+ var default ccrel := activate(as_optional_cc_rel(cpars));
+ f_expect_clear();
+ deactivate(ccrel);
+
+ /* Expect RELease indication on the MNCC socket */
+ T.start;
+ alt {
+ [] MNCC.receive(tr_MNCC_REL_ind(cpars.mncc_callref)) -> value mncc_pdu {
+ log("Rx MNCC REL.ind, cause := ", mncc_pdu.u.signal.cause);
+ setverdict(pass);
+ }
+ [] MNCC.receive(MNCC_PDU:?) -> value mncc_pdu {
+ setverdict(fail, "Rx unexpected MNCC PDU: ", mncc_pdu);
+ }
+ [] T.timeout {
+ setverdict(fail, "Timeout waiting for MNCC REL.ind");
+ }
+ }
+}
+testcase TC_mo_call_clear_request() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn;
+
+ f_init();
+
+ vc_conn := f_start_handler(refers(f_TC_mo_mt_call_clear_request), 2532766); // '66'H - MO
+ vc_conn.done;
+}
+testcase TC_mt_call_clear_request() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn;
+
+ f_init();
+
+ vc_conn := f_start_handler(refers(f_TC_mo_mt_call_clear_request), 2532768); // '68'H - MT
+ vc_conn.done;
+}
+
/* Test LU but BSC will send a clear request in the middle */
friend function f_tc_lu_disconnect(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
f_init_handler(pars);
@@ -6345,6 +6405,8 @@ control {
execute( TC_lu_auth_sai_timeout() );
execute( TC_lu_auth_sai_err() );
execute( TC_lu_clear_request() );
+ execute( TC_mo_call_clear_request() );
+ execute( TC_mt_call_clear_request() );
execute( TC_lu_disconnect() );
execute( TC_lu_by_imei() );
execute( TC_lu_by_tmsi_noauth_unknown() );