Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38213?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: s1gw: add multi-eNB variants of TC_e_rab_setup
......................................................................
s1gw: add multi-eNB variants of TC_e_rab_setup
The idea is to simulate multiple eNBs establishing one or more
E-RAB(s) simultaneously. In order to achieve that, use the new
Mutex API to ensure that only one ConnHdlr component is triggering
PFCP session establishment at any given time.
The problem is that there is no way for the PFCPEM component to
correlate which PFCP session belongs to which eNB when multiple
ConnHdlr instances establish E-RAB(s) in parallel. This can be
solved by making a part of the test scenario synchronous.
Change-Id: I9e2eb25a7ae78ff623b94802d881af4894d0cacd
---
M s1gw/S1GW_ConnHdlr.ttcn
M s1gw/S1GW_Tests.ttcn
M s1gw/expected-results.xml
M s1gw/gen_links.sh
4 files changed, 53 insertions(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/38213/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38213?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: I9e2eb25a7ae78ff623b94802d881af4894d0cacd
Gerrit-Change-Number: 38213
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38212?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: s1gw: move PFCP association handling into a dedicated ConnHdlr
......................................................................
s1gw: move PFCP association handling into a dedicated ConnHdlr
Previously, the PFCP association request from the IUT was handled by
the first ConnHdlr component (idx := 0). While this approach has
worked, it fails when multiple ConnHdlr instances (idx > 0) are spawned.
The problem arises when other ConnHdlr (idx > 0) instances initiate
PFCP procedures before the first ConnHdlr (idx := 0) has established
the association, so we end up playing races.
This patch introduces a dedicated ConnHdlr component to handle the
PFCP association independently. Once the association is established,
the actual test ConnHdlr instances are spawned, ensuring a more
reliable and orderly process.
Change-Id: I5e1a14105a35b785bf598dc2a8c436ea6fb6b0f1
---
M s1gw/S1GW_ConnHdlr.ttcn
M s1gw/S1GW_Tests.ttcn
2 files changed, 22 insertions(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/12/38212/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38212?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: I5e1a14105a35b785bf598dc2a8c436ea6fb6b0f1
Gerrit-Change-Number: 38212
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38207?usp=email )
Change subject: library/PFCP_Emulation: a better PDU routing concept
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38207?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I25802471519fa297ad4cb2b056adaa6748b00af2
Gerrit-Change-Number: 38207
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 19 Sep 2024 19:33:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38206?usp=email
to look at the new patch set (#2).
Change subject: library: add generic Mutex API for parallel components
......................................................................
library: add generic Mutex API for parallel components
In certain scenarios, it's required to ensure that only one of multiple
parallel components executes a specific code block at any given time.
This, for example, is the case for the S1GW testsuite, where we want to
simulate multiple eNBs establishing E-RABs. Each new E-RAB triggers the
IUT (osmo-s1gw) to send a PFCP Session Establishment Request, and there
is no way for the PFCPEM to correlate which session belongs to which eNB.
This problem can be solved by ensuring that only one eNB is triggering
the PFCP Session Establishment Request(s) at a time.
This patch implements a generic Mutex API, which can also be used
by other testsuites that orchestrate multiple parallel components.
Change-Id: Id71f43bd5fc78d4bb4417d6c01fcff8112ea6032
---
A library/Mutex.ttcn
1 file changed, 135 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/38206/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38206?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: Id71f43bd5fc78d4bb4417d6c01fcff8112ea6032
Gerrit-Change-Number: 38206
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38206?usp=email )
Change subject: library: add generic Mutex API for parallel components
......................................................................
library: add generic Mutex API for parallel components
In certain scenarios, it's required to ensure that only one of multiple
parallel components executes a specific code block at any given time.
This, for example, is the case for the S1GW testsuite, where we want to
simulate multiple eNBs establishing E-RABs. Each E-RAB triggers the
IUT (osmo-s1gw) to send a PFCP Session Establishment Request, and there
is currently no way to correlate which session belongs to which eNB.
This problem can be solved by ensuring that only one eNB is triggering
the PFCP Session Establishment Request(s) at a time.
This patch implements a generic Mutex API, which can also be used
by other testsuites that orchestrate multiple parallel components.
Change-Id: Id71f43bd5fc78d4bb4417d6c01fcff8112ea6032
---
A library/Mutex.ttcn
1 file changed, 135 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/38206/1
diff --git a/library/Mutex.ttcn b/library/Mutex.ttcn
new file mode 100644
index 0000000..625090b
--- /dev/null
+++ b/library/Mutex.ttcn
@@ -0,0 +1,135 @@
+/* Generic Mutex API for parallel components.
+ *
+ * (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de>
+ * Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de>
+ *
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+module Mutex {
+
+import from Misc_Helpers all;
+
+type component MutexCT {
+ port MutexPT LOCK; /* port for LOCKing the mutex */
+ port MutexPT UNLOCK; /* port for UNLOCKing the mutex */
+ var integer g_mutex_ref;
+};
+
+type port MutexPT procedure {
+ inout MUTEX_LOCK;
+ inout MUTEX_UNLOCK;
+} with { extension "internal" };
+
+private signature MUTEX_LOCK(out integer ref);
+private signature MUTEX_UNLOCK(in integer ref) noblock;
+
+type component MutexDispCT extends MutexCT { };
+
+private function f_MutexDisp_main()
+runs on MutexDispCT {
+ var boolean locked := false;
+ var MutexCT vc_conn;
+
+ g_mutex_ref := 0;
+
+ alt {
+ [not locked] LOCK.getcall(MUTEX_LOCK:{?}) -> sender vc_conn {
+ LOCK.reply(MUTEX_LOCK:{g_mutex_ref}) to vc_conn;
+ locked := true;
+ repeat;
+ }
+ [locked] UNLOCK.getcall(MUTEX_UNLOCK:{g_mutex_ref}) {
+ g_mutex_ref := g_mutex_ref + 1;
+ locked := false;
+ repeat;
+ }
+ [not locked] UNLOCK.getcall -> sender vc_conn {
+ setverdict(fail, __SCOPE__, "(): ",
+ "mutex unlock without prior lock from ", vc_conn);
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+ }
+ [locked] UNLOCK.getcall(MUTEX_UNLOCK:{?}) -> sender vc_conn {
+ setverdict(fail, __SCOPE__, "(): ",
+ "mutex unlock was not unexpected from ", vc_conn);
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+ }
+ }
+}
+
+/* used by the MTC to start the mutex dispatcher */
+function f_MutexDisp_start()
+return MutexDispCT {
+ var MutexDispCT vc_disp;
+
+ vc_disp := MutexDispCT.create("MutexDispCT-" & testcasename());
+ vc_disp.start(f_MutexDisp_main());
+
+ return vc_disp;
+}
+
+/* used by the MTC to connect a parallel component to the mutex dispatcher */
+function f_MutexDisp_connect(MutexDispCT vc_disp, MutexCT vc_conn)
+{
+ connect(vc_disp:LOCK, vc_conn:LOCK);
+ connect(vc_disp:UNLOCK, vc_conn:UNLOCK);
+}
+
+/* used by parallel components to lock the mutex (blocking) */
+function f_Mutex_lock(charstring file, integer line,
+ float Tval := 10.0)
+runs on MutexCT {
+ LOCK.call(MUTEX_LOCK:{-}, Tval) {
+ [] LOCK.getreply(MUTEX_LOCK:{?}) -> param(g_mutex_ref) {
+ log(__SCOPE__, "(): mutex acquired @ ", file, ":", line);
+ }
+ [] LOCK.catch(timeout) {
+ setverdict(fail, __SCOPE__, "(): timeout @ ", file, ":", line);
+ Misc_Helpers.f_shutdown(file, line);
+ }
+ }
+}
+
+/* used by parallel components to unlock the mutex (non-blocking) */
+function f_Mutex_unlock(charstring file, integer line)
+runs on MutexCT {
+ UNLOCK.call(MUTEX_UNLOCK:{g_mutex_ref});
+ log(__SCOPE__, "(): mutex released @ ", file, ":", line);
+}
+
+
+/* self-test for this module */
+private type component TestCT { };
+private type component TestChildCT extends MutexCT { };
+
+private function f_TC_selftest()
+runs on TestChildCT {
+ f_Mutex_lock(__BFILE__, __LINE__);
+ /* yay, we're the only one ruling this parallel world! */
+ f_Mutex_unlock(__BFILE__, __LINE__);
+ setverdict(pass);
+}
+
+testcase TC_selftest() runs on TestCT {
+ var TestChildCT vc_conns[42];
+ var MutexDispCT vc_disp;
+
+ vc_disp := f_MutexDisp_start();
+
+ for (var integer i := 0; i < sizeof(vc_conns); i := i + 1) {
+ vc_conns[i] := TestChildCT.create("TestChildCT-" & int2str(i));
+ f_MutexDisp_connect(vc_disp, vc_conns[i]);
+ vc_conns[i].start(f_TC_selftest());
+ }
+
+ for (var integer i := 0; i < sizeof(vc_conns); i := i + 1) {
+ vc_conns[i].done;
+ }
+}
+
+}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38206?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id71f43bd5fc78d4bb4417d6c01fcff8112ea6032
Gerrit-Change-Number: 38206
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38208?usp=email )
Change subject: library: as_pfcp_ignore(): log SeqNr of received PDUs
......................................................................
library: as_pfcp_ignore(): log SeqNr of received PDUs
Printing the PFCP PDU template ('?' by default) is not very informative
when reading logs. Printing the message type of the received PDU is
not informative either, because message types are defined as numbers
in PFCP_Types.ttcn. Printing the whole PDU is way too verbose, and
would be redundant given that the PFCPEM component already does print
all received PDUs. Let's print the sequence number.
Change-Id: I803ff46def4ae0182310bc01e753fe0c05112836
---
M library/PFCP_Emulation.ttcn
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/08/38208/1
diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn
index 87deffc..8e79631 100644
--- a/library/PFCP_Emulation.ttcn
+++ b/library/PFCP_Emulation.ttcn
@@ -374,8 +374,10 @@
altstep as_pfcp_ignore(PFCPEM_PT pt, template PDU_PFCP pfcp_expect := ?)
{
- [] pt.receive(pfcp_expect) {
- log("Ignoring ", pfcp_expect);
+ var PDU_PFCP pdu;
+
+ [] pt.receive(pfcp_expect) -> value pdu {
+ log("Ignoring PFCP PDU (SeqNr := ", pdu.sequence_number, ")");
repeat;
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38208?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I803ff46def4ae0182310bc01e753fe0c05112836
Gerrit-Change-Number: 38208
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>