Change in osmo-ttcn3-hacks[master]: library/RLCMAC_CSN1_Types.ttcn: fix ps / cs selection in PageInfo union

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Jan 3 22:20:50 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16694 )

Change subject: library/RLCMAC_CSN1_Types.ttcn: fix ps / cs selection in PageInfo union
......................................................................

library/RLCMAC_CSN1_Types.ttcn: fix ps / cs selection in PageInfo union

Change-Id: I40c2a3c38799a625836e4c28f476524c92077b83
---
M library/RLCMAC_CSN1_Types.ttcn
M pcu/PCU_Tests_RAW.ttcn
2 files changed, 6 insertions(+), 8 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn
index 11df29d..321049c 100644
--- a/library/RLCMAC_CSN1_Types.ttcn
+++ b/library/RLCMAC_CSN1_Types.ttcn
@@ -230,6 +230,8 @@
 	type union PageInfo {
 		PageInfoPs		ps,
 		PageInfoCs		cs
+	} with {
+		variant "TAG(ps, presence = '0'B; cs, presence = '1'B)"
 	};
 	type record PacketPagingReq {
 		PageMode		page_mode,
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index d19093c..cd13ff5 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -1299,10 +1299,8 @@
 
 	/* Receive it on BTS side towards MS */
 	f_rx_rlcmac_dl_block_exp_pkt_pag_req(dl_block);
-	/* FIXME: we must use .ps. here instead of .cs. (the one actually sent)
-	   because TTCN3 counts length up to octet boundary and thinks it's a
-	   PageInfoPs: */
-	mi_res := dl_block.ctrl.payload.u.paging.repeated_pageinfo.ps.mobile_identity;
+
+	mi_res := dl_block.ctrl.payload.u.paging.repeated_pageinfo.cs.mobile_identity;
 	if (oct2int(substr(mi_enc_lv, 0, 1)) != mi_res.len) {
 		/* TODO: Verify MI contents encoded match */
 		setverdict(fail, "Mobile Identity not matching (imsi=", imsi, ")");
@@ -1351,10 +1349,8 @@
 	/* Receive it on BTS side towards MS */
 	f_rx_rlcmac_dl_block_exp_pkt_pag_req(dl_block);
 
-	/* FIXME: we must use .ps. here instead of .cs. (the one actually sent)
-	   because TTCN3 counts length up to octet boundary and thinks it's a
-	   PageInfoPs: */
-	mi_res := dl_block.ctrl.payload.u.paging.repeated_pageinfo.ps.mobile_identity;
+	/* FIXME: actually match the identity */
+	mi_res := dl_block.ctrl.payload.u.paging.repeated_pageinfo.cs.mobile_identity;
 	setverdict(pass);
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16694
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: I40c2a3c38799a625836e4c28f476524c92077b83
Gerrit-Change-Number: 16694
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200103/09a3616c/attachment.htm>


More information about the gerrit-log mailing list