Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update

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/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Nov 23 08:00:48 UTC 2019


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 )

Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update
......................................................................

sgsn: Introduce test TC_attach_req_id_req_ra_update

The scenario in this test triggers a crash in osmo-sgsn fixed by
osmo-sgsn.git I64fa5cf1b427d3abb99e553e584897261a827ce6.

With that osmo-sgsn patch applied, the process doesn't crash anymore but
the test still fails due to an XID message being sent with a new
yet-not-seen-by-ttcn3 TLLI and as a result TTCN3 BSSGP_Emulation fails:
BSSGP_Emulation.ttcn:390 setverdict(fail): none -> fail reason: "Couldn't find Component for TLLI 'FE791757'O", new component reason: "Couldn't find Component for TLLI 'FE791757'O"

Other than that, the test runs fine. It still needs to be clarified
whether the new TLLI sent by osmo-sgsn is expected and test needs to be
fixed, or whether it's an sgsn bug.

Related: OS#3957, OS#4245
Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8
---
M sgsn/SGSN_Tests.ttcn
M sgsn/expected-results.xml
2 files changed, 41 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index a89a949..f070429 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1070,7 +1070,7 @@
 
 	f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit));
 	alt {
-	[] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) {
+	[] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) { /* gmm cause: implicitly detached */
 		setverdict(pass);
 		}
 	/* FIXME: Expect XID RESET? */
@@ -2814,6 +2814,42 @@
 	f_cleanup();
 }
 
+private function f_TC_attach_req_id_req_ra_update(charstring id) runs on BSSGP_ConnHdlr {
+	var RoutingAreaIdentificationV old_ra := f_random_RAI();
+	var RoutingAreaIdentificationV new_ra := f_random_RAI();
+	while (old_ra == new_ra) { new_ra := f_random_RAI(); };
+	var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit);
+	var PDU_L3_SGSN_MS l3_mt;
+
+	f_send_l3(attach_req, 0);
+
+	BSSGP[0].receive(tr_GMM_ID_REQ(?));
+
+	f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, new_ra, false, omit, omit));
+	alt {
+	[] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) {
+		setverdict(pass);
+		}
+	[] BSSGP[0].receive { repeat; }
+	}
+}
+
+/* This test triggers crash in osmo-sgsn before osmo-sgsn.git I64fa5cf1b427d3abb99e553e584897261a827ce6.
+ * See OS#3957 and OS#4245 for more information.
+ */
+testcase TC_attach_req_id_req_ra_update() runs on test_CT {
+	/*
+	 * MS --> SGSN: Attach Req (TMSI, RAI=901-70-356-101)
+	 * MS <-- SGSN: Identity Request (IMEI)
+	 * MS --> SGSN: RA Updating (RAI=901-70-2758-208)
+	 */
+	var BSSGP_ConnHdlr vc_conn;
+	f_init();
+	vc_conn := f_start_handler(refers(f_TC_attach_req_id_req_ra_update), testcasename(), g_gb, 47);
+	vc_conn.done;
+	f_cleanup();
+}
+
 control {
 	execute( TC_attach() );
 	execute( TC_attach_mnc3() );
@@ -2870,6 +2906,9 @@
 	execute( TC_llc_null() );
 	execute( TC_llc_sabm_dm_llgmm() );
 	execute( TC_llc_sabm_dm_ll5() );
+
+	/* At the end, may crash osmo-sgsn, see OS#3957, OS#4245 */
+	execute( TC_attach_req_id_req_ra_update() );
 }
 
 
diff --git a/sgsn/expected-results.xml b/sgsn/expected-results.xml
index fc8856a..8381064 100644
--- a/sgsn/expected-results.xml
+++ b/sgsn/expected-results.xml
@@ -62,4 +62,5 @@
   <testcase classname='SGSN_Tests' name='TC_attach_pdp_act_deact_gtp_retrans_resp' time='MASKED'/>
   <testcase classname='SGSN_Tests' name='TC_attach_pdp_act_user_error_ind_ggsn' time='MASKED'/>
   <testcase classname='SGSN_Tests' name='TC_attach_gmm_attach_req_while_gmm_attach' time='MASKED'/>
+  <testcase classname='SGSN_Tests' name='TC_attach_req_id_req_ra_update' time='MASKED'/>
 </testsuite>

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8
Gerrit-Change-Number: 16016
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191123/bad8c625/attachment.htm>


More information about the gerrit-log mailing list