Change in osmo-ttcn3-hacks[master]: gbproxy: Test for SGSN-INVOKE-TRACE

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
Sat Nov 28 15:37:48 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21391 )

Change subject: gbproxy: Test for SGSN-INVOKE-TRACE
......................................................................

gbproxy: Test for SGSN-INVOKE-TRACE

Change-Id: I1e46e5c403712eb7972c57e6b6f6eb0850b96ae3
---
M gbproxy/GBProxy_Tests.ttcn
M library/BSSGP_Emulation.ttcnpp
M library/Osmocom_Gb_Types.ttcn
3 files changed, 96 insertions(+), 2 deletions(-)

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



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 9e11fc8..48d2805 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -1841,6 +1841,46 @@
 	f_cleanup();
 }
 
+private altstep as_bssgp_g_pcu_count(integer pcu_idx, template (present) PDU_BSSGP exp_rx, inout ro_integer roi)
+runs on GlobalTest_CT {
+[] G_PCU[pcu_idx].receive(exp_rx) from g_pcu[pcu_idx].vc_BSSGP {
+	if (ro_integer_contains(roi, pcu_idx)) {
+		setverdict(fail, "Received multiple on same SIG BVC");
+	}
+	roi := roi & { pcu_idx };
+	repeat;
+	}
+}
+/* send a INVOKE-TRACE from SGSN and expect to receive a copy on each NSE */
+testcase TC_trace() runs on GlobalTest_CT
+{
+	var BSSGP_ConnHdlr vc_conn;
+	f_init();
+	f_global_init();
+
+	var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_INVOKE_TRACE('23'O, '4321'O);
+	var template (present) PDU_BSSGP exp_rx := ts_BSSGP_INVOKE_TRACE('23'O, '4321'O);
+
+	var ro_default defaults := {};
+	for (var integer i := 0; i < lengthof(g_pcu); i := i+1) {
+		activate(as_bssgp_g_pcu_count(i, exp_rx, g_roi));
+	}
+	G_SGSN[0].send(pdu_tx);
+	f_sleep(2.0);
+	for (var integer i := 0; i < lengthof(defaults); i := i+1) {
+		deactivate(defaults[i]);
+	}
+
+	for (var integer i := 0; i < lengthof(g_pcu); i := i+1) {
+		if (not ro_integer_contains(g_roi, i)) {
+			setverdict(fail, "Failed to receive TRACE on PCU index ", i);
+		}
+	}
+	setverdict(pass);
+
+	f_cleanup();
+}
+
 private function f_block_ptp_bvc_from_pcu(integer pcu_idx, integer bvc_idx) runs on test_CT
 {
 	var BSSGP_BVC_CT bvc_ct := g_pcu[pcu_idx].vc_BSSGP_BVC[bvc_idx];
@@ -2072,6 +2112,7 @@
 	execute( TC_radio_status() );
 	execute( TC_suspend() );
 	execute( TC_resume() );
+	execute( TC_trace() );
 	execute( TC_bvc_block_ptp() );
 	execute( TC_bvc_unblock_ptp() );
 	execute( TC_bvc_reset_ptp_from_bss() );
diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index a65dd87..d747ca2 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -301,7 +301,8 @@
 
 private template PDU_BSSGP tr_GLOBAL := (
 	{pDU_BSSGP_SUSPEND:=?}, {pDU_BSSGP_SUSPEND_ACK:=?}, {pDU_BSSGP_SUSPEND_NACK:=?},
-	{pDU_BSSGP_RESUME:=?}, {pDU_BSSGP_RESUME_ACK:=?}, {pDU_BSSGP_RESUME_NACK:=?}
+	{pDU_BSSGP_RESUME:=?}, {pDU_BSSGP_RESUME_ACK:=?}, {pDU_BSSGP_RESUME_NACK:=?},
+	{pDU_BSSGP_SGSN_INVOKE_TRACE:=?}
 );
 
 /* We are in BVC_S_UNBLOCKED state */
diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index 30eb09f..7894cf1 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -2023,7 +2023,59 @@
 		}
 	}
 
-
+	/* 10.4.15 */
+	template (value) PDU_BSSGP
+	ts_BSSGP_INVOKE_TRACE(OCT1 eq_trace, OCT2 ref) := {
+		pDU_BSSGP_SGSN_INVOKE_TRACE := {
+			bssgpPduType := '40'O,
+			traceType := {
+				iEI := '22'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 1
+				},
+				equipment_Trace := eq_trace
+			},
+			traceReference := {
+				iEI := '21'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 2
+				},
+				trace_Reference := ref
+			},
+			triggerId := omit,
+			mobileId := omit,
+			omcId := omit,
+			transactionId := omit
+		}
+	}
+	template (present) PDU_BSSGP
+	tr_BSSGP_INVOKE_TRACE(template (present) OCT1 eq_trace, template (present) OCT2 ref) := {
+		pDU_BSSGP_SGSN_INVOKE_TRACE := {
+			bssgpPduType := '40'O,
+			traceType := {
+				iEI := '22'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 1
+				},
+				equipment_Trace := eq_trace
+			},
+			traceReference := {
+				iEI := '21'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 2
+				},
+				trace_Reference := ref
+			},
+			triggerId := *,
+			mobileId := *,
+			omcId := *,
+			transactionId := *
+		}
+	}
 
 	/* PDU permitted on PTP BVC only (TS 48.018 Section 5.4.1) */
 	template (present) PDU_BSSGP tr_BSSGP_PERMITTED_PTP_ONLY := (

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21391
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: I1e46e5c403712eb7972c57e6b6f6eb0850b96ae3
Gerrit-Change-Number: 21391
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201128/e5df2e5c/attachment.htm>


More information about the gerrit-log mailing list