Change in osmo-ttcn3-hacks[master]: msc: rather not use decmatch in f_tc_ho_inter_msc_out()

neels gerrit-no-reply at
Fri Jul 2 00:14:14 UTC 2021

neels has submitted this change. ( )

Change subject: msc: rather not use decmatch in f_tc_ho_inter_msc_out()

msc: rather not use decmatch in f_tc_ho_inter_msc_out()

TC_ho_inter_msc_out fails on jenkins in a way that i cannot reproduce. A
possible source is the decmatch for the Handover Request message. The
jenkins logs show:

MSC_Tests.ttcn:6005 Warning: Decoded content matching failed, because the buffer was not empty after decoding. Remaining octets: 22.

Change-Id: I20b5594c7e083af791525231f24d3ed089c18910
M msc/MSC_Tests.ttcn
1 file changed, 6 insertions(+), 2 deletions(-)

  Jenkins Builder: Verified
  neels: Looks good to me, approved

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 5c63b63..e548c5c 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -6005,7 +6005,7 @@
 	alt {
 				pars.imsi, destination_name := remote_msc_name,
-				an_apdu := t_GSUP_AN_APDU(OSMO_GSUP_AN_PROTO_48006, decmatch expect_ho_request))) -> value prep_ho_req;
+				an_apdu := t_GSUP_AN_APDU(OSMO_GSUP_AN_PROTO_48006, pdu := ?))) -> value prep_ho_req;
 		setverdict(fail, "Wrong OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_REQUEST message received");
@@ -6016,10 +6016,14 @@
 	f_gsup_find_ie(prep_ho_req, OSMO_GSUP_SOURCE_NAME_IE, source_name_ie);
 	var octetstring local_msc_name := source_name_ie.source_name;
-	/* To forward the actual chosen encryption algorithm, decode the received PDU */
+	/* Decode PDU to 1) match with expect_ho_request and 2) to forward the actual chosen encryption algorithm. */
 	var GSUP_IeValue an_apdu_ie;
 	f_gsup_find_ie(prep_ho_req, OSMO_GSUP_AN_APDU_IE, an_apdu_ie);
 	ho_request := dec_PDU_BSSAP(an_apdu_ie.an_apdu.pdu);
+	if (not match(ho_request, expect_ho_request)) {
+		setverdict(fail, "Wrong PDU in OSMO_GSUP_MSGT_E_PREPARE_HANDOVER_REQUEST message received");
+		mtc.stop;
+	}
 	/* Remote MSC has figured out its BSC and signals success */
 	var PDU_ML3_NW_MS rr_ho_cmd := valueof(ts_RR_HandoverCommand);

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I20b5594c7e083af791525231f24d3ed089c18910
Gerrit-Change-Number: 24819
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr at>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list