This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16648 ) Change subject: msc: Introduce test TC_lu_imsi_timeout_tmsi_realloc ...................................................................... msc: Introduce test TC_lu_imsi_timeout_tmsi_realloc Change-Id: I603b2b2b1ae7edd6360ea38c6bbbfedc46e9fa5d --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn M msc/MSC_Tests_Iu.ttcn 3 files changed, 64 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/48/16648/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index cd1a114..1ce0b69 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -642,13 +642,13 @@ setverdict(pass); } -function f_expect_lu_reject() runs on BSC_ConnHdlr { +function f_expect_lu_reject(template OCT1 cause := ?) runs on BSC_ConnHdlr { var PDU_DTAP_MT dtap_mt; timer T := 5.0; T.start; alt { - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej(cause))) { setverdict(pass); } [] BSSAP.receive(tr_PDU_DTAP_MT(?)) -> value dtap_mt { diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index e2728d3..02786eb 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -561,6 +561,57 @@ vc_conn.done; } +/* Proceed with LU but never receive an TMSI Realloc from MS after LU Accept. +/* MSC sends a LU REJECT after X1 times out (5 seconds by default) */ +friend function f_tc_lu_imsi_timeout_tmsi_realloc(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + + f_init_handler(pars); + + var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi); + var PDU_DTAP_MT dtap_mt; + + /* tell GSUP dispatcher to send this IMSI to us */ + f_create_gsup_expect(hex2str(g_pars.imsi)); + + /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */ + if (g_pars.ran_is_geran) { + f_bssap_compl_l3(l3_lu); + if (g_pars.send_early_cm) { + BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3)); + } + } else { + f_ranap_initial_ue(l3_lu); + } + + f_mm_imei_early(); + f_mm_common(); + f_msc_lu_hlr(); + f_mm_imei(); + + alt { + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Acc)) -> value dtap_mt {} + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { + setverdict(fail, "Expected LU ACK, but received LU REJ"); + mtc.stop; + } + } + + /* f_expect_lu_reject() already waits for T"-1" (X1, 5 seconds), but give some + extra time to avoid race conditons... */ + f_sleep(1.0) + f_expect_lu_reject('16'O); /* Cause: congestion */ + f_expect_clear(); + + setverdict(pass); +} +testcase TC_lu_imsi_timeout_tmsi_realloc() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + + vc_conn := f_start_handler(refers(f_tc_lu_imsi_timeout_tmsi_realloc), 5); + vc_conn.done; +} + /* Send CM SERVICE REQ for IMSI that has never performed LU before */ friend function f_tc_cmserv_imsi_unknown(charstring id, BSC_ConnHdlrPars pars) @@ -5719,6 +5770,7 @@ execute( TC_lu_imsi_timeout_gsup() ); execute( TC_lu_imsi_auth_tmsi() ); execute( TC_lu_imsi_auth3g_tmsi() ); + execute( TC_lu_imsi_timeout_tmsi_realloc() ); execute( TC_cmserv_imsi_unknown() ); execute( TC_lu_and_mo_call() ); execute( TC_lu_auth_sai_timeout() ); diff --git a/msc/MSC_Tests_Iu.ttcn b/msc/MSC_Tests_Iu.ttcn index 9ea0c76..b80005e 100644 --- a/msc/MSC_Tests_Iu.ttcn +++ b/msc/MSC_Tests_Iu.ttcn @@ -56,6 +56,15 @@ vc_conn.done; } +testcase TC_iu_lu_imsi_timeout_tmsi_realloc() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(3); + f_vty_config(MSCVTY, "network", "authentication required"); + + vc_conn := f_start_handler(refers(f_tc_lu_imsi_timeout_tmsi_realloc), 1005, ran_idx := 2, ran_is_geran := false); + vc_conn.done; +} + testcase TC_iu_cmserv_imsi_unknown() runs on MTC_CT { var BSC_ConnHdlr vc_conn; f_init(3); @@ -424,6 +433,7 @@ execute( TC_iu_lu_imsi_reject() ); execute( TC_iu_lu_imsi_timeout_gsup() ); execute( TC_iu_lu_imsi_auth3g_tmsi() ); + execute( TC_iu_lu_imsi_timeout_tmsi_realloc() ); execute( TC_iu_cmserv_imsi_unknown() ); execute( TC_iu_lu_and_mo_call() ); execute( TC_iu_lu_auth_sai_timeout() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16648 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: I603b2b2b1ae7edd6360ea38c6bbbfedc46e9fa5d Gerrit-Change-Number: 16648 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191217/61c574a2/attachment.htm>