Change in osmo-ttcn3-hacks[master]: MSC_Test: Test what happens when Paging for SMS is unanswered

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

dexter gerrit-no-reply at lists.osmocom.org
Mon Jan 14 08:09:57 UTC 2019


dexter has submitted this change and it was merged. ( https://gerrit.osmocom.org/11897 )

Change subject: MSC_Test: Test what happens when Paging for SMS is unanswered
......................................................................

MSC_Test: Test what happens when Paging for SMS is unanswered

Trigger sending of an SM, but ignore any paging requests from the
MSC, make sure that the MSC is not paging indefinitely

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

Approvals:
  Harald Welte: Looks good to me, approved
  Stefan Sperling: 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 05f8fd9..b72c580 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2012,6 +2012,72 @@
 	vc_conn.done;
 }
 
+/* Paging for MT SMS but no response */
+private function f_tc_lu_and_mt_sms_paging_and_nothing(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
+	var SmsParameters spars := valueof(t_SmsPars);
+	var OCT4 tmsi;
+	var integer page_count := 0;
+	f_init_handler(pars, 150.0);
+
+	/* Perform location update */
+	f_perform_lu();
+
+	/* register an 'expect' for given IMSI (+TMSI) */
+	if (isvalue(g_pars.tmsi)) {
+		tmsi := g_pars.tmsi;
+	} else {
+		tmsi := 'FFFFFFFF'O;
+	}
+	f_bssmap_register_imsi(g_pars.imsi, tmsi);
+
+	/* Expect the MSC to page exactly 10 times before giving up */
+	alt {
+		[] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi))
+		{
+			page_count := page_count + 1;
+
+			if (page_count < 10) {
+				repeat;
+			}
+		}
+		[] BSSAP.receive {
+			setverdict(fail, "unexpected BSSAP message received");
+			self.stop;
+		}
+	}
+
+	/* Wait some time to make sure the MSC is not delivering any further
+	 * paging messages or anything else that could be unexpected. */
+	timer T := 20.0;
+	T.start
+	alt {
+		[] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi))
+		{
+			setverdict(fail, "paging seems not to stop!");
+			mtc.stop;
+		}
+		[] BSSAP.receive {
+			setverdict(fail, "unexpected BSSAP message received");
+			self.stop;
+		}
+		[] T.timeout {
+			setverdict(pass);
+		}
+	}
+
+	setverdict(pass);
+}
+testcase TC_lu_and_mt_sms_paging_and_nothing() runs on MTC_CT {
+	var BSC_ConnHdlrPars pars;
+	var BSC_ConnHdlr vc_conn;
+	f_init();
+	pars := f_init_pars(43);
+	vc_conn := f_start_handler_with_pars(refers(f_tc_lu_and_mt_sms_paging_and_nothing), pars);
+	f_sleep(2.0);
+	f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
+	vc_conn.done;
+}
+
 /* mobile originated SMS from MS/BTS/BSC side to SMPP */
 private function f_tc_smpp_mo_sms(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
 	var SmsParameters spars := valueof(t_SmsPars);
@@ -4270,6 +4336,7 @@
 
 	execute( TC_lu_and_mo_sms() );
 	execute( TC_lu_and_mt_sms() );
+	execute( TC_lu_and_mt_sms_paging_and_nothing() );
 	execute( TC_smpp_mo_sms() );
 	execute( TC_smpp_mt_sms() );
 
diff --git a/msc/expected-results.xml b/msc/expected-results.xml
index 8a19d5b..650aefb 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -61,6 +61,7 @@
   <testcase classname='MSC_Tests' name='TC_lu_and_mt_call' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_lu_and_mo_sms' time='MASKED'/>
   <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_mt_sms' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_gsup_mo_sms' time='MASKED'/>

-- 
To view, visit https://gerrit.osmocom.org/11897
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id645729551672026c6a96bb849ecd04f20cd0c56
Gerrit-Change-Number: 11897
Gerrit-PatchSet: 10
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <stsp at stsp.name>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190114/999248e1/attachment.htm>


More information about the gerrit-log mailing list