[MERGED] osmo-ttcn3-hacks[master]: Implement TC_attach_auth_sai_reject

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Feb 18 09:54:31 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: Implement TC_attach_auth_sai_reject
......................................................................


Implement TC_attach_auth_sai_reject

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

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 7e1c48e..bb97c64 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -399,6 +399,34 @@
 	vc_conn.done;
 }
 
+/* HLR rejects SAI, expect ATTACH REJECT */
+private function f_TC_attach_auth_sai_reject(charstring id) runs on BSSGP_ConnHdlr {
+	var MobileIdentityLV mi;
+	var RoutingAreaIdentificationV old_ra := f_random_RAI();
+
+	if (ispresent(g_pars.p_tmsi)) {
+		mi := valueof(ts_MI_TMSI_LV(g_pars.p_tmsi));
+	} else {
+		mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+	}
+
+	BSSGP.send(ts_GMM_ATTACH_REQ(mi, old_ra, false, false, omit, omit));
+	alt {
+	[] as_mm_identity();
+	[] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); {
+		GSUP.send(ts_GSUP_SAI_ERR(g_pars.imsi, 23));
+		}
+	}
+	BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?)));
+	setverdict(pass);
+}
+testcase TC_attach_auth_sai_reject() runs on test_CT {
+	var BSSGP_ConnHdlr vc_conn;
+	f_init();
+	vc_conn := f_start_handler(refers(f_TC_attach_auth_sai_reject), testcasename(), g_gb[0], 3);
+	vc_conn.done;
+}
+
 /* HLR never responds to UL REQ, expect ATTACH REJECT */
 private function f_TC_attach_gsup_lu_timeout(charstring id) runs on BSSGP_ConnHdlr {
 	var BssgpDecoded bd;
@@ -574,6 +602,7 @@
 	execute( TC_attach() );
 	execute( TC_attach_auth_id_timeout() );
 	execute( TC_attach_auth_sai_timeout() );
+	execute( TC_attach_auth_sai_reject() );
 	execute( TC_attach_gsup_lu_timeout() );
 	execute( TC_attach_combined() );
 	execute( TC_attach_accept_all() );

-- 
To view, visit https://gerrit.osmocom.org/6557
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a27c26bb2b6372faccd34c48a597a57783a924f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list