summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-05-22 17:09:49 +0200
committerHarald Welte <laforge@gnumonks.org>2018-05-26 21:03:54 +0000
commit6c47f294954f4aadd7f6afc4c2a20291081f71b1 (patch)
tree21ee6345e44b3da3407ee0195634806d669b29d5
parent4cfff3a2bfd31ed823002123b6ae9cd493881139 (diff)
SGSN: add TC_hlr_location_cancel_request_unknown_subscriber_{withdraw,update}
Cancel Location using an unknown IMSI. HLR -> SGSN: Cancel Location Request HLR <- SGSN: Cancel Location Error Change-Id: Iad90c3cc25d72b9ab40e358fe60aa6f62163f146
-rw-r--r--sgsn/SGSN_Tests.ttcn49
1 files changed, 49 insertions, 0 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 1a68014..0685e30 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1280,6 +1280,53 @@ testcase TC_hlr_location_cancel_request_withdraw() runs on test_CT {
}
+private function f_hlr_location_cancel_request_unknown_subscriber(
+ charstring id,
+ GSUP_CancelType canceltype) runs on BSSGP_ConnHdlr {
+
+ /* HLR: cancel the location request */
+ GSUP.send(ts_GSUP_CL_REQ(g_pars.imsi, canceltype));
+
+ /* cause 2 = IMSI_UNKNOWN */
+ GSUP.receive(tr_GSUP_CL_ERR(g_pars.imsi, 2));
+
+ setverdict(pass);
+}
+
+private function f_TC_hlr_location_cancel_request_unknown_subscriber_withdraw(charstring id) runs on BSSGP_ConnHdlr {
+ f_hlr_location_cancel_request_unknown_subscriber(id, OSMO_GSUP_CANCEL_TYPE_WITHDRAW);
+}
+
+testcase TC_hlr_location_cancel_request_unknown_subscriber_withdraw() runs on test_CT {
+ /* HLR -> SGSN: Cancel Location Request
+ * HLR <- SGSN: Cancel Location Error
+ */
+
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_hlr_location_cancel_request_unknown_subscriber_withdraw), testcasename(), g_gb[0], 30);
+ vc_conn.done;
+}
+
+private function f_TC_hlr_location_cancel_request_unknown_subscriber_update(charstring id) runs on BSSGP_ConnHdlr {
+ f_hlr_location_cancel_request_unknown_subscriber(id, OSMO_GSUP_CANCEL_TYPE_WITHDRAW);
+}
+
+testcase TC_hlr_location_cancel_request_unknown_subscriber_update() runs on test_CT {
+ /* HLR -> SGSN: Cancel Location Request
+ * HLR <- SGSN: Cancel Location Error
+ */
+
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_hlr_location_cancel_request_unknown_subscriber_update), testcasename(), g_gb[0], 30);
+ vc_conn.done;
+}
+
+
+
control {
execute( TC_attach() );
execute( TC_attach_mnc3() );
@@ -1294,6 +1341,8 @@ control {
execute( TC_attach_accept_all() );
execute( TC_attach_closed() );
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 );
execute( TC_rau_unknown() );
execute( TC_attach_rau() );
execute( TC_detach_unknown_nopoweroff() );