diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2024-03-25 04:21:48 +0100 |
---|---|---|
committer | fixeria <vyanitskiy@sysmocom.de> | 2024-04-15 15:18:28 +0000 |
commit | a8a2c5e5f6fc150c1e34243a740a1a66e908b8ac (patch) | |
tree | e6919cbb2cdee6999757e34f03ec8d186494e2e2 | |
parent | 392de2d5c57c1a9aab4d085d16caaef8ec2ef901 (diff) |
msc: add TC_lu_tmsi_noauth_notmsi
Add test case for handling a LU by TMSI MI when 'no assign-tmsi' is
configured.
This test will pass from osmo-msc patch
I583682d1a35a70b008d7bb2d89ba7c3109a60b21 on
Depends: osmo-msc I583682d1a35a70b008d7bb2d89ba7c3109a60b21
Related: SYS#6860 OS#4721
Change-Id: If10b9987395670b084ff8ad6d1f033ff46896d75
-rw-r--r-- | msc/MSC_Tests.ttcn | 42 | ||||
-rw-r--r-- | msc/expected-results.xml | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 3effd524..2923a623 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -7289,10 +7289,52 @@ testcase TC_lu_and_mt_csd() runs on MTC_CT { vc_conn.done; } +/* MSC <-> BSC: ID req/rsp for IMSI */ +private altstep as_id_req_imsi() +runs on BSC_ConnHdlr { + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_ID_Req(CM_ID_TYPE_IMSI))) { + var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_MM_ID_Rsp(mi))); + repeat; + } +} + +/* MSC is configured to not assign a TMSI; MS sends LU Request with a TMSI MI (from another cell), and MSC shall not use + * that TMSI. */ +private function f_tc_lu_tmsi_noauth_notmsi(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars, t_guard := 20.0); + + /* Perform Location Updating using an unknown TMSI MI. Expect an ID Request to come from the MSC and answer + * that with as_id_req_imsi(). */ + activate(as_id_req_imsi()); + f_perform_lu(use_mi := ts_MI_TMSI_LV(pars.tmsi)); + + f_sleep(1.0); + + /* Attached by invalid TMSI, and the MSC has asked for the IMSI. Initiate Paging and make sure the MSC doesn't + * use the invalid TMSI for it. */ + f_ran_register_imsi(g_pars.imsi, omit); + f_vty_transceive(MSCVTY, "subscriber imsi " & hex2str(g_pars.imsi) & " paging"); + f_expect_paging_tmsi(omit); +} +testcase TC_lu_tmsi_noauth_notmsi() runs on MTC_CT { + var BSC_ConnHdlrPars pars; + var BSC_ConnHdlr vc_conn; + f_init(); + f_vty_config(MSCVTY, "msc", "no assign-tmsi"); + pars := f_init_pars(101); + pars.net.expect_tmsi := false; + pars.tmsi := '0badbad0'O; + pars.mm_info := false; + vc_conn := f_start_handler_with_pars(refers(f_tc_lu_tmsi_noauth_notmsi), pars); + vc_conn.done; +} + control { execute( TC_cr_before_reset() ); execute( TC_lu_imsi_noauth_tmsi() ); execute( TC_lu_imsi_noauth_notmsi() ); + execute( TC_lu_tmsi_noauth_notmsi() ); execute( TC_lu_imsi_reject() ); execute( TC_lu_imsi_timeout_gsup() ); execute( TC_lu_imsi_auth_tmsi() ); diff --git a/msc/expected-results.xml b/msc/expected-results.xml index f8fa0ec8..b6e0bb29 100644 --- a/msc/expected-results.xml +++ b/msc/expected-results.xml @@ -3,6 +3,7 @@ <testcase classname='MSC_Tests' name='TC_cr_before_reset' time='MASKED'/> <testcase classname='MSC_Tests' name='TC_lu_imsi_noauth_tmsi' time='MASKED'/> <testcase classname='MSC_Tests' name='TC_lu_imsi_noauth_notmsi' time='MASKED'/> + <testcase classname='MSC_Tests' name='TC_lu_tmsi_noauth_notmsi' time='MASKED'/> <testcase classname='MSC_Tests' name='TC_lu_imsi_reject' time='MASKED'/> <testcase classname='MSC_Tests' name='TC_lu_imsi_timeout_gsup' time='MASKED'/> <testcase classname='MSC_Tests' name='TC_lu_imsi_auth_tmsi' time='MASKED'/> |