fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33520 )
Change subject: SGSN_Tests: fix compilation warnings (template restrictions)
......................................................................
SGSN_Tests: fix compilation warnings (template restrictions)
This patch fixes multiple compilation warnings like this one:
Inadequate restriction on the referenced template variable
`attach_req', this may cause a dynamic test case error at runtime
Change-Id: Iee7760d3dcf2a35d7fe612ed80dc13c1d11e0897
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 27 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/33520/1
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 88cbbb1..ac25caa 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -757,7 +757,7 @@
auth_ciph_req.msgs.gprs_mm.authenticationAndCipheringRequest.authenticationParameterAUTN
:= autn;
l3_mt := f_receive_l3(auth_ciph_req, ran_index);
var BIT4 ac_ref :=
l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.acReferenceNumber.valueField;
- var template PDU_L3_MS_SGSN auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref,
g_pars.vec.sres);
+ var template (value) PDU_L3_MS_SGSN auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref,
g_pars.vec.sres);
if (umts_aka_challenge and not force_gsm_sres) {
/* set UMTS response instead */
@@ -885,7 +885,7 @@
friend function f_gmm_attach(boolean umts_aka_challenge, boolean force_gsm_sres, integer
ran_index := 0,
template (omit) RoutingAreaIdentificationV old_ra := omit) runs on BSSGP_ConnHdlr
{
var RoutingAreaIdentificationV old_ra_val;
- var template PDU_L3_MS_SGSN attach_req;
+ var template (value) PDU_L3_MS_SGSN attach_req;
var PDU_L3_SGSN_MS l3_mt;
if (istemplatekind(old_ra, "omit")) {
@@ -1027,7 +1027,7 @@
const integer gmm_attach_repeats := 5;
/* See TS 24.008 Rel. 16 Table 11.4 */
const float T3350 := 6.0;
- var template PDU_L3_MS_SGSN attach_req;
+ var template (value) PDU_L3_MS_SGSN attach_req;
timer t_receive_GMM_ATTACH_ACCEPT;
var RoutingAreaIdentificationV rai := f_random_RAI();
timer T;
@@ -2630,7 +2630,7 @@
friend function f_routing_area_update(RoutingAreaIdentificationV ra, integer ran_index :=
0) runs on BSSGP_ConnHdlr {
var PDU_L3_SGSN_MS l3_mt;
var PDU_DTAP_PS_MT mt;
- var template OCT4 p_tmsi := omit;
+ var template (omit) OCT4 p_tmsi := omit;
if (is_iu(ran_index)) {
p_tmsi := g_pars.p_tmsi;
@@ -2807,7 +2807,7 @@
private function f_TC_attach_usim_resync(charstring id) runs on BSSGP_ConnHdlr {
var RoutingAreaIdentificationV old_ra := f_random_RAI();
- var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra,
false, false, omit, omit);
+ var template (value) PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(),
old_ra, false, false, omit, omit);
/* send Attach Request */
/* indicate R99 capability of the MS to enable UMTS AKA in presence of
@@ -2879,7 +2879,7 @@
auth_ciph_req.msgs.gprs_mm.authenticationAndCipheringRequest.authenticationParameterAUTN
:= autn;
BSSGP[0].receive(auth_ciph_req) -> value l3_mt;
var BIT4 ac_ref :=
l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.acReferenceNumber.valueField;
- var template PDU_L3_MS_SGSN auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref,
g_pars.vec.sres);
+ var template (value) PDU_L3_MS_SGSN auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref,
g_pars.vec.sres);
auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref, g_pars.vec.sres);
auth_ciph_resp.msgs.gprs_mm.authenticationAndCipheringResponse.authenticationParResp :=
{
valueField := substr(g_pars.vec.res, 0, 4)
@@ -2936,7 +2936,7 @@
private function f_TC_attach_usim_crypt(OCT1 netcap_a2345, BIT3 auth_req_ciph) runs on
BSSGP_ConnHdlr {
var RoutingAreaIdentificationV old_ra := f_random_RAI();
- var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra,
false, false, omit, omit);
+ var template (value) PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(),
old_ra, false, false, omit, omit);
attach_req.msgs.gprs_mm.attachRequest.msNetworkCapability.msNetworkCapabilityV.spare_octets
:= netcap_a2345; /* GEA2345... */
/* send Attach Request */
@@ -3192,7 +3192,7 @@
var RoutingAreaIdentificationV old_ra := f_random_RAI();
var RoutingAreaIdentificationV new_ra := f_random_RAI();
while (old_ra == new_ra) { new_ra := f_random_RAI(); };
- var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra,
false, false, omit, omit);
+ var template (value) PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(),
old_ra, false, false, omit, omit);
var PDU_L3_SGSN_MS l3_mt;
f_send_l3(attach_req, 0);
@@ -3392,9 +3392,9 @@
var template RIM_Routing_Address dst_addr;
var template RIM_Routing_Address src_addr;
- var template RAN_Information_Request_RIM_Container req_cont;
- var template RAN_Information_RIM_Container res_cont;
- var template PDU_BSSGP bssgp_rim_pdu;
+ var template (value) RAN_Information_Request_RIM_Container req_cont;
+ var template (value) RAN_Information_RIM_Container res_cont;
+ var template (value) PDU_BSSGP bssgp_rim_pdu;
var template PDU_BSSGP bssgp_rim_pdu_expect;
dst_addr := t_RIM_Routing_Address_cid(g_gb[1].cfg.bvc[0].cell_id);
@@ -3520,8 +3520,8 @@
/* Now also emulate also the response as well and send it back on GB
interface #1. Expect the result on * GTPC */
- var template RAN_Information_RIM_Container res_cont;
- var template PDU_BSSGP bssgp_rim_pdu;
+ var template (value) RAN_Information_RIM_Container res_cont;
+ var template (value) PDU_BSSGP bssgp_rim_pdu;
res_cont :=
ts_RAN_Information_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
ts_RIM_Sequence_Number(2),
ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33520
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: Iee7760d3dcf2a35d7fe612ed80dc13c1d11e0897
Gerrit-Change-Number: 33520
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange