diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2019-04-09 17:36:57 +0200 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2019-04-09 17:36:57 +0200 |
commit | 628c005164ce3b6866a9afafdeca9b6bce5e199d (patch) | |
tree | acd606e1b30c9493d130c00389d4619457d92f2a /msc/MSC_Tests.ttcn | |
parent | c09a13116a5a54ea98e14fe521fa94da0fbf86e6 (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/MSC_Tests.ttcn')
-rw-r--r-- | msc/MSC_Tests.ttcn | 38 |
1 files changed, 38 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() ); |