[MERGED] osmo-ttcn3-hacks[master]: sgsn: Add TC_attach_combined

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


Harald Welte has submitted this change and it was merged.

Change subject: sgsn: Add TC_attach_combined
......................................................................


sgsn: Add TC_attach_combined

Change-Id: I87700d89389f4adb60a056d139674bb5f5addf7b
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 33 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 fd5a664..d667482 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -387,6 +387,38 @@
 	vc_conn.done;
 }
 
+/* Attempt of combined GPRS + IMSI attach: network should ACK only GPRS attach  */
+private function f_TC_attach_combined(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, true, false, omit, omit));
+	f_gmm_auth();
+	/* Expect MSC to perform LU with HLR */
+	GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
+	GSUP.send(ts_GSUP_ISD_REQ(g_pars.imsi, g_pars.msisdn));
+	GSUP.receive(tr_GSUP_ISD_RES(g_pars.imsi));
+	GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
+
+	BSSGP.receive(tr_BD_L3(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)));
+	BSSGP.send(ts_GMM_ATTACH_COMPL);
+	setverdict(pass);
+}
+
+testcase TC_attach_combined() runs on test_CT {
+	var BSSGP_ConnHdlr vc_conn;
+	f_init();
+	f_sleep(1.0);
+	vc_conn := f_start_handler(refers(f_TC_attach_combined), testcasename(), g_gb[0], 5);
+	vc_conn.done;
+}
+
 
 
 control {
@@ -394,6 +426,7 @@
 	execute( TC_attach_auth_id_timeout() );
 	execute( TC_attach_auth_sai_timeout() );
 	execute( TC_attach_gsup_lu_timeout() );
+	execute( TC_attach_combined() );
 }
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I87700d89389f4adb60a056d139674bb5f5addf7b
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