summaryrefslogtreecommitdiffstats
path: root/msc
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-04-09 17:36:57 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2019-04-09 17:36:57 +0200
commit628c005164ce3b6866a9afafdeca9b6bce5e199d (patch)
treeacd606e1b30c9493d130c00389d4619457d92f2a /msc
parentc09a13116a5a54ea98e14fe521fa94da0fbf86e6 (diff)
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
Diffstat (limited to 'msc')
-rw-r--r--msc/MSC_Tests.ttcn38
-rw-r--r--msc/expected-results.xml1
2 files changed, 39 insertions, 0 deletions
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 @@ testcase TC_sgsap_lu_and_mt_call() runs on MTC_CT {
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 @@ control {
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