Change in osmo-ttcn3-hacks[master]: stp: Introduce TC_tmt_override

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

pespin gerrit-no-reply at lists.osmocom.org
Tue Nov 12 12:07:59 UTC 2019


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


Change subject: stp: Introduce TC_tmt_override
......................................................................

stp: Introduce TC_tmt_override

Change-Id: Id99ec3eaa431512114817d2a2af77013762ab2b9
---
M stp/STP_Tests_IPA.ttcn
M stp/osmo-stp.cfg
2 files changed, 49 insertions(+), 4 deletions(-)



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

diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn
index f7273dc..946a950 100644
--- a/stp/STP_Tests_IPA.ttcn
+++ b/stp/STP_Tests_IPA.ttcn
@@ -33,7 +33,7 @@
 
 import from STP_Tests_Common all;
 
-private const integer NR_IPA := 4;
+private const integer NR_IPA := 7;
 
 type record of charstring AspNameArray;
 
@@ -43,7 +43,10 @@
 	AspNameArray mp_ipa_as_names := {"ipa-as-loadshare-sender",
 					 "ipa-as-loadshare-receiver",
 					 "ipa-as-loadshare-receiver",
-					 "ipa-as-dynamic-asp"
+					 "ipa-as-dynamic-asp",
+					 "ipa-as-override-sender",
+					 "ipa-as-override-receiver",
+					 "ipa-as-override-receiver"
 					 };
 }
 
@@ -165,6 +168,27 @@
 	}
 }
 
+/* test "traffic-mode override" behavior */
+testcase TC_tmt_override() runs on IPA_CT {
+	f_init_ipa();
+
+	/* bring up the 'sender' side (single ASP in AS) */
+	f_connect_ipa(4);
+	/* activate the first 'receiver' side ASP */
+	f_connect_ipa(5);
+	f_sleep(1.0);
+
+	/* verify traffic is routed from sender to [sole] receiver */
+	f_test_traffic(4, 5);
+
+	/* activate the second 'receiver' side ASP */
+	f_connect_ipa(6);
+	f_sleep(1.0);
+
+	/* verify traffic is routed from sender to new receiver */
+	f_test_traffic(4, 6);
+}
+
 private altstep as_count_rx(integer idx, template (present) octetstring exp, inout integer counter)
 runs on IPA_CT {
 	[] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, exp)) {
@@ -214,11 +238,11 @@
 	setverdict(pass);
 }
 
-
 control {
 	execute( TC_unknown_client_nodynamic() );
 	execute( TC_known_client_nodynamic() );
 	execute( TC_unknown_client_dynamic() );
+	execute (TC_tmt_override() );
 	execute( TC_tmt_loadshare() );
 }
 
diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg
index 26ab7f6..50c80d3 100644
--- a/stp/osmo-stp.cfg
+++ b/stp/osmo-stp.cfg
@@ -85,7 +85,27 @@
   point-code override dpc 32
   asp ipa-asp-loadshare-receiver0
   asp ipa-asp-loadshare-receiver1
- !Used by STP_Tests.ttcn:
+! OVERRIDE:
+ asp ipa-asp-override-sender 20004 5000 ipa
+  local-ip 127.0.0.1
+  remote-ip 127.0.0.1
+ as ipa-as-override-sender ipa
+  routing-key 0 6
+  point-code override dpc 33
+  asp ipa-asp-override-sender
+ asp ipa-asp-override-receiver0 20005 5000 ipa
+  local-ip 127.0.0.1
+  remote-ip 127.0.0.1
+ asp ipa-asp-override-receiver1 20006 5000 ipa
+  local-ip 127.0.0.1
+  remote-ip 127.0.0.1
+ as ipa-as-override-receiver ipa
+  traffic-mode override
+  routing-key 0 8
+  point-code override dpc 34
+  asp ipa-asp-override-receiver0
+  asp ipa-asp-override-receiver1
+! DYNAMIC AS:
  as ipa-as-dynamic-asp ipa
   routing-key 0 5
   point-code override dpc 23
@@ -97,6 +117,7 @@
   update route 42 16777215 linkset as-receiver
   update route 55 16777215 linkset as-client
   update route 31 16777215 linkset ipa-as-loadshare-receiver
+  update route 33 16777215 linkset ipa-as-override-receiver
   update route 5  16777215 linkset ipa-as-dynamic-asp
 !
 !SERVERS:

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043
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: Id99ec3eaa431512114817d2a2af77013762ab2b9
Gerrit-Change-Number: 16043
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191112/e4fb6232/attachment.htm>


More information about the gerrit-log mailing list