Change in osmo-ttcn3-hacks[master]: gbproxy: Add test for FLOW-CONTROL-MS procedure (TC_fc_ms)

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
Thu Dec 10 21:14:59 UTC 2020


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

Change subject: gbproxy: Add test for FLOW-CONTROL-MS procedure (TC_fc_ms)
......................................................................

gbproxy: Add test for FLOW-CONTROL-MS procedure (TC_fc_ms)

Change-Id: Ie087ee8e8adfb963d21f35c60628214d4297250d
Closes: SYS#5210
---
M gbproxy/GBProxy_Tests.ttcn
M library/Osmocom_Gb_Types.ttcn
2 files changed, 134 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 5e81c13..655e396 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -2393,6 +2393,37 @@
 	f_cleanup();
 }
 
+/***********************************************************************
+ * FLOW-CONTROL-MS procedure
+ ***********************************************************************/
+
+private function f_TC_fc_ms(charstring id) runs on BSSGP_ConnHdlr {
+	var BssgpBvci bvci := g_pars.pcu[0].cfg.bvc[0].bvci;
+
+	var template (value) PDU_BSSGP fc_tx := ts_BVC_FC_MS(g_pars.tlli, 100, 200, '12'O);
+	/* we cannot use pdu_tx as there are some subtle differences in the length field :/ */
+	var template (present) PDU_BSSGP fc_rx := tr_BVC_FC_MS(g_pars.tlli, 100, 200, '12'O);
+	var template (value) PDU_BSSGP ack_tx := ts_BVC_FC_MS_ACK(g_pars.tlli, '12'O);
+
+	f_pcu2sgsn(fc_tx, fc_rx, use_sig := false);
+	f_sgsn2pcu(ack_tx, ack_tx, use_sig := false);
+
+	setverdict(pass);
+}
+/* Send a FLOW-CONTROL-MS from BSS side and expect it to show up on SGSN (PTP BVC) */
+testcase TC_fc_ms() runs on test_CT
+{
+	var BSSGP_ConnHdlr vc_conn;
+	f_init();
+
+	vc_conn := f_start_handler(refers(f_TC_fc_ms), testcasename(), g_pcu, g_sgsn, 21);
+	vc_conn.done;
+	/* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */
+
+	f_cleanup();
+}
+
+
 
 control {
 	execute( TC_BVC_bringup() );
@@ -2456,6 +2487,7 @@
 
 	execute( TC_flush_ll() );
 	execute( TC_fc_bvc() );
+	execute( TC_fc_ms() );
 }
 
 
diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index ba05f7d..c532772 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -1262,6 +1262,108 @@
 		}
 	}
 
+	template (value) PDU_BSSGP ts_BVC_FC_MS(GprsTlli tlli, uint16_t bmax, uint16_t bucket_leak_rate,
+						OCT1 tag) := {
+		pDU_BSSGP_FLOW_CONTROL_MS := {
+			bssgpPduType := '28'O,
+			tLLI := ts_BSSGP_TLLI(tlli),
+			tag := {
+				iEI := '1E'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 1
+				},
+				unstructured_Value := tag
+			},
+			mS_Bucket_Size := {
+				iEI := '12'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 2
+				},
+				bmax := f_oct_or_wc(bmax, 2)
+			},
+			bucket_Leak_Rate := {
+				iEI := '03'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 2
+				},
+				r_Value := f_oct_or_wc(bucket_leak_rate, 2)
+			},
+			bucket_Full_Ratio := omit,
+			flow_Control_Granularity := omit
+		}
+	}
+	template (present) PDU_BSSGP tr_BVC_FC_MS(template (present) GprsTlli tlli := ?,
+						  template (present) uint16_t bmax := ?,
+						  template (present) uint16_t bucket_leak_rate := ?,
+						  template (present) OCT1 tag := ?) := {
+		pDU_BSSGP_FLOW_CONTROL_MS := {
+			bssgpPduType := '28'O,
+			tLLI := ts_BSSGP_TLLI(tlli),
+			tag := {
+				iEI := '1E'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 1
+				},
+				unstructured_Value := tag
+			},
+			mS_Bucket_Size := {
+				iEI := '12'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 2
+				},
+				bmax := f_oct_or_wc(bmax, 2)
+			},
+			bucket_Leak_Rate := {
+				iEI := '03'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 2
+				},
+				r_Value := f_oct_or_wc(bucket_leak_rate, 2)
+			},
+			bucket_Full_Ratio := *,
+			flow_Control_Granularity := *
+		}
+	}
+
+	template (value) PDU_BSSGP ts_BVC_FC_MS_ACK(template (value) GprsTlli tlli,
+						    template (value) OCT1 tag) := {
+
+		pDU_BSSGP_FLOW_CONTROL_MS_ACK := {
+			bssgpPduType := '29'O,
+			tLLI := ts_BSSGP_TLLI(tlli),
+			tag := {
+				iEI := '1E'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 1
+				},
+				unstructured_Value := tag
+			}
+		}
+	}
+	template (present) PDU_BSSGP tr_BVC_FC_MS_ACK(template (present) GprsTlli tlli,
+						      template (present) OCT1 tag := ?) := {
+
+		pDU_BSSGP_FLOW_CONTROL_MS_ACK := {
+			bssgpPduType := '29'O,
+			tLLI := tr_BSSGP_TLLI(tlli),
+			tag := {
+				iEI := '1E'O,
+				ext := '1'B,
+				lengthIndicator := {
+					length1 := 1
+				},
+				unstructured_Value := tag
+			}
+		}
+	}
+
 	template PDU_BSSGP ts_BSSGP_STATUS(template BssgpBvci bvci, template BssgpCause cause,
 					   PDU_BSSGP pdu) := {
 		pDU_BSSGP_STATUS := {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21635
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: Ie087ee8e8adfb963d21f35c60628214d4297250d
Gerrit-Change-Number: 21635
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20201210/b4f6d836/attachment.htm>


More information about the gerrit-log mailing list