<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/9577">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sgsn: add TC_attach_no_imei_response<br><br>Ignores Identity Request IMEI.<br><br>MS -> SGSN: Attach Request IMSI<br>MS <- SGSN: Identity Request IMSI (optional)<br>MS -> SGSN: Identity Response IMSI (optional)<br>MS <- SGSN: Identity Request IMEI<br>MS -x SGSN: no response<br>MS <- SGSN: re-send: Identity Request IMEI 4x<br>MS <- SGSN: Attach Reject<br><br>Change-Id: Ie50c75e62e31e01c5b17969fb067664e44fd68a5<br>---<br>M sgsn/SGSN_Tests.ttcn<br>1 file changed, 45 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn</span><br><span>index 46b7b74..c1d4cdf 100644</span><br><span>--- a/sgsn/SGSN_Tests.ttcn</span><br><span>+++ b/sgsn/SGSN_Tests.ttcn</span><br><span>@@ -1367,6 +1367,50 @@</span><br><span> </span><br><span> </span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Attempt an attach, but loose the Identification Request (IMEI) */</span><br><span style="color: hsl(120, 100%, 40%);">+private function f_TC_attach_no_imei_response(charstring id) runs on BSSGP_ConnHdlr {</span><br><span style="color: hsl(120, 100%, 40%);">+ var integer count_req := 0;</span><br><span style="color: hsl(120, 100%, 40%);">+   var MobileL3_CommonIE_Types.MobileIdentityLV mi;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    BSSGP.send(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      alt {</span><br><span style="color: hsl(120, 100%, 40%);">+         [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {</span><br><span style="color: hsl(120, 100%, 40%);">+                      /* break */</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+             [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));</span><br><span style="color: hsl(120, 100%, 40%);">+                    BSSGP.send(ts_GMM_ID_RESP(mi));</span><br><span style="color: hsl(120, 100%, 40%);">+                       repeat;</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+             [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        /* ignore ID REQ IMEI */</span><br><span style="color: hsl(120, 100%, 40%);">+                      count_req := count_req + 1;</span><br><span style="color: hsl(120, 100%, 40%);">+                   repeat;</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (count_req != 5) {</span><br><span style="color: hsl(120, 100%, 40%);">+         setverdict(fail, "Did not received GMM ID Request Type IMEI 5 times!");</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     setverdict(pass);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+testcase TC_attach_no_imei_response() runs on test_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+       /* MS -> SGSN: Attach Request IMSI</span><br><span style="color: hsl(120, 100%, 40%);">+  * MS <- SGSN: Identity Request IMSI (optional)</span><br><span style="color: hsl(120, 100%, 40%);">+     * MS -> SGSN: Identity Response IMSI (optional)</span><br><span style="color: hsl(120, 100%, 40%);">+    * MS <- SGSN: Identity Request IMEI</span><br><span style="color: hsl(120, 100%, 40%);">+        * MS -x SGSN: no response</span><br><span style="color: hsl(120, 100%, 40%);">+     * MS <- SGSN: re-send: Identity Request IMEI 4x</span><br><span style="color: hsl(120, 100%, 40%);">+    * MS <- SGSN: Attach Reject</span><br><span style="color: hsl(120, 100%, 40%);">+        */</span><br><span style="color: hsl(120, 100%, 40%);">+   var BSSGP_ConnHdlr vc_conn;</span><br><span style="color: hsl(120, 100%, 40%);">+   f_init();</span><br><span style="color: hsl(120, 100%, 40%);">+     f_sleep(1.0);</span><br><span style="color: hsl(120, 100%, 40%);">+ vc_conn := f_start_handler(refers(f_TC_attach_no_imei_response), testcasename(), g_gb[0], 32, 60.0);</span><br><span style="color: hsl(120, 100%, 40%);">+  vc_conn.done;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> control {</span><br><span>      execute( TC_attach() );</span><br><span>      execute( TC_attach_mnc3() );</span><br><span>@@ -1380,6 +1424,7 @@</span><br><span>         execute( TC_attach_combined() );</span><br><span>     execute( TC_attach_accept_all() );</span><br><span>   execute( TC_attach_closed() );</span><br><span style="color: hsl(120, 100%, 40%);">+        execute( TC_attach_no_imei_response() );</span><br><span>     execute( TC_hlr_location_cancel_request_update(), 10.0 );</span><br><span>    execute( TC_hlr_location_cancel_request_withdraw(), 10.0 );</span><br><span>  execute( TC_hlr_location_cancel_request_unknown_subscriber_withdraw(), 10.0 );</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9577">change 9577</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/9577"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ie50c75e62e31e01c5b17969fb067664e44fd68a5 </div>
<div style="display:none"> Gerrit-Change-Number: 9577 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>