aboutsummaryrefslogtreecommitdiffstats
path: root/sgsn
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-05-22 16:09:54 +0200
committerHarald Welte <laforge@gnumonks.org>2018-05-26 21:03:54 +0000
commitc87967a0226cde3fddb2fe1c2aea49e8d455cca2 (patch)
treee50c86bdd637d8a0c84fd8d0c56a847cee664f56 /sgsn
parentd62fba5401d442ffb9fcb18cf45a4b46e19b8c9b (diff)
SGSN: add TC_hlr_location_cancel_request
MS <-> SGSN: GMM Attach HLR -> SGSN: Cancel Location Request HLR <- SGSN: Cancel Location Ack MS <- SGSN: Detach Request SGSN-> MS: Detach Complete Change-Id: Id5d6b018a5a4389eefa8f5d950324aab91709f5a
Diffstat (limited to 'sgsn')
-rw-r--r--sgsn/SGSN_Tests.ttcn32
1 files changed, 32 insertions, 0 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index e1d35c53..1a680144 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1249,6 +1249,37 @@ testcase TC_attach_second_attempt() runs on test_CT {
}
+private function f_TC_hlr_location_cancel_request_withdraw(charstring id) runs on BSSGP_ConnHdlr {
+ /* MS: perform regular attach */
+ f_TC_attach(id);
+
+ /* HLR: cancel the location request */
+ GSUP.send(ts_GSUP_CL_REQ(g_pars.imsi, OSMO_GSUP_CANCEL_TYPE_WITHDRAW));
+ GSUP.receive(tr_GSUP_CL_RES(g_pars.imsi));
+ GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
+
+ /* MS: receive a Detach Request */
+ BSSGP.receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(c_GMM_DTT_MT_IMSI_DETACH, ?, ?)));
+ BSSGP.send(ts_GMM_DET_ACCEPT_MO);
+
+ setverdict(pass);
+}
+
+testcase TC_hlr_location_cancel_request_withdraw() runs on test_CT {
+ /* MS <-> SGSN: GMM Attach
+ * HLR -> SGSN: Cancel Location Request
+ * HLR <- SGSN: Cancel Location Ack
+ * MS <- SGSN: Detach Request
+ * SGSN-> MS: Detach Complete
+ */
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_hlr_location_cancel_request_withdraw), testcasename(), g_gb[0], 29);
+ vc_conn.done;
+}
+
+
control {
execute( TC_attach() );
execute( TC_attach_mnc3() );
@@ -1262,6 +1293,7 @@ control {
execute( TC_attach_combined() );
execute( TC_attach_accept_all() );
execute( TC_attach_closed() );
+ execute( TC_hlr_location_cancel_request_withdraw(), 5.0 );
execute( TC_rau_unknown() );
execute( TC_attach_rau() );
execute( TC_detach_unknown_nopoweroff() );