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

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Jan 15 16:08:33 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16882 )

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

MSC/SMPP: introduce TC_smpp_mo_sms_rp_error for OS#4351

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

  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#4351
---
M msc/MSC_Tests.ttcn
M msc/expected-results.xml
2 files changed, 46 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 13cb8f4..94fac74 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2160,6 +2160,50 @@
 	f_vty_config2(MSCVTY, { "smpp", "esme msc_tester"}, "no default-route");
 }
 
+/* Test case for OS#4351: 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)
@@ -5904,6 +5948,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 e2cca45..68e2958 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -55,6 +55,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: 4
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: keith <keith at rhizomatica.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200115/b92b0db0/attachment.htm>


More information about the gerrit-log mailing list