summaryrefslogtreecommitdiffstats
path: root/msc
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-01-24 16:57:31 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-02-01 18:55:29 +0000
commit5ac49ccf61b100c1ee519ba5887ade7179269618 (patch)
treeb65bd46466ac6ffb5d4dde5df53495889e286d87 /msc
parentbe1ff4b1773c53a7ee4ae96fd429d9c6f6d168ea (diff)
MSC_Tests.ttcn: introduce TC_gsup_mo_mt_sms_rp_mr
The idea of this test case is to verify SM-RP-MR assignment for a few concurrent MO/MT SMS being sent over GSUP. Basically, the algorythm is the following: 1.0 establish a RAN connection, 1.1 send CM Service Request for MO SMMA indication, 1.2 submit MO SMMA indication on DTAP, 1.3 expect MO-ForwardSM-Req on GSUP, 2.0 send MT SMS using MT-ForwardSM-Req on GSUP, 2.1 expect CP-DATA/RP-DATA for MT SMS on DTAP, 3.0 compare both SM-RP-MR values (for MT, assigned by the MSC), 3.1 send MO-ForwardSM-Res for MO SMMA on GSUP, 3.1.1 expect CP-DATA/RP-ACK for MO SMMA on DTAP, 3.2 send CP-DATA/RP-ACK for MT SMS on DTAP, 3.2.1 expect MT-ForwardSM-Res for MT SMS on GSUP. Change-Id: I17cbbaa64d9bce770f985588e93cd3eecd732120
Diffstat (limited to 'msc')
-rw-r--r--msc/MSC_Tests.ttcn105
-rw-r--r--msc/expected-results.xml1
2 files changed, 106 insertions, 0 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index fb0798c..8d29e7a 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2521,6 +2521,110 @@ testcase TC_gsup_mt_sms_rp_mr() runs on MTC_CT {
f_vty_config(MSCVTY, "msc", "no sms-over-gsup");
}
+/* Test SM-RP-MR assignment for MT-SMS over GSUP */
+private function f_tc_gsup_mo_mt_sms_rp_mr(charstring id, BSC_ConnHdlrPars pars)
+runs on BSC_ConnHdlr {
+ var SmsParameters spars_mo := valueof(t_SmsPars); /* MO SMMA */
+ var SmsParameters spars_mt := valueof(t_SmsPars); /* MT SMS */
+
+ f_init_handler(pars);
+
+ /* We need to inspect GSUP activity */
+ f_create_gsup_expect(hex2str(g_pars.imsi));
+
+ /* Perform location update */
+ f_perform_lu();
+
+ /* Register an 'expect' for given IMSI (+TMSI) */
+ if (isvalue(g_pars.tmsi)) {
+ f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ } else {
+ f_bssmap_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
+ }
+
+ /* Send CM Service Request for MO SMMA */
+ f_establish_fully(EST_TYPE_MO_SMS);
+
+ /* Submit MO SMMA on DTAP */
+ log("Submit MO SMMA on DTAP, SM-RP-MR is '00'O");
+ spars_mo.rp.msg_ref := '00'O;
+ f_mo_smma(spars_mo);
+
+ /* Expect MO-forwardSM-Req for MO SMMA on GSUP */
+ alt {
+ [] GSUP.receive(tr_GSUP_MO_READY_FOR_SM_REQ(
+ imsi := g_pars.imsi,
+ sm_rp_mr := spars_mo.rp.msg_ref,
+ sm_alert_rsn := GSUP_SM_ALERT_RSN_TYPE_MEM_AVAIL
+ )) {
+ log("RX MO-ReadyForSM-Req, SM-RP-MR is '00'O");
+ setverdict(pass);
+ }
+ [] GSUP.receive {
+ log("RX unexpected GSUP message");
+ setverdict(fail);
+ mtc.stop;
+ }
+ }
+
+ /* Submit MT SMS on GSUP */
+ log("TX MT-forwardSM-Req for the MT SMS");
+ f_gsup_forwardSM_req(spars_mt);
+
+ /* Wait for MT SMS on DTAP */
+ f_mt_sms_expect(spars_mt);
+ log("RX MT SMS on DTAP, DTAP TID is ", spars_mt.tid,
+ ", SM-RP-MR is ", spars_mt.rp.msg_ref);
+
+ /* Both SM-RP-MR values shall be different */
+ if (spars_mo.rp.msg_ref == spars_mt.rp.msg_ref) {
+ log("Both SM-RP-MR values shall be different");
+ setverdict(fail);
+ }
+
+ /* SM-RP-MR value for MT SMS shall be assigned */
+ if (spars_mt.rp.msg_ref == 'FF'O) {
+ log("Unassigned SM-RP-MR value for the MT SMS");
+ setverdict(fail);
+ }
+
+ /* Trigger RP-ACK for MO SMMA by sending MO-forwardSM-Res */
+ GSUP.send(valueof(ts_GSUP_MO_READY_FOR_SM_RES(
+ imsi := g_pars.imsi,
+ sm_rp_mr := spars_mo.rp.msg_ref)));
+ /* Expect RP-ACK for MO SMMA on DTAP */
+ f_mo_sms_wait_rp_ack(spars_mo);
+
+ /* Send RP-ACK for MT SMS and expect MT-forwardSM-Res on GSUP */
+ f_mt_sms_send_rp_ack(spars_mt);
+ alt {
+ [] GSUP.receive(tr_GSUP_MT_FORWARD_SM_RES(
+ imsi := g_pars.imsi,
+ sm_rp_mr := spars_mt.rp.msg_ref
+ )) {
+ log("RX MT-forwardSM-Res (RP-ACK)");
+ setverdict(pass);
+ }
+ [] GSUP.receive {
+ log("RX unexpected GSUP message");
+ setverdict(fail);
+ mtc.stop;
+ }
+ }
+
+ f_expect_clear();
+}
+testcase TC_gsup_mo_mt_sms_rp_mr() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
+ var BSC_ConnHdlr vc_conn;
+ f_init();
+ pars := f_init_pars(93);
+ f_vty_config(MSCVTY, "msc", "sms-over-gsup");
+ vc_conn := f_start_handler_with_pars(refers(f_tc_gsup_mo_mt_sms_rp_mr), pars);
+ vc_conn.done;
+ f_vty_config(MSCVTY, "msc", "no sms-over-gsup");
+}
+
/* Test multi-part MT-SMS over GSUP */
private function f_tc_gsup_mt_multi_part_sms(charstring id, BSC_ConnHdlrPars pars)
runs on BSC_ConnHdlr {
@@ -4457,6 +4561,7 @@ control {
execute( TC_gsup_mt_sms_ack() );
execute( TC_gsup_mt_sms_err() );
execute( TC_gsup_mt_sms_rp_mr() );
+ execute( TC_gsup_mo_mt_sms_rp_mr() );
execute( TC_gsup_mt_multi_part_sms() );
execute( TC_lu_and_mo_ussd_single_request() );
diff --git a/msc/expected-results.xml b/msc/expected-results.xml
index 84df264..efe7219 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -59,6 +59,7 @@
<testcase classname='MSC_Tests' name='TC_gsup_mt_sms_ack' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_gsup_mt_sms_err' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_gsup_mt_sms_rp_mr' time='MASKED'/>
+ <testcase classname='MSC_Tests' name='TC_gsup_mo_mt_sms_rp_mr' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_gsup_mt_multi_part_sms' time='MASKED'>
<failure type='fail-verdict'>Tguard timeout
MSC_Tests.ttcn:MASKED MSC_Tests control part