summaryrefslogtreecommitdiffstats
path: root/stp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-11-07 17:38:32 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-11-12 13:06:24 +0100
commitb72928d85486d0345a4826a47a3c86c0f35c653d (patch)
tree4f478787c0e4d111a92859b3930d1bb414291071 /stp
parent01ec0bf209c197dcb8f62b27b238b5ecb3b90d17 (diff)
stp: Introduce TC_tmt_override
Diffstat (limited to 'stp')
-rw-r--r--stp/STP_Tests_IPA.ttcn30
-rw-r--r--stp/osmo-stp.cfg23
2 files changed, 49 insertions, 4 deletions
diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn
index f7273dc9..946a9508 100644
--- a/stp/STP_Tests_IPA.ttcn
+++ b/stp/STP_Tests_IPA.ttcn
@@ -33,7 +33,7 @@ import from MTP3asp_PortType all;
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 @@ modulepar {
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 @@ testcase TC_unknown_client_dynamic() runs on IPA_CT {
}
}
+/* 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 @@ testcase TC_tmt_loadshare() runs on IPA_CT {
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 26ab7f6d..50c80d37 100644
--- a/stp/osmo-stp.cfg
+++ b/stp/osmo-stp.cfg
@@ -85,7 +85,27 @@ cs7 instance 0
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 @@ cs7 instance 0
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: