Change in osmo-ttcn3-hacks[master]: stp: Ignore M3UA SSNM messages in tests

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
Sun Feb 7 22:07:18 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22783 )


Change subject: stp: Ignore M3UA SSNM messages in tests
......................................................................

stp: Ignore M3UA SSNM messages in tests

The tests were written without considering the arrival of such messages;
however, it is well within the M3UA spec that such messages appear at
any time indicating remote point code availability etc.

In libosmo-sccp.git Id92be4691b0fd77598a6edb642c028bbd8c5b623 we start
generating those messages in osmo-stp.

Let's ignore them in the tests to avoid unexpected failures.

Later on, we likely will introduce / adapt tests to actually expect
those messages whenever appropriate.

Change-Id: I85ce8fd4f26db184833cf348293f0255bb5eaac3
Related: OS#2623
---
M library/M3UA_Templates.ttcn
M library/SCCP_Templates.ttcn
M stp/STP_Tests_M3UA.ttcn
3 files changed, 150 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/22783/1

diff --git a/library/M3UA_Templates.ttcn b/library/M3UA_Templates.ttcn
index 1063b50..1c95024 100644
--- a/library/M3UA_Templates.ttcn
+++ b/library/M3UA_Templates.ttcn
@@ -379,6 +379,97 @@
 	}
 }
 
+/***********************************************************************
+ * SSNM Class
+ ***********************************************************************/
+
+template (present) PDU_M3UA tr_M3UA_DUNA := {
+	m3UA_DUNA := {
+		version := c_M3UA_VERSION,
+		reserved := '00'O,
+		messageClassAndType := '0201'O,
+		messageLength := ?,
+		messageParameters := {
+			network_Appearance := *,
+			routing_Context := *,
+			affected_Point_Codes := ?,
+			info_String := *
+		}
+	}
+}
+
+template (present) PDU_M3UA tr_M3UA_DAVA := {
+	m3UA_DAVA := {
+		version := c_M3UA_VERSION,
+		reserved := '00'O,
+		messageClassAndType := '0202'O,
+		messageLength := ?,
+		messageParameters := {
+			network_Appearance := *,
+			routing_Context := *,
+			affected_Point_Codes := ?,
+			info_String := *
+		}
+	}
+}
+
+template (present) PDU_M3UA tr_M3UA_DAUD := {
+	m3UA_DAUD := {
+		version := c_M3UA_VERSION,
+		reserved := '00'O,
+		messageClassAndType := '0203'O,
+		messageLength := ?,
+		messageParameters := {
+			network_Appearance := *,
+			routing_Context := *,
+			affected_Point_Codes := ?,
+			info_String := *
+		}
+	}
+}
+
+template (present) PDU_M3UA tr_M3UA_SCON := {
+	m3UA_SCON := {
+		version := c_M3UA_VERSION,
+		reserved := '00'O,
+		messageClassAndType := '0204'O,
+		messageLength := ?,
+		messageParameters := {
+			network_Appearance := *,
+			routing_Context := *,
+			affected_Point_Codes := ?,
+			info_String := *
+		}
+	}
+}
+
+template (present) PDU_M3UA tr_M3UA_DUPU := {
+	m3UA_DUPU := {
+		version := c_M3UA_VERSION,
+		reserved := '00'O,
+		messageClassAndType := '0205'O,
+		messageLength := ?,
+		messageParameters := {
+			network_Appearance := *,
+			routing_Context := *,
+			affected_Point_Codes := ?,
+			info_String := *
+		}
+	}
+}
+
+template (present) PDU_M3UA tr_M3UA_DRST := {
+	m3UA_DRST := {
+		version := c_M3UA_VERSION,
+		reserved := '00'O,
+		messageClassAndType := '0206'O,
+		messageLength := ?,
+		messageParameters := ?
+	}
+}
+
+template (present) PDU_M3UA tr_M3UA_SSNM := (tr_M3UA_DUNA, tr_M3UA_DAVA, tr_M3UA_DAUD,
+					     tr_M3UA_SCON, tr_M3UA_DUPU, tr_M3UA_DRST);
 
 /***********************************************************************
  * MGMT Class
diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn
index b0e6df7..2b279c6 100644
--- a/library/SCCP_Templates.ttcn
+++ b/library/SCCP_Templates.ttcn
@@ -215,5 +215,55 @@
 	}
 }
 
+template (value) PDU_SCMG_message ts_SCCP_SSA(template (value) SCMG_param_AffectedSSN ssn,
+					      template (value) SCMG_param_AffectedPointCode pc) := {
+	messageType := sSAallowed,
+	affectedSSN := ssn,
+	affectedPC := pc,
+	smi := { '00'B, '000000'B },
+	congLevel := omit
+}
+template (present) PDU_SCMG_message tr_SCCP_SSA(template (present) SCMG_param_AffectedSSN ssn := ?,
+						template (present) SCMG_param_AffectedPointCode pc := ?) := {
+	messageType := sSAallowed,
+	affectedSSN := ssn,
+	affectedPC := pc,
+	smi := { ?, '000000'B },
+	congLevel := omit
+}
+
+template (value) PDU_SCMG_message ts_SCCP_SSP(template (value) SCMG_param_AffectedSSN ssn,
+					      template (value) SCMG_param_AffectedPointCode pc) := {
+	messageType := sSPprohib,
+	affectedSSN := ssn,
+	affectedPC := pc,
+	smi := { '00'B, '000000'B },
+	congLevel := omit
+}
+template (present) PDU_SCMG_message tr_SCCP_SSP(template (present) SCMG_param_AffectedSSN ssn := ?,
+						template (present) SCMG_param_AffectedPointCode pc := ?) := {
+	messageType := sSPprohib,
+	affectedSSN := ssn,
+	affectedPC := pc,
+	smi := { ?, '000000'B },
+	congLevel := omit
+}
+
+template (value) PDU_SCMG_message ts_SCCP_SST(template (value) SCMG_param_AffectedSSN ssn,
+					      template (value) SCMG_param_AffectedPointCode pc) := {
+	messageType := sSTstaTest,
+	affectedSSN := ssn,
+	affectedPC := pc,
+	smi := { '00'B, '000000'B },
+	congLevel := omit
+}
+template (present) PDU_SCMG_message tr_SCCP_SST(template (present) SCMG_param_AffectedSSN ssn := ?,
+						template (present) SCMG_param_AffectedPointCode pc := ?) := {
+	messageType := sSTstaTest,
+	affectedSSN := ssn,
+	affectedPC := pc,
+	smi := { ?, '000000'B },
+	congLevel := omit
+}
 
 }
diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn
index 22272f3..b76d9be 100644
--- a/stp/STP_Tests_M3UA.ttcn
+++ b/stp/STP_Tests_M3UA.ttcn
@@ -75,6 +75,14 @@
 	[] any from M3UA.receive(tr_SctpPeerAddrChange) { repeat; }
 }
 
+private altstep as_m3ua_ssnm_ignore() runs on RAW_M3UA_CT {
+	var M3UA_RecvFrom rx;
+	[] any from M3UA.receive(t_M3UA_RecvFrom(tr_M3UA_SSNM)) -> value rx {
+		log("Ignoring M3UA SSNM", rx);
+		repeat;
+		}
+}
+
 friend function f_M3UA_send(integer idx, template (present) PDU_M3UA msg, template integer stream := 0)
 runs on RAW_M3UA_CT {
 	M3UA[idx].send(t_M3UA_Send(g_m3ua_conn_id[idx], msg, stream));
@@ -183,6 +191,7 @@
 	f_init_common();
 
 	activate(as_m3ua_sctp());
+	activate(as_m3ua_ssnm_ignore());
 
 	for (i := 0; i < NR_M3UA; i:=i+1) {
 		map(self:M3UA[i], system:M3UA_CODEC_PT);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22783
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: I85ce8fd4f26db184833cf348293f0255bb5eaac3
Gerrit-Change-Number: 22783
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210207/cd7d63ec/attachment.htm>


More information about the gerrit-log mailing list