aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-17 23:00:44 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-06-17 23:02:44 +0700
commitc3c07d4c6e59aec7745e0fcc5d9a18d2cac7c815 (patch)
tree9291d86b336aad332780f64192532e3e826d3aa1
parent095024b5996b4ecc6cd619647c63b661c08bdbe2 (diff)
MSC_Tests.ttcn: introduce TC_mo_ussd_for_unknown_trans
The new test case is aimed to verify that OsmoMSC properly does reject (call independent) SS/USSD messages for non-existing transactions. Change-Id: I231142c88b0d3308039c797aa2bccadd79dce18b Related: OS#2931
-rw-r--r--msc/MSC_Tests.ttcn60
1 files changed, 60 insertions, 0 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index b0834a45..b00e032e 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -3509,6 +3509,65 @@ testcase TC_mt_ussd_for_unknown_subscr() runs on MTC_CT {
vc_conn.done;
}
+/* MO (mobile-originated) SS/USSD for unknown transaction */
+friend function f_tc_mo_ussd_for_unknown_trans(charstring id, BSC_ConnHdlrPars pars)
+runs on BSC_ConnHdlr {
+ f_init_handler(pars);
+
+ f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
+ f_create_gsup_expect(hex2str(g_pars.imsi));
+
+ /* Perform location update */
+ f_perform_lu();
+
+ /* Send CM Service Request for SS/USSD */
+ f_establish_fully(EST_TYPE_SS_ACT);
+
+ /* GSM 04.80 FACILITY message for a non-existing transaction */
+ var template (value) PDU_ML3_MS_NW mo_ss_fac := ts_ML3_MO_SS_FACILITY(
+ tid := 1, /* An arbitrary transaction identifier */
+ ti_flag := c_TIF_ORIG, /* Sent from the side that originates the TI */
+ facility := f_rnd_octstring(23) /* We don't care about the Facility IE */
+ );
+
+ /* GSM 04.80 RELEASE COMPLETE message for a non-existing transaction */
+ var template (value) PDU_ML3_MS_NW mo_ss_rel := ts_ML3_MO_SS_RELEASE_COMPLETE(
+ tid := 1, /* An arbitrary transaction identifier */
+ ti_flag := c_TIF_ORIG, /* Sent from the side that originates the TI */
+ facility := f_rnd_octstring(23) /* We don't care about the Facility IE */
+ );
+
+ /* Expected response from the network */
+ var template PDU_ML3_NW_MS mt_ss_rel := tr_ML3_MT_SS_RELEASE_COMPLETE(
+ tid := 1, /* Same as in the FACILITY message */
+ ti_flag := c_TIF_REPL, /* Sent to the side that originates the TI */
+ facility := omit
+ );
+
+ /* Send GSM 04.80 FACILITY for non-existing transaction */
+ BSSAP.send(ts_PDU_DTAP_MO(mo_ss_fac));
+
+ /* Expect GSM 04.80 RELEASE COMPLETE message */
+ f_expect_mt_dtap_msg(mt_ss_rel);
+ f_expect_clear();
+
+ /* Send another CM Service Request for SS/USSD */
+ f_establish_fully(EST_TYPE_SS_ACT);
+
+ /* Send GSM 04.80 RELEASE COMPLETE for non-existing transaction */
+ BSSAP.send(ts_PDU_DTAP_MO(mo_ss_rel));
+
+ /* Expect GSM 04.80 RELEASE COMPLETE message */
+ f_expect_mt_dtap_msg(mt_ss_rel);
+ f_expect_clear();
+}
+testcase TC_mo_ussd_for_unknown_trans() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn;
+ f_init();
+ vc_conn := f_start_handler(refers(f_tc_mo_ussd_for_unknown_trans), 111);
+ vc_conn.done;
+}
+
/* MT (network-originated) USSD for unknown session */
friend function f_tc_proc_ss_for_unknown_session(charstring id, BSC_ConnHdlrPars pars)
runs on BSC_ConnHdlr {
@@ -5542,6 +5601,7 @@ control {
execute( TC_lu_and_ss_session_timeout() );
execute( TC_mt_ussd_for_unknown_subscr() );
+ execute( TC_mo_ussd_for_unknown_trans() );
execute( TC_proc_ss_for_unknown_session() );
execute( TC_proc_ss_paging_fail() );
execute( TC_proc_ss_abort() );