dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43927?usp=email )
Change subject: eIM_Tests: allow an expected JSON error in f_esipa_receive
......................................................................
eIM_Tests: allow an expected JSON error in f_esipa_receive
When receiving from the ESipa interface using the ASN.1 binding,
then errors are communicated using the normal ASN.1 structs. When
using the JSON bindings, we have a completely different error
handling mechanism. The error codes are not communicated via fields
in the body of the message. Instead there is an error code sent
within the JSON header of the message, which follows an entirely
different scheme. In order to be able to test JSON and ASN.1
bindings, we must be able to pass an expected JSON error message,
when testing error situations. Depending on which binding is used,
we either pick the ASN.1 message (esipa_res) or the JSON error
message (expected_Json_err).
Change-Id: Ib5df2e63843186f61a0849ed81ddf35453270588
Related: SYS#8203
---
M eim/eIM_Tests.ttcn
1 file changed, 34 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/43927/1
diff --git a/eim/eIM_Tests.ttcn b/eim/eIM_Tests.ttcn
index e2ed6ef..1ad6efa 100644
--- a/eim/eIM_Tests.ttcn
+++ b/eim/eIM_Tests.ttcn
@@ -45,6 +45,7 @@
import from PIPEasp_Types all;
import from SGP23_Constants all;
+import from esx_header_Types_JSON all;
type component MTC_CT {
timer g_Tguard;
@@ -420,7 +421,8 @@
}
/* Receive ESipa HTTP response */
-private function f_esipa_receive(template EsipaMessageFromEimToIpa expected_esipa_res := omit)
+private function f_esipa_receive(template EsipaMessageFromEimToIpa expected_esipa_res := omit,
+ template JSON_ESx_FunctionExecutionStatusCodeData expected_json_err := omit)
runs on eIM_ConnHdlr return template EsipaMessageFromEimToIpa {
var template EsipaMessageFromEimToIpa esipa_res;
var DecodedEimToIpaMessage_Wrap esipa_res_wrap; /* JSON */
@@ -455,13 +457,39 @@
} else if (ispresent(response_http.response)) {
if (mp_esipa_json == true) {
dec_EsipaMessageFromEimToIpa_from_JSON(response_http.response.body, esipa_res_wrap);
- esipa_res := esipa_res_wrap.asn1_pdu;
- if (not istemplatekind(expected_esipa_res, "omit")) {
- if (not match(valueof(esipa_res), expected_esipa_res)) {
- setverdict(fail, "unexpected response (JSON) from eIM on ESipa");
+ if (isbound(esipa_res_wrap.asn1_pdu)) {
+ esipa_res := esipa_res_wrap.asn1_pdu;
+
+ if (not istemplatekind(expected_esipa_res, "omit")) {
+ /* The JSON message definition of the ProvideEimPackageResultResponse contains
+ * only one optional field (eimAcknowledgements). When this field is missing,
+ * the ProvideEimPackageResultResponse becomes indistinguishable from an empty
+ * response and is decoded as such. In case an expected_esipa_res is given, we
+ * can check if a ProvideEimPackageResultResponse is expected. When this is the
+ * case and the decoded response (esipa_res) was empty, we may infer the
+ * appropriate ProvideEimPackageResultResponse. */
+ if (ispresent(expected_esipa_res.provideEimPackageResultResponse) and istemplatekind(esipa_res, "omit")) {
+ esipa_res := { provideEimPackageResultResponse := { emptyResponse := { } } }
+ }
+ if (not match(valueof(esipa_res), expected_esipa_res)) {
+ setverdict(fail, "unexpected response (JSON) from eIM on ESipa");
+ log(valueof(esipa_res));
+ }
}
+ return esipa_res;
+ } else if (isbound(esipa_res_wrap.err)) {
+ if (not istemplatekind(expected_json_err, "omit")) {
+ if (not match(valueof(esipa_res_wrap.err), expected_json_err)) {
+ setverdict(fail, "unexpected error response (JSON) from eIM on ESipa");
+ }
+ }
+ return omit;
+ } else {
+ /* The decoder should always either return an error result or a decoded asn1_pdu, but the
+ * result should never be completely empty. */
+ setverdict(fail, "unexpected empty decoding result while decoding received response (JSON) from eIM on ESipa");
+ return omit;
}
- return esipa_res;
} else {
setverdict(fail, "unexpected response from eIM on ESipa (response is ASN.1 instead of JSON?)");
return omit;
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43927?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: Ib5df2e63843186f61a0849ed81ddf35453270588
Gerrit-Change-Number: 43927
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: osmith.
fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43926?usp=email )
Change subject: s1gw: titan 11.2.1: use --legacy-template-subrefs
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43926?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: I918b814f33a9db8614961ebddb3a7ad1adfebf99
Gerrit-Change-Number: 43926
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Oct 2026 15:12:43 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43926?usp=email )
Change subject: s1gw: titan 11.2.1: use --legacy-template-subrefs
......................................................................
s1gw: titan 11.2.1: use --legacy-template-subrefs
Add the flag if running with a ttcn3_compiler version that supports it
and omit it otherwise.
Related: https://gitlab.eclipse.org/eclipse/titan/titan.core/-/work_items/798
Change-Id: I918b814f33a9db8614961ebddb3a7ad1adfebf99
---
M _buildsystem/regen_makefile.inc.sh
M s1gw/regen_makefile.sh
2 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/26/43926/1
diff --git a/_buildsystem/regen_makefile.inc.sh b/_buildsystem/regen_makefile.inc.sh
index f9dcfe6..b68e244 100644
--- a/_buildsystem/regen_makefile.inc.sh
+++ b/_buildsystem/regen_makefile.inc.sh
@@ -65,6 +65,36 @@
fi
#
+# Add options to ttcn3_compiler if they are supported
+#
+add_ttcn3_compiler_opts_if_supported() {
+ local i
+ local add_flags=""
+
+ if [ -z "$REGEN_MAKEFILE_ADD_TTCN3_COMPILER_FLAGS_IF_SUPPORTED" ]; then
+ return
+ fi
+
+ for i in $REGEN_MAKEFILE_ADD_TTCN3_COMPILER_FLAGS_IF_SUPPORTED; do
+ if ttcn3_compiler --help 2>&1 | grep -q -- "$i"; then
+ echo "Using ttcn3_compiler flag: $i"
+ add_flags="$add_flags $i"
+ else
+ echo "Unsupported ttcn3_compiler flag: $i"
+ fi
+ done
+
+ sed -i "s/COMPILER_FLAGS = /COMPILER_FLAGS = $add_flags /" Makefile
+
+ if ! grep -q "COMPILER_FLAGS = $add_flags " Makefile; then
+ echo "ERROR: failed to add compiler flags: $add_flags"
+ exit 1
+ fi
+}
+
+add_ttcn3_compiler_opts_if_supported
+
+#
# Make output more readable (skip with make V=1)
#
diff --git a/s1gw/regen_makefile.sh b/s1gw/regen_makefile.sh
index 01f5cd4..fbcfa43 100755
--- a/s1gw/regen_makefile.sh
+++ b/s1gw/regen_makefile.sh
@@ -22,4 +22,9 @@
TCCInterface.cc
"
+# https://gitlab.eclipse.org/eclipse/titan/titan.core/-/work_items/798
+REGEN_MAKEFILE_ADD_TTCN3_COMPILER_FLAGS_IF_SUPPORTED="
+ --legacy-template-subrefs
+"
+
. ../_buildsystem/regen_makefile.inc.sh
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43926?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: I918b814f33a9db8614961ebddb3a7ad1adfebf99
Gerrit-Change-Number: 43926
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43925?usp=email )
Change subject: s1gw, mme: add max_jobs_per_gb_ram=0.3
......................................................................
s1gw, mme: add max_jobs_per_gb_ram=0.3
Building these testsuites consumes a lot of RAM, leading to OOM kills on
my system. Do the same thing as for the 5gc testsuite where we have the
same behavior and add a testsrcdir.cfg with max_jobs_per_gb_ram=0.3.
Change-Id: Ic19992e91d8bc0edc77db18604c0fdb2974e7329
---
A mme/testsrcdir.cfg
A s1gw/testsrcdir.cfg
2 files changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/25/43925/1
diff --git a/mme/testsrcdir.cfg b/mme/testsrcdir.cfg
new file mode 100644
index 0000000..7f19289
--- /dev/null
+++ b/mme/testsrcdir.cfg
@@ -0,0 +1,2 @@
+[testsrcdir]
+max_jobs_per_gb_ram=0.3
diff --git a/s1gw/testsrcdir.cfg b/s1gw/testsrcdir.cfg
new file mode 100644
index 0000000..7f19289
--- /dev/null
+++ b/s1gw/testsrcdir.cfg
@@ -0,0 +1,2 @@
+[testsrcdir]
+max_jobs_per_gb_ram=0.3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43925?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: Ic19992e91d8bc0edc77db18604c0fdb2974e7329
Gerrit-Change-Number: 43925
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>