pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38678?usp=email )
Change subject: hnbgw: mgcp: Support running CS RAB ConnHdlr concurrently
......................................................................
hnbgw: mgcp: Support running CS RAB ConnHdlr concurrently
Use Mutex to serialize CRCX wildcard endpoint, in order to be able
to properly steer the message to the good ConnHdlr.
Change-Id: Ibd97a37d98abfa746b58db0ea8bb591e7c8dc638
---
M hnbgw/ConnHdlr.ttcn
M hnbgw/HNBGW_Tests.ttcn
2 files changed, 14 insertions(+), 11 deletions(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/hnbgw/ConnHdlr.ttcn b/hnbgw/ConnHdlr.ttcn
index 7ba5b94..44e4cce 100644
--- a/hnbgw/ConnHdlr.ttcn
+++ b/hnbgw/ConnHdlr.ttcn
@@ -687,6 +687,15 @@
var template RAB_SetupOrModifyList rab_sml;
timer T := 5.0;
+ /* This code block cannot be executed by more than one component at a time because the
+ * RANAP RAB Ass Request triggers the IUT to send MGCP CRCX PDU(s), which needs to be
+ * routed to the respective ConnHdlr component (us). This is why we need to ensure that
+ * one ConnHdlr is triggering MGCP CRCX wildcard at the given moment of time.
+ */
+ f_Mutex_lock(__BFILE__, __LINE__);
+
+ f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
+
/* Send RAB Assignment Request */
rab_sml := ts_RAB_SML(t_RAB_id(23), f_ts_RAB_TLA(g_pars.mgcp_pars.cn_rtp_ip), t_RAB_binding_port(g_pars.mgcp_pars.cn_rtp_port));
tx := valueof(ts_RANAP_RabAssReq(rab_sml));
@@ -697,11 +706,15 @@
alt {
[] MGCP.receive(tr_CRCX) -> value mgcp_cmd {
log("CRCX1", mgcp_cmd);
+ /* Unregister and unlock the mutex, enabling other components to
+ * establish MGCP sessions after us. */
+ f_Mutex_unlock(__BFILE__, __LINE__);
var template MgcpResponse mgcp_rsp := f_handle_crcx(g_pars.mgcp_pars, mgcp_cmd);
MGCP.send(valueof(mgcp_rsp));
}
[] T.timeout {
- setverdict(fail, "Timeout waiting for MGCP");
+ /* No need to f_Mutex_unlock since we are exiting anyway... */
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for MGCP");
}
}
T.stop;
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 6441cef..e367666 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -1070,8 +1070,6 @@
var RANAP_PDU tx;
timer T := 5.0;
- f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
-
f_statsd_reset();
tx := f_build_initial_ue(g_pars);
@@ -1114,8 +1112,6 @@
var RANAP_PDU tx;
timer T := 5.0;
- f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
-
f_statsd_reset();
tx := f_build_initial_ue(g_pars);
@@ -1170,8 +1166,6 @@
var RANAP_PDU tx;
timer T := 15.0;
- f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
-
f_statsd_reset();
tx := f_build_initial_ue(g_pars);
@@ -1407,8 +1401,6 @@
var RANAP_PDU tx;
timer T := 5.0;
- f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
-
tx := f_build_initial_ue(g_pars);
f_iuh2iu_connect(tx);
@@ -2329,8 +2321,6 @@
var RANAP_PDU tx;
timer T := 5.0;
- f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
-
tx := f_build_initial_ue(g_pars);
f_iuh2iu_connect(tx);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38678?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibd97a37d98abfa746b58db0ea8bb591e7c8dc638
Gerrit-Change-Number: 38678
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: pespin.
Hello Jenkins Builder, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38680?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: RUA_Emulation: Add missing msg component destination
......................................................................
RUA_Emulation: Add missing msg component destination
Seen while running lots of components concurrently:
"RUA_Emulation.ttcn:315 Dynamic test case error: Port CLIENT has more
than one active connections. Message can be sent on it only with
explicit addressing."
Change-Id: Ief257969a451f2d11ad7619fb97af16d7dd7e199
---
M library/rua/RUA_Emulation.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/80/38680/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38680?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ief257969a451f2d11ad7619fb97af16d7dd7e199
Gerrit-Change-Number: 38680
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>