laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14474 )
Change subject: MSC_Tests.ttcn: introduce TC_proc_ss_paging_fail ...................................................................... MSC_Tests.ttcn: introduce TC_proc_ss_paging_fail The idea of this test case is to check that OsmoMSC does inform HLR/EUSE that a subscriber did not respond to Paging Request in case of network-originated SS/USSD. Both f_expect_gsup_msg() and f_expect_dtap_msg() were extended with optional timeout value, as we need to wait longer than 2.0 seconds (default). Let's stick to 10.0 seconds. Change-Id: I1f53c56d569c8ac4071835685bbe3bc9e0ebd7f0 Related: OS#2931 --- M msc/MSC_Tests.ttcn 1 file changed, 64 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index f9b2d03..b5a3ba7 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -2817,10 +2817,11 @@ } } -private function f_expect_gsup_msg(template GSUP_PDU msg) +private function f_expect_gsup_msg(template GSUP_PDU msg, + float T_val := 2.0) runs on BSC_ConnHdlr return GSUP_PDU { var GSUP_PDU gsup_msg_complete; - timer T := 2.0; + timer T := T_val; T.start; alt { @@ -2837,10 +2838,11 @@ return gsup_msg_complete; } -private function f_expect_mt_dtap_msg(template PDU_ML3_NW_MS msg) +private function f_expect_mt_dtap_msg(template PDU_ML3_NW_MS msg, + float T_val := 2.0) runs on BSC_ConnHdlr return PDU_ML3_NW_MS { var PDU_DTAP_MT bssap_msg_complete; - timer T := 2.0; + timer T := T_val; T.start; alt { @@ -3549,6 +3551,63 @@ vc_conn.done; } +/* MT (network-originated) USSD and no response to Paging Request */ +friend function f_tc_proc_ss_paging_fail(charstring id, BSC_ConnHdlrPars pars) +runs on BSC_ConnHdlr { + timer TP := 2.0; /* Paging timer */ + + f_init_handler(pars); + + /* Perform location update */ + f_perform_lu(); + + f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O); + f_create_gsup_expect(hex2str(g_pars.imsi)); + + var template (value) GSUP_PDU gsup_req := ts_GSUP_PROC_SS_REQ( + imsi := g_pars.imsi, + sid := '20000444'O, + state := OSMO_GSUP_SESSION_STATE_BEGIN, + ss := f_rnd_octstring(23) + ); + + /* Error with some cause value */ + var template GSUP_PDU gsup_rsp := tr_GSUP_PROC_SS_ERR( + imsi := g_pars.imsi, + sid := '20000444'O, + state := OSMO_GSUP_SESSION_STATE_END, + cause := ? /* FIXME: introduce an enumerated type! */ + ); + + /* Initiate a MT USSD notification */ + GSUP.send(gsup_req); + + /* Send it to MSC and expect Paging Request */ + TP.start; + alt { + [pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)) { + setverdict(pass); + } + [not pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { + setverdict(pass); + } + /* We don't expect anything else */ + [] as_unexp_gsup_or_bssap_msg(); + [] TP.timeout { + setverdict(fail, "Timeout waiting for Paging Request"); + } + } + + /* Expect GSUP PROC_SS_ERROR message */ + f_expect_gsup_msg(gsup_rsp, T_val := 10.0); +} +testcase TC_proc_ss_paging_fail() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_tc_proc_ss_paging_fail), 101); + vc_conn.done; +} + /* A5/1 only permitted on network side; attempt an invalid CIPHER MODE COMPLETE with A5/3 which MSC should reject. */ private function f_tc_cipher_complete_with_invalid_cipher(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { @@ -5399,6 +5458,7 @@ execute( TC_mt_ussd_for_unknown_subscr() ); execute( TC_proc_ss_for_unknown_session() ); + execute( TC_proc_ss_paging_fail() ); execute( TC_cipher_complete_with_invalid_cipher() ); execute( TC_cipher_complete_1_without_cipher() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14474 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: I1f53c56d569c8ac4071835685bbe3bc9e0ebd7f0 Gerrit-Change-Number: 14474 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilira...@gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <lafo...@gnumonks.org> Gerrit-MessageType: merged