lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/9251


Change subject: SGSN: add TC_hlr_location_cancel_request_update
......................................................................

SGSN: add TC_hlr_location_cancel_request_update

MS <-> SGSN: GMM Attach
HLR -> SGSN: Cancel Location Request
HLR <- SGSN: Cancel Location Ack

Change-Id: I5d3a818eb0a4eb3b0d4bd7bd88874bd2ac6adb11
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 40 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/51/9251/1

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 860ca09..bce0241 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1249,6 +1249,45 @@
 }


+private function f_TC_hlr_location_cancel_request_update(charstring id) runs 
on BSSGP_ConnHdlr {
+       /* MS: perform regular attach */
+       f_TC_attach(id);
+
+       /* HLR: cancel the location request */
+       var GSUP_PDU gsup;
+       gsup := valueof(ts_GSUP_CL_REQ(g_pars.imsi, 
OSMO_GSUP_CANCEL_TYPE_UPDATE));
+       GSUP.send(gsup);
+       GSUP.receive(tr_GSUP_CL_RES(g_pars.imsi));
+       GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
+
+       /* ensure no Detach Request got received */
+       timer T := 5.0;
+       T.start;
+       alt {
+               [] 
BSSGP.receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(c_GMM_DTT_MT_IMSI_DETACH, ?, ?))) {
+                       T.stop;
+                       setverdict(fail, "Unexpected GMM Detach Request");
+                }
+               [] T.timeout {
+                       setverdict(pass);
+                       self.stop;
+               }
+       }
+}
+
+testcase TC_hlr_location_cancel_request_update() runs on test_CT {
+       /* MS <-> SGSN: GMM Attach
+        * HLR -> SGSN: Cancel Location Request
+        * HLR <- SGSN: Cancel Location Ack
+        */
+       var BSSGP_ConnHdlr vc_conn;
+       f_init();
+       f_sleep(1.0);
+       vc_conn := 
f_start_handler(refers(f_TC_hlr_location_cancel_request_update), 
testcasename(), g_gb[0], 31);
+       vc_conn.done;
+}
+
+
 private function f_TC_hlr_location_cancel_request_withdraw(charstring id) runs 
on BSSGP_ConnHdlr {
        /* MS: perform regular attach */
        f_TC_attach(id);
@@ -1344,6 +1383,7 @@
        execute( TC_attach_combined() );
        execute( TC_attach_accept_all() );
        execute( TC_attach_closed() );
+       execute( TC_hlr_location_cancel_request_update(), 10.0 );
        execute( TC_hlr_location_cancel_request_withdraw(), 5.0 );
        execute( TC_hlr_location_cancel_request_unknown_subscriber_withdraw(), 
5.0 );
        execute( TC_hlr_location_cancel_request_unknown_subscriber_update(), 
5.0 );

--
To view, visit https://gerrit.osmocom.org/9251
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d3a818eb0a4eb3b0d4bd7bd88874bd2ac6adb11
Gerrit-Change-Number: 9251
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lyn...@fe80.eu>

Reply via email to