daniel has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42937?usp=email )
Change subject: stp: Test that UDTS containing tcap is routed correctly ......................................................................
stp: Test that UDTS containing tcap is routed correctly
Related: SYS#8090 Depends: libosmo-sigtran.git I2051aa9e84e553feb17daabb93ba3ce82358e0e4 Change-Id: I264ab424fbc3652249535bbe4f30029defa64c09 --- M stp/STP_Tests_TCAP.ttcn 1 file changed, 54 insertions(+), 0 deletions(-)
Approvals: daniel: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve
diff --git a/stp/STP_Tests_TCAP.ttcn b/stp/STP_Tests_TCAP.ttcn index 00c08a5..bede97d 100644 --- a/stp/STP_Tests_TCAP.ttcn +++ b/stp/STP_Tests_TCAP.ttcn @@ -918,7 +918,60 @@ setverdict(pass); }
+/* Test UDTS routing with TCAP load-sharing + * If a TCAP message is returned in a UDTS and + * * it is in the TCAP session cache/tracking + * * then route it back to the correct IPA ASP. + */ +testcase TC_tcap_loadshare_m3ua_to_ipa_udts_routing() runs on TCAP_CT { + var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg; + var template (value) TCMessage tcap_msg; + var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0", + "asp-m3ua-loadshare-0-1", + "asp-ipa-loadshare-0-0", + "asp-ipa-loadshare-0-1" }; + var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+ var OCT4 dtid := int2oct(198, 4); + var OCT4 otid := int2oct(202, 4); + var integer ipa_idx; + var integer m3ua_idx; + + f_init_tcap(tcap_configs); + f_tcap_loadshare_register(2, 0, 99, 3, 100, 199); + + tcap_msg := ts_TCAP_Begin(int2oct(202, 4)); + ipa_idx := f_asp_tx_tcap_exp_alt(tcap_msg, 0, 2, 3); + tcap_msg := ts_TCAP_Continue(int2oct(98 + (ipa_idx-2)*100, 4), int2oct(202, 4)); + m3ua_idx := f_asp_tx_tcap_exp_alt(tcap_msg, ipa_idx, 0, 1); + + /* reply with a UDTS */ + var template (value) TCAP_N_NOTICE_req sccp_udts := + ts_TCAP_N_NOTICE_req(g_tcap[m3ua_idx].sccp_addr_own, + g_tcap[m3ua_idx].sccp_addr_peer, + 3, /* Subsystem failure */ + tcap_msg); + timer T := 5.0; + T.start; + SCCP_TCAP[m3ua_idx].send(sccp_udts); + + var template (present) TCAP_N_NOTICE_ind exp_sccp_udts := + tr_TCAP_N_NOTICE_ind(g_tcap[m3ua_idx].sccp_addr_own, + g_tcap[m3ua_idx].sccp_addr_peer, + 3, + tcap_msg); + + alt { + [] SCCP_TCAP[ipa_idx].receive(exp_sccp_udts) { + log("Received UTDS via TCAP[3] ASP"); + } + [] T.timeout { + setverdict(fail, __SCOPE__, "(): Timeout waiting for SCCP UTDS / TCAP message"); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); + } + } + setverdict(pass); +}
/* TODO: test TCAP Abort message is used. * TODO: test TCAP Begin+End message is used. @@ -943,6 +996,7 @@ execute( TC_tcap_loadshare_ipa_tcap_range_fail_pc_ssn_overlap() ); execute( TC_tcap_loadshare_ipa_tcap_norange() ); execute( TC_tcap_loadshare_m3ua_to_ipa_udts() ); + execute( TC_tcap_loadshare_m3ua_to_ipa_udts_routing() ); }