pespin submitted this change.

View Change

Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved
stp: Introduce test TC_ssnm_distribution_scon_asp_multias

Related: OS#7062
Change-Id: I06004bbf409c407a8243b85a17edeb83be13e1c9
---
M stp/STP_Tests_M3UA.cfg
M stp/STP_Tests_M3UA.ttcn
M stp/expected-results.xml
M stp/osmo-stp-m3ua.confmerge
4 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/stp/STP_Tests_M3UA.cfg b/stp/STP_Tests_M3UA.cfg
index b2f6df1..5034333 100644
--- a/stp/STP_Tests_M3UA.cfg
+++ b/stp/STP_Tests_M3UA.cfg
@@ -132,6 +132,23 @@
routing_ctx := 2001
}
}
+ },
+ {
+ asp_name := "asp-client-multias",
+ is_server := true,
+ use_tcp := false,
+ remote_port := 2908,
+ local_port := 10008,
+ as := {
+ { /* as-client-multias0 */
+ point_code := 52,
+ routing_ctx := 2002
+ },
+ { /* as-client-multias1 */
+ point_code := 53,
+ routing_ctx := 2003
+ }
+ }
}
};

diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn
index 7633b2e..60add43 100644
--- a/stp/STP_Tests_M3UA.ttcn
+++ b/stp/STP_Tests_M3UA.ttcn
@@ -1729,6 +1729,30 @@
f_M3UA_exp(0, tr_M3UA_SCON({adv_pc}, rctx0));
}

+/* Same as TC_ssnm_distribution_scon, but SCON is received on an ASP serving 2 Routing Context (AS). */
+testcase TC_ssnm_distribution_scon_asp_multias() runs on RAW_M3UA_CT {
+ var Misc_Helpers.ro_charstring asps := { "asp-sender", "asp-client-multias" };
+ var M3uaConfigs m3ua_configs := m3ua_build_configs(asps);
+ var OCT4 rctx0 := f_m3ua_config_get_rctx(m3ua_configs[0]);
+ var octetstring rctxS := f_m3ua_config_get_all_rctx(m3ua_configs[1]);
+ /* some random point code whose availability we advertise */
+ var template (value) M3UA_Point_Code adv_pc := ts_M3UA_PC(1234, 0);
+
+ f_init_m3ua(ignore_ssnm := false, m3ua_configs := m3ua_configs);
+
+ /* activate the first ASP */
+ f_M3UA_asp_up_act(0);
+
+ /* activate SG-role ASP (ASP on STP) */
+ f_init_m3ua_srv();
+ f_M3UA_CLNT_asp_up_act(1, rctx := rctxS);
+
+ /* transmit a SCON to the remote ASP */
+ f_M3UA_send(1, ts_M3UA_SCON({adv_pc}, rctxS));
+ /* expect that to show up on other ASP */
+ f_M3UA_exp(0, tr_M3UA_SCON({adv_pc}, rctx0));
+}
+
private function f_asp_cfg_str(in M3uaConfig cfg)
return charstring {
var charstring str;
@@ -2121,6 +2145,7 @@
execute( TC_ssnm_distribution_dava_duna_multipc() );
execute( TC_ssnm_distribution_dupu() );
execute( TC_ssnm_distribution_scon() );
+ execute( TC_ssnm_distribution_scon_asp_multias() );

/* put this one last as it changes the stp side config */
execute( TC_clnt_asp_act_tmt_loadshare() );
diff --git a/stp/expected-results.xml b/stp/expected-results.xml
index 69187c9..f760eb3 100644
--- a/stp/expected-results.xml
+++ b/stp/expected-results.xml
@@ -49,6 +49,7 @@
<testcase classname='STP_Tests_M3UA' name='TC_ssnm_distribution_dava_duna_multipc' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_ssnm_distribution_dupu' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_ssnm_distribution_scon' time='MASKED'/>
+ <testcase classname='STP_Tests_M3UA' name='TC_ssnm_distribution_scon_asp_multias' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_clnt_asp_act_tmt_loadshare' time='MASKED'/>
<testcase classname='STP_Tests_M3UA_TCP' name='TC_m3ua_tcp_cli' time='MASKED'/>
<testcase classname='STP_Tests_M3UA_TCP' name='TC_m3ua_tcp_cli_srv' time='MASKED'/>
diff --git a/stp/osmo-stp-m3ua.confmerge b/stp/osmo-stp-m3ua.confmerge
index 179ca0f..c69714c 100644
--- a/stp/osmo-stp-m3ua.confmerge
+++ b/stp/osmo-stp-m3ua.confmerge
@@ -67,6 +67,13 @@
remote-ip ::1
role sg
sctp-role server
+ asp asp-client-multias 10008 2908 m3ua
+ local-ip 127.0.0.1
+ local-ip ::1
+ remote-ip 127.0.0.1
+ remote-ip ::1
+ role asp
+ sctp-role client
as as-sender m3ua
asp asp-sender
routing-key 1023 23
@@ -97,6 +104,13 @@
as as-multias1 m3ua
routing-key 2001 51
asp asp-multias
+ ! ASP client serving multiple AS:
+ as as-client-multias0 m3ua
+ routing-key 2002 52
+ asp asp-client-multias
+ as as-client-multias1 m3ua
+ routing-key 2003 53
+ asp asp-client-multias
!
! ROUTING TABLE:
!
@@ -110,6 +124,8 @@
update route 61 16777215 linkset as-client61-norctx
update route 50 16777215 linkset as-multias0
update route 51 16777215 linkset as-multias1
+ update route 52 16777215 linkset as-client-multias0
+ update route 53 16777215 linkset as-client-multias1
!
!SERVERS:
!

To view, visit change 43499. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I06004bbf409c407a8243b85a17edeb83be13e1c9
Gerrit-Change-Number: 43499
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>