summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--msc/MSC_Tests.ttcn68
1 files changed, 64 insertions, 4 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index f9b2d03..b5a3ba7 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2817,10 +2817,11 @@ runs on BSC_ConnHdlr {
}
}
-private function f_expect_gsup_msg(template GSUP_PDU msg)
+private function f_expect_gsup_msg(template GSUP_PDU msg,
+ float T_val := 2.0)
runs on BSC_ConnHdlr return GSUP_PDU {
var GSUP_PDU gsup_msg_complete;
- timer T := 2.0;
+ timer T := T_val;
T.start;
alt {
@@ -2837,10 +2838,11 @@ runs on BSC_ConnHdlr return GSUP_PDU {
return gsup_msg_complete;
}
-private function f_expect_mt_dtap_msg(template PDU_ML3_NW_MS msg)
+private function f_expect_mt_dtap_msg(template PDU_ML3_NW_MS msg,
+ float T_val := 2.0)
runs on BSC_ConnHdlr return PDU_ML3_NW_MS {
var PDU_DTAP_MT bssap_msg_complete;
- timer T := 2.0;
+ timer T := T_val;
T.start;
alt {
@@ -3549,6 +3551,63 @@ testcase TC_proc_ss_for_unknown_session() runs on MTC_CT {
vc_conn.done;
}
+/* MT (network-originated) USSD and no response to Paging Request */
+friend function f_tc_proc_ss_paging_fail(charstring id, BSC_ConnHdlrPars pars)
+runs on BSC_ConnHdlr {
+ timer TP := 2.0; /* Paging timer */
+
+ f_init_handler(pars);
+
+ /* Perform location update */
+ f_perform_lu();
+
+ f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
+ f_create_gsup_expect(hex2str(g_pars.imsi));
+
+ var template (value) GSUP_PDU gsup_req := ts_GSUP_PROC_SS_REQ(
+ imsi := g_pars.imsi,
+ sid := '20000444'O,
+ state := OSMO_GSUP_SESSION_STATE_BEGIN,
+ ss := f_rnd_octstring(23)
+ );
+
+ /* Error with some cause value */
+ var template GSUP_PDU gsup_rsp := tr_GSUP_PROC_SS_ERR(
+ imsi := g_pars.imsi,
+ sid := '20000444'O,
+ state := OSMO_GSUP_SESSION_STATE_END,
+ cause := ? /* FIXME: introduce an enumerated type! */
+ );
+
+ /* Initiate a MT USSD notification */
+ GSUP.send(gsup_req);
+
+ /* Send it to MSC and expect Paging Request */
+ TP.start;
+ alt {
+ [pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)) {
+ setverdict(pass);
+ }
+ [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) {
+ setverdict(pass);
+ }
+ /* We don't expect anything else */
+ [] as_unexp_gsup_or_bssap_msg();
+ [] TP.timeout {
+ setverdict(fail, "Timeout waiting for Paging Request");
+ }
+ }
+
+ /* Expect GSUP PROC_SS_ERROR message */
+ f_expect_gsup_msg(gsup_rsp, T_val := 10.0);
+}
+testcase TC_proc_ss_paging_fail() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn;
+ f_init();
+ vc_conn := f_start_handler(refers(f_tc_proc_ss_paging_fail), 101);
+ vc_conn.done;
+}
+
/* A5/1 only permitted on network side; attempt an invalid CIPHER MODE COMPLETE with A5/3 which MSC should reject. */
private function f_tc_cipher_complete_with_invalid_cipher(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
@@ -5399,6 +5458,7 @@ control {
execute( TC_mt_ussd_for_unknown_subscr() );
execute( TC_proc_ss_for_unknown_session() );
+ execute( TC_proc_ss_paging_fail() );
execute( TC_cipher_complete_with_invalid_cipher() );
execute( TC_cipher_complete_1_without_cipher() );