[MERGED] osmo-ttcn3-hacks[master]: msc: Test closing BSSAP connection of LU by ClearCommand

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Jan 24 21:59:48 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: msc: Test closing BSSAP connection of LU by ClearCommand
......................................................................


msc: Test closing BSSAP connection of LU by ClearCommand

Change-Id: I9194da2f9324ee17c920458cb920a6fa718ac739
---
M library/BSSMAP_Templates.ttcn
M msc_tests/MSC_Tests.ttcn
2 files changed, 44 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 925a8e6..5331505 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -609,6 +609,18 @@
 	}
 }
 
+template (value) PDU_BSSAP ts_BSSMAP_ClearRequest(BssmapCause cause)
+modifies ts_BSSAP_BSSMAP := {
+	pdu := {
+		bssmap := {
+			clearRequest := {
+				messageType := '22'O,	/* overwritten */
+				cause := ts_BSSMAP_IE_Cause(cause)
+			}
+		}
+	}
+}
+
 template PDU_BSSAP tr_BSSMAP_ClearRequest modifies tr_BSSAP_BSSMAP := {
 	pdu := {
 		bssmap := {
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 9f8dd69..a21ad50 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -588,6 +588,38 @@
 	vc_conn.done;
 }
 
+/* Test LU but BSC will send a clear request in the middle */
+private function f_tc_lu_clear_request(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
+	g_pars := 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 */
+	f_bssap_compl_l3(l3_lu);
+
+	/* Send Early Classmark, just for the fun of it */
+	BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
+
+	f_sleep(1.0);
+	/* send clear request in the middle of the LU */
+	BSSAP.send(ts_BSSMAP_ClearRequest(0));
+	BSSAP.receive(tr_BSSMAP_ClearCommand);
+	BSSAP.send(ts_BSSMAP_ClearComplete);
+	BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+	setverdict(pass);
+}
+testcase TC_lu_clear_request() runs on MTC_CT {
+	var BSC_ConnHdlr vc_conn;
+	f_init();
+
+	vc_conn := f_start_handler(refers(f_tc_lu_clear_request), testcasename(), 8);
+	vc_conn.done;
+}
+
 
 
 control {

-- 
To view, visit https://gerrit.osmocom.org/6027
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9194da2f9324ee17c920458cb920a6fa718ac739
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list