Change in osmo-ttcn3-hacks[master]: MSC_Tests: Add testcase to simulate VLR/HLR failure (SGsAP)

dexter gerrit-no-reply at lists.osmocom.org
Tue Apr 9 15:39:14 UTC 2019


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/13558


Change subject: MSC_Tests: Add testcase to simulate VLR/HLR failure (SGsAP)
......................................................................

MSC_Tests: Add testcase to simulate VLR/HLR failure (SGsAP)

Currently we do not simulate a situation where the HLR is unreachable to
the MSC. Lets add a test wehere the HLR is disconnected and an LU via
SGsAP is tried. The SGs interface should then carry out a reset
procedure.

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



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

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 1a6e8f7..13d1ddb 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -4627,6 +4627,43 @@
 	vc_conn.done;
 }
 
+/* Simulate an HLR/VLR failure */
+private function f_tc_sgsap_vlr_failure(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
+	var octetstring mme_name := f_enc_dns_hostname(mp_mme_name);
+	var octetstring vlr_name := f_enc_dns_hostname(mp_vlr_name);
+
+	var PDU_SGsAP lur;
+
+	f_init_handler(pars);
+
+	/* Attempt location update (which is expected to fail) */
+	lur := valueof(ts_SGsAP_LU_REQ(g_pars.imsi, mme_name, IMSI_attach,
+					ts_SGsAP_LAI('901'H, '70'H, 2342)));
+	SGsAP.send(lur);
+
+	/* Respond to SGsAP-RESET-INDICATION from VLR */
+	alt {
+	[] SGsAP.receive(tr_SGsAP_RESET_IND_VLR(vlr_name)); {
+		SGsAP.send(valueof(ts_SGsAP_RESET_ACK_MME(mme_name)));
+		setverdict(pass);
+		}
+	[] SGsAP.receive {
+		setverdict(fail, "Received unexpected message on SGs");
+		}
+	}
+
+	f_sleep(1.0);
+	setverdict(pass);
+}
+testcase TC_sgsap_vlr_failure() runs on MTC_CT {
+	var BSC_ConnHdlrPars pars;
+	var BSC_ConnHdlr vc_conn;
+	f_init(1, true, false);
+	pars := f_init_pars(11811, true, false);
+	vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_vlr_failure), pars);
+	vc_conn.done;
+}
+
 /* SGs TODO:
    * LU attempt for IMSI without NAM_PS in HLR
    * LU attempt with AUTH FAIL due to invalid RES/SRES
@@ -4729,6 +4766,7 @@
 	execute( TC_sgsap_unsol_ud() );
 	execute( TC_bssap_lu_sgsap_lu_and_mt_call() );
 	execute( TC_sgsap_lu_and_mt_call() );
+	execute( TC_sgsap_vlr_failure() );
 
 	/* Run this last: at the time of writing this test crashes the MSC */
 	execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() );
diff --git a/msc/expected-results.xml b/msc/expected-results.xml
index 2c0083c..78b0099 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -90,6 +90,7 @@
   <testcase classname='MSC_Tests' name='TC_sgsap_unsol_ud' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_bssap_lu_sgsap_lu_and_mt_call' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_sgsap_lu_and_mt_call' time='MASKED'/>
+  <testcase classname='MSC_Tests' name='TC_sgsap_vlr_failure' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_gsup_mt_multi_part_sms' time='MASKED'>
     <failure type='fail-verdict'>Tguard timeout

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I830d0b936cbe9d73d1e0b1f4792c2be3d0b08cb9
Gerrit-Change-Number: 13558
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190409/80055f4b/attachment.html>


More information about the gerrit-log mailing list