Change in osmo-ttcn3-hacks[master]: MSC/SMPP: introduce TC_smpp_mo_sms_rp_error for OS#3880

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Wed Jan 15 04:46:08 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16882 )


Change subject: MSC/SMPP: introduce TC_smpp_mo_sms_rp_error for OS#3880
......................................................................

MSC/SMPP: introduce TC_smpp_mo_sms_rp_error for OS#3880

This test case reproduces the problem described in OS#3880:

  1. MS/UE submits a MO SMS which it getting touted to an ESME;
  2. MSC prematurely responds with RP-ACK to the MS/UE;
  3. ESME responds with DELIVER-SM error;
  4. SMS transaction is already terminated (by RP-ACK).

Expected behaviour:

  1. MS/UE submits a MO SMS which it getting touted to an ESME;
  2. ESME responds with DELIVER-SM error;
  3. MSC terminates the SMS transaction with RP-ERROR.

Change-Id: I33c6ea0ffdf8b8a45f587d690bdceb38fc42c898
Related: OS#3880
---
M msc/MSC_Tests.ttcn
M msc/expected-results.xml
2 files changed, 46 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/82/16882/1

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 2859067..63cf2b1 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2114,6 +2114,50 @@
 	f_vty_config2(MSCVTY, { "smpp", "esme msc_tester"}, "no default-route");
 }
 
+/* Test case for OS#3880: make sure that RP-ERROR from ESME is properly sent to the MS/UE */
+friend function f_tc_smpp_mo_sms_rp_error(charstring id, BSC_ConnHdlrPars pars)
+runs on BSC_ConnHdlr {
+	var SmsParameters spars := valueof(t_SmsPars);
+	var SMPP_PDU smpp_pdu;
+	timer T := 3.0;
+
+	f_init_handler(pars);
+
+	/* Perform location update */
+	f_perform_lu();
+
+	/* MS/UE submits a MO SMS */
+	f_establish_fully(EST_TYPE_MO_SMS);
+	f_mo_sms_submit(spars);
+
+	/* ESME responds with an error (Invalid Destination Address) */
+	T.start;
+	alt {
+	[] SMPP.receive(tr_SMPP(c_SMPP_command_id_deliver_sm, ESME_ROK, body := ?)) -> value smpp_pdu {
+		SMPP.send(ts_SMPP_DELIVER_SM_resp(ESME_RINVDSTADR, smpp_pdu.header.seq_num));
+		}
+	[] SMPP.receive(tr_SMPP(c_SMPP_command_id_alert_notification, ESME_ROK)) { repeat; }
+	[] T.timeout {
+		setverdict(fail, "Timeout waiting for SMPP DELIVER-SM");
+		mtc.stop;
+		}
+	}
+
+	/* Expect RP-ERROR on BSSAP interface */
+	spars.exp_rp_err := 1; /* FIXME: GSM411_RP_CAUSE_MO_NUM_UNASSIGNED */
+	f_mo_sms_wait_rp_ack(spars);
+
+	f_expect_clear();
+}
+testcase TC_smpp_mo_sms_rp_error() runs on MTC_CT {
+	var BSC_ConnHdlr vc_conn;
+	f_init();
+	f_vty_config2(MSCVTY, { "smpp", "esme msc_tester"}, "default-route");
+	vc_conn := f_start_handler(refers(f_tc_smpp_mo_sms_rp_error), 45);
+	vc_conn.done;
+	f_vty_config2(MSCVTY, { "smpp", "esme msc_tester"}, "no default-route");
+}
+
 
 /* Test MO-SMS from MS/BTS/BSC towards HLR (via GSUP) */
 friend function f_tc_gsup_mo_sms(charstring id, BSC_ConnHdlrPars pars)
@@ -5857,6 +5901,7 @@
 	execute( TC_lu_and_mt_sms_paging_and_nothing() );
 	execute( TC_lu_and_mt_sms_paging_repeated() );
 	execute( TC_smpp_mo_sms() );
+	execute( TC_smpp_mo_sms_rp_error() );
 	execute( TC_smpp_mt_sms() );
 
 	execute( TC_gsup_mo_sms() );
diff --git a/msc/expected-results.xml b/msc/expected-results.xml
index 074eeb1..02f6882 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -54,6 +54,7 @@
   <testcase classname='MSC_Tests' name='TC_lu_and_mt_sms' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_lu_and_mt_sms_paging_and_nothing' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_smpp_mo_sms' time='MASKED'/>
+  <testcase classname='MSC_Tests' name='TC_smpp_mo_sms_rp_error' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_smpp_mt_sms' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_gsup_mo_sms' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_gsup_mo_smma' time='MASKED'/>

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16882
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I33c6ea0ffdf8b8a45f587d690bdceb38fc42c898
Gerrit-Change-Number: 16882
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200115/b4317c8e/attachment.htm>


More information about the gerrit-log mailing list