summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-11-08 18:32:28 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-11-20 15:57:16 +0100
commit01076214c5ffff74cc93e2ea8eb9ee4029305d03 (patch)
treea9ae5517c40d79a04df4ba92447f9fe71fec10f0
parent26cd244a9f355244029b1888d48290b11c971c88 (diff)
sgsn: Introduce test TC_attach_req_id_req_ra_updatepespin/sgsn
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
-rw-r--r--sgsn/SGSN_Tests.ttcn41
-rw-r--r--sgsn/expected-results.xml1
2 files changed, 41 insertions, 1 deletions
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 @@ private function f_TC_rau_unknown(charstring id) runs on BSSGP_ConnHdlr {
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 @@ testcase TC_attach_pdp_act_gmm_detach() runs on test_CT {
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 @@ control {
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>