Attention is currently required from: daniel, fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35464?usp=email )
Change subject: tests/{gb,iuup}: also match stderr
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35464?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icc2b372563f9ca142d256f2b8e9700220c37fddf
Gerrit-Change-Number: 35464
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 03 Jan 2024 09:55:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35471?usp=email )
Change subject: tests/utils: do not test strbuf_example2() with buf=NULL
......................................................................
tests/utils: do not test strbuf_example2() with buf=NULL
The following can be seen when building with CC=clang:
utils/utils_test.c:1239:2: runtime error: applying non-zero offset 99 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior utils/utils_test.c:1239:2 in
utils/utils_test.c:1241:3: runtime error: applying non-zero offset 99 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior utils/utils_test.c:1241:3 in
utils/utils_test.c:1242:2: runtime error: applying non-zero offset 99 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior utils/utils_test.c:1242:2 in
44. testsuite.at:274: 44. utils (testsuite.at:274): FAILED (testsuite.at:278)
This makes utils_test fail due to unexpected UBSan's output.
Even though passing NULL to the strbuf API is relatively safe, it makes
no sense and the API user should ensure that this never happens. And
so we should not be testing this case.
Change-Id: Icd2323e93ec64afc1822d48e5e1d090083edf539
---
M tests/utils/utils_test.c
M tests/utils/utils_test.ok
2 files changed, 25 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c
index 26c94dc..9ab12a1 100644
--- a/tests/utils/utils_test.c
+++ b/tests/utils/utils_test.c
@@ -1280,9 +1280,6 @@
snprintf(buf, sizeof(buf), "0x2b 0x2b 0x2b...");
printf("4: (need %d chars, had size=0) %s\n", rc, buf);
- rc = strbuf_example2(NULL, 99);
- printf("5: (need %d chars, had NULL buffer)\n", rc);
-
printf("\ncascade:\n");
rc = strbuf_cascade(buf, sizeof(buf));
printf("(need %d chars)\n%s\n", rc, buf);
diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok
index c0c9560..8a66ba8 100644
--- a/tests/utils/utils_test.ok
+++ b/tests/utils/utils_test.ok
@@ -458,7 +458,6 @@
2: (need 42 chars, had size=42) T minus 10 9 8 7 6 5 4 3 2 1 ... Lift off
3: (need 42 chars, had size=42+1) T minus 10 9 8 7 6 5 4 3 2 1 ... Lift off!
4: (need 42 chars, had size=0) 0x2b 0x2b 0x2b...
-5: (need 42 chars, had NULL buffer)
cascade:
(need 134 chars)
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35471?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icd2323e93ec64afc1822d48e5e1d090083edf539
Gerrit-Change-Number: 35471
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35471?usp=email )
Change subject: tests/utils: do not test strbuf_example2() with buf=NULL
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35471?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icd2323e93ec64afc1822d48e5e1d090083edf539
Gerrit-Change-Number: 35471
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 03 Jan 2024 09:54:18 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35409?usp=email )
Change subject: GTPv2_Templates: Make tr_GTP2C_DeleteSessionReq() easier to use by default
......................................................................
GTPv2_Templates: Make tr_GTP2C_DeleteSessionReq() easier to use by default
There's currently no user of this template, but there will be one in a
follow-up patch in MME_Tests.
- Set generic templates as default parameters, so it can match
everything.
- Reorder parameters to follow the message fields more closely.
- Change/fix some template types in parameters which were not correct.
Change-Id: I38b6c51b78772bc01e7be916ba382cb78934864c
---
M library/GTPv2_Templates.ttcn
1 file changed, 21 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/library/GTPv2_Templates.ttcn b/library/GTPv2_Templates.ttcn
index c09bca8..65bc559 100644
--- a/library/GTPv2_Templates.ttcn
+++ b/library/GTPv2_Templates.ttcn
@@ -939,12 +939,11 @@
privateExtension := omit
}});
template (present) PDU_GTPCv2
-tr_GTP2C_DeleteSessionReq(template (present) OCT4 d_teid,
+tr_GTP2C_DeleteSessionReq(template (present) OCT4 d_teid := ?,
template (present) OCT3 seq := ?,
- template (omit) GTP2C_Cause cause,
- template (present) FullyQualifiedTEID sender_fteid,
- template FullyQualifiedTEID_List teid_list,
- template (present) uint4_t bearer_id) :=
+ template GTP2C_Cause cause := *,
+ template (present) uint4_t bearer_id := ?,
+ template FullyQualifiedTEID sender_fteid := *) :=
tr_PDU_GTP2C(d_teid, seq, {
deleteSessionRequest := {
cause := fr_GTP2C_Cause(cause),
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35409?usp=email
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: I38b6c51b78772bc01e7be916ba382cb78934864c
Gerrit-Change-Number: 35409
Gerrit-PatchSet: 1
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-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35410?usp=email )
Change subject: S1AP_Emulation: Allow retrieving {MME,ENB}_UE_ID from UeContextReleaseCmd
......................................................................
S1AP_Emulation: Allow retrieving {MME,ENB}_UE_ID from UeContextReleaseCmd
It's not true that it can contain several IDs. The only difference is
that it has a choice IE which can hold a pair containing both MME/ENB UE
IDs, or only MME_UE_ID.
Change-Id: I4fb51f3f50fa10400184b65d272530ea26a2bc8e
---
M library/S1AP_Emulation.ttcn
1 file changed, 27 insertions(+), 2 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
diff --git a/library/S1AP_Emulation.ttcn b/library/S1AP_Emulation.ttcn
index 9f36225..401a26e 100644
--- a/library/S1AP_Emulation.ttcn
+++ b/library/S1AP_Emulation.ttcn
@@ -699,7 +699,13 @@
case (tr_S1AP_UeContextReleaseReq) {
return im.value_.UEContextReleaseRequest.protocolIEs[1].value_.ENB_UE_S1AP_ID;
}
- /* UeContextReleaseCmd needs special handling; it can contain any number of MME/UE IDs */
+ case (tr_S1AP_UeContextReleaseCmd) {
+ if (ispresent(im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair)) {
+ return im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair.eNB_UE_S1AP_ID;
+ } else {
+ return omit;
+ }
+ }
case (tr_S1AP_ConnEstInd) {
return im.value_.ConnectionEstablishmentIndication.protocolIEs[1].value_.ENB_UE_S1AP_ID;
}
@@ -745,7 +751,13 @@
case (tr_S1AP_UeContextReleaseReq) {
return im.value_.UEContextReleaseRequest.protocolIEs[0].value_.MME_UE_S1AP_ID;
}
- /* UeContextReleaseCmd needs special handling; it can contain any number of MME/UE IDs */
+ case (tr_S1AP_UeContextReleaseCmd) {
+ if (ispresent(im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair)) {
+ return im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.uE_S1AP_ID_pair.mME_UE_S1AP_ID;
+ } else {
+ return im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_S1AP_IDs.mME_UE_S1AP_ID;
+ }
+ }
case (tr_S1AP_ConnEstInd) {
return im.value_.ConnectionEstablishmentIndication.protocolIEs[0].value_.MME_UE_S1AP_ID;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35410?usp=email
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: I4fb51f3f50fa10400184b65d272530ea26a2bc8e
Gerrit-Change-Number: 35410
Gerrit-PatchSet: 1
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-MessageType: merged