pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43488?usp=email )
Change subject: stp: Introduce test TC_asp_act_multias ......................................................................
stp: Introduce test TC_asp_act_multias
Depends: libosmo-sigtran.git Change-Id I252f9e16ab92a264559385d47690552d75837569 Change-Id: I6469b9cba6a4ce8b1d90ade7e95bfcf238176126 --- M stp/STP_Tests_M3UA.cfg M stp/STP_Tests_M3UA.ttcn M stp/osmo-stp-m3ua.confmerge 3 files changed, 66 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/43488/1
diff --git a/stp/STP_Tests_M3UA.cfg b/stp/STP_Tests_M3UA.cfg index 3bdd716..b2f6df1 100644 --- a/stp/STP_Tests_M3UA.cfg +++ b/stp/STP_Tests_M3UA.cfg @@ -115,6 +115,23 @@ routing_ctx := omit } } + }, + { + asp_name := "asp-multias", + is_server := false, + use_tcp := false, + remote_port := 2905, + local_port := 1004, + as := { + { /* as-multias0 */ + point_code := 50, + routing_ctx := 2000 + }, + { /* as-multias1 */ + point_code := 51, + routing_ctx := 2001 + } + } } };
diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index b263e70..7633b2e 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -38,7 +38,7 @@
import from STP_Tests_Common all;
-private const integer MAX_NR_M3UA := 8; /* Maximum number of M3UA clients+servers in ATS */ +private const integer MAX_NR_M3UA := 9; /* Maximum number of M3UA clients+servers in ATS */
modulepar { /* STP-side IP addresses */ @@ -747,6 +747,36 @@ f_clear_m3ua(); }
+/* Test the ASP-ACTIVATE procedure with multiple Routing Context */ +testcase TC_asp_act_multias() runs on RAW_M3UA_CT { + var Misc_Helpers.ro_charstring asps := { "asp-multias" }; + var M3uaConfigs m3ua_configs := m3ua_build_configs(asps); + var octetstring rctx := f_m3ua_config_get_all_rctx(m3ua_configs[0]); + var OCT4 rctxA := f_m3ua_config_get_rctx(m3ua_configs[0], 0); + var OCT4 rctxB := f_m3ua_config_get_rctx(m3ua_configs[0], 1); + var OCT4 dpcA := f_m3ua_config_get_pc(m3ua_configs[0], 0); + var OCT4 dpcB := f_m3ua_config_get_pc(m3ua_configs[0], 1); + f_init_m3ua(m3ua_configs := m3ua_configs); + + f_M3UA_asp_up(0, ntfy_after_up := omit); + f_M3UA_wait_NOTIFY_all_rctx(0, rctx, c_M3UA_ST_I_AS_INACTIVE); + + f_M3UA_asp_act(0, rctx := rctx, ntfy_after_act := omit); + /* rctxA becomes active: */ + f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_ACTIVE, rctxA)); + f_M3UA_exp(0, tr_M3UA_DAVA({ts_M3UA_PC(oct2int(dpcA))}, rctxB)); + if (g_iut_supports_rfc666_4_5_1_duna_after_act) { + f_M3UA_exp(0, tr_M3UA_DUNA({*}, rctxA)); + } + /* rctxB becomes active: */ + f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_ACTIVE, rctxB)); + f_M3UA_exp(0, tr_M3UA_DAVA({ts_M3UA_PC(oct2int(dpcB))}, rctxA)); + if (g_iut_supports_rfc666_4_5_1_duna_after_act) { + f_M3UA_exp(0, tr_M3UA_DUNA({*}, rctxB)); + } + f_clear_m3ua(); +} + /* test whether the STP accepts M3UA DATA without Routing Context IE */ testcase TC_act_rctx_data_no_rctx() runs on RAW_M3UA_CT { var Misc_Helpers.ro_charstring asps := { "asp-sender", "asp-receiver0" }; @@ -2036,6 +2066,7 @@ execute( TC_asp_act_override() ); execute( TC_asp_act_loadshare() ); execute( TC_asp_act_broadcast() ); + execute( TC_asp_act_multias() ); execute( TC_tmt_override() ); execute( TC_tmt_loadshare_roundrobin() ); execute( TC_tmt_loadshare_sls() ); diff --git a/stp/osmo-stp-m3ua.confmerge b/stp/osmo-stp-m3ua.confmerge index 5bc337f..179ca0f 100644 --- a/stp/osmo-stp-m3ua.confmerge +++ b/stp/osmo-stp-m3ua.confmerge @@ -59,6 +59,14 @@ remote-ip ::1 role asp sctp-role client + ! ASP serving multiple AS: + asp asp-multias 1004 2905 m3ua + local-ip 127.0.0.1 + local-ip ::1 + remote-ip 127.0.0.1 + remote-ip ::1 + role sg + sctp-role server as as-sender m3ua asp asp-sender routing-key 1023 23 @@ -82,6 +90,13 @@ as as-client61-norctx m3ua routing-key 0 61 asp asp-client61-norctx0 + ! ASP serving multiple AS: + as as-multias0 m3ua + routing-key 2000 50 + asp asp-multias + as as-multias1 m3ua + routing-key 2001 51 + asp asp-multias ! ! ROUTING TABLE: ! @@ -93,6 +108,8 @@ update route 55 16777215 linkset as-client update route 60 16777215 linkset as-client60-norctx update route 61 16777215 linkset as-client61-norctx + update route 50 16777215 linkset as-multias0 + update route 51 16777215 linkset as-multias1 ! !SERVERS: !