summaryrefslogtreecommitdiffstats
path: root/sgsn
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-06-12 19:08:44 +0200
committerAlexander Couzens <lynxis@fe80.eu>2018-06-14 01:55:31 +0200
commit0085bd7148152bf0f6a43c19f083913d49e31593 (patch)
tree501d410fa45f8f0ce0445c1589ac0ca3fdc014ba /sgsn
parent0ca0d9caf1bbf9fed99e86c547dd8e8166835f4a (diff)
sgsn: add TC_attach_check_complete_resend()
MS -> SGSN: Attach Request IMSI MS <- SGSN: Identity Request * MS -> SGSN: Identity Response * MS <- SGSN: Attach Complete 5x Change-Id: I9bbbda01f3c41a2f8acf13042d6bcc86f18d74ce
Diffstat (limited to 'sgsn')
-rw-r--r--sgsn/SGSN_Tests.ttcn37
1 files changed, 37 insertions, 0 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 466c3ed..017c724 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1553,6 +1553,42 @@ testcase TC_attach_closed_add_vty() runs on test_CT {
vc_conn.done;
}
+/* Attempt an attach, but never answer a Attach Complete */
+private function f_TC_attach_check_complete_resend(charstring id) runs on BSSGP_ConnHdlr {
+ var integer count_req := 0;
+
+ BSSGP.send(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
+ f_gmm_auth();
+
+ alt {
+ [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ /* break */
+ }
+ [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) {
+ /* ignore */
+ count_req := count_req + 1;
+ repeat;
+ }
+ }
+ if (count_req != 5) {
+ setverdict(fail, "Did not received GMM Attach Complete.");
+ }
+ setverdict(pass);
+}
+
+testcase TC_attach_check_complete_resend() runs on test_CT {
+ /* MS -> SGSN: Attach Request IMSI
+ * MS <- SGSN: Identity Request *
+ * MS -> SGSN: Identity Response *
+ * MS <- SGSN: Attach Complete 5x
+ */
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_attach_check_complete_resend), testcasename(), g_gb[0], 36, 60.0);
+ vc_conn.done;
+}
+
control {
execute( TC_attach() );
execute( TC_attach_mnc3() );
@@ -1571,6 +1607,7 @@ control {
execute( TC_attach_closed_add_vty(), 10.0 );
execute( TC_attach_check_subscriber_list(), 10.0 );
execute( TC_attach_detach_check_subscriber_list(), 10.0 );
+ execute( TC_attach_check_complete_resend() );
execute( TC_hlr_location_cancel_request_update(), 10.0 );
execute( TC_hlr_location_cancel_request_withdraw(), 10.0 );
execute( TC_hlr_location_cancel_request_unknown_subscriber_withdraw(), 10.0 );