summaryrefslogtreecommitdiffstats
path: root/msc/MSC_Tests.ttcn
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-12-17 17:02:54 +0100
committerlaforge <laforge@osmocom.org>2020-01-01 16:12:20 +0000
commitd3d54a91fab60b2299087a092a3935ed7de73616 (patch)
treed9b248ea3d21691e66b2ea0cbc6223bfed822d00 /msc/MSC_Tests.ttcn
parent461ed61e4d8c3b1b9e21c62d27b7050307d9555d (diff)
msc: Introduce test TC_lu_imsi_timeout_tmsi_realloc
Diffstat (limited to 'msc/MSC_Tests.ttcn')
-rw-r--r--msc/MSC_Tests.ttcn56
1 files changed, 56 insertions, 0 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index e2728d3..05d0ef6 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -561,6 +561,61 @@ testcase TC_lu_imsi_auth3g_tmsi() runs on MTC_CT {
vc_conn.done;
}
+/* Proceed with LU but never receive an TMSI Realloc from MS after LU Accept (OS#4337).
+ * TS 24.008 sec 4.3.1.5 states MSC should simply release all MM connections.
+ */
+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;
+ }
+ }
+
+ /* currently (due to bug OS#4337), an extra LU reject is received before
+ terminating the connection. Enabling following line makes the test
+ pass: */
+ //f_expect_lu_reject('16'O); /* Cause: congestion */
+
+ /* f_expect_lu_reject() already waits for T"-1" (X1, 5 seconds), but give some
+ extra time to avoid race conditons... */
+ f_expect_clear(7.0);
+
+ 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 +5774,7 @@ control {
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() );