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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16044 ) Change subject: stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() ...................................................................... stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() This type of scenario is used in several tests and will be used in more tests in the future, so let's move there for easiness. Change-Id: Ic65ff2ff9dc3cc82ae3fefcf3caf406279cd6b97 --- M stp/STP_Tests_IPA.ttcn 1 file changed, 11 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index 946a950..beb2aa9 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -106,9 +106,15 @@ } } -friend function f_connect_ipa(integer idx) runs on IPA_CT { +friend function f_connect_ipa(integer idx, boolean use_unknown_asp_port := false) runs on IPA_CT { + var integer port_offset := 0; + if (use_unknown_asp_port) { + /* Add 100 to the port since we know that port is not configured in any + ASP only up to NR_IPA are configured. */ + port_offset := 100; + } vc_IPA[idx].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+idx, g_ccm_pars[idx])); + mp_local_ipa_port + idx + port_offset, g_ccm_pars[idx])); } @@ -118,10 +124,7 @@ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); f_init_ipa(); - /* Add 100 to the port since we know that port is not configured in any - ASP only up to NR_IPA are configured. */ - vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+100, g_ccm_pars[0])); + f_connect_ipa(0, true); f_sleep(1.0); if (IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be disconnected"); @@ -139,7 +142,7 @@ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); f_init_ipa(); - f_connect_ipa(0); + f_connect_ipa(0, false); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); @@ -156,10 +159,7 @@ testcase TC_unknown_client_dynamic() runs on IPA_CT { f_init_common(); f_init_ipa(); - /* Add 100 to the port since we know that port is not configured in any - ASP only up to NR_IPA are configured. */ - vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+100, g_ccm_pars[0])); + f_connect_ipa(0, true); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16044 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: Ic65ff2ff9dc3cc82ae3fefcf3caf406279cd6b97 Gerrit-Change-Number: 16044 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191113/2a5070cc/attachment.htm>