Change in osmo-ttcn3-hacks[master]: msc: Introduce test TC_lu_imsi_timeout_tmsi_realloc

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Jan 1 16:12:20 UTC 2020


laforge has submitted this change. ( 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

Related: OS#4336, OS#4337
Change-Id: I603b2b2b1ae7edd6360ea38c6bbbfedc46e9fa5d
---
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
M msc/MSC_Tests_Iu.ttcn
M msc/expected-results.xml
4 files changed, 78 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



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..05d0ef6 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -561,6 +561,61 @@
 	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 @@
 	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() );
diff --git a/msc/expected-results.xml b/msc/expected-results.xml
index 96af4a4..f94c781 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -7,6 +7,11 @@
   <testcase classname='MSC_Tests' name='TC_lu_imsi_timeout_gsup' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_lu_imsi_auth_tmsi' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_lu_imsi_auth3g_tmsi' time='MASKED'/>
+  <testcase classname='MSC_Tests' name='TC_lu_imsi_timeout_tmsi_realloc' time='MASKED'>
+    <failure type='fail-verdict'>Timeout waiting for ClearCommand/Release
+      MSC_Tests.ttcn:MASKED TC_lu_imsi_timeout_tmsi_realloc testcase
+    </failure>
+  </testcase>
   <testcase classname='MSC_Tests' name='TC_cmserv_imsi_unknown' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_lu_and_mo_call' time='MASKED'/>
   <testcase classname='MSC_Tests' name='TC_lu_auth_sai_timeout' time='MASKED'/>
@@ -126,6 +131,11 @@
     </failure>
   </testcase>
   <testcase classname='MSC_Tests_Iu' name='TC_iu_lu_imsi_auth3g_tmsi' time='MASKED'/>
+  <testcase classname='MSC_Tests_Iu' name='TC_iu_lu_imsi_timeout_tmsi_realloc' time='MASKED'>
+    <failure type='fail-verdict'>Timeout waiting for ClearCommand/Release
+      MSC_Tests_Iu.ttcn:MASKED TC_iu_lu_imsi_timeout_tmsi_realloc testcase
+    </failure>
+  </testcase>
   <testcase classname='MSC_Tests_Iu' name='TC_iu_cmserv_imsi_unknown' time='MASKED'>
     <failure type='fail-verdict'>Tguard timeout
       MSC_Tests_Iu.ttcn:MASKED MSC_Tests_Iu control part

-- 
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: 4
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200101/4030eb5f/attachment.htm>


More information about the gerrit-log mailing list