fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36625?usp=email )


Change subject: sgsn: add TC_attach_rau_invalid_old_rai
......................................................................

sgsn: add TC_attach_rau_invalid_old_rai

This testcase currently crashes osmo-sgsn.

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



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/25/36625/1

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 0371e29..d55a264 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -2755,6 +2755,49 @@
        f_cleanup();
 }

+private function f_TC_attach_rau_invalid_old_rai(charstring id) runs on 
BSSGP_ConnHdlr {
+       timer T;
+
+       /* perform regular attach */
+       f_TC_attach(id);
+
+       /* perform RAU via cell A */
+       f_routing_area_update(g_pars.ra);
+
+       f_bssgp_client_unregister(g_pars.imsi);
+       f_bssgp_client_register(g_pars.imsi, g_pars.tlli, BSSGP_PROC[1]);
+
+       /* perform RAU via cell B, but indicating the new RAI as the old RAI */
+       var RoutingAreaIdentificationV old_ra := 
f_cellid_to_RAI(g_pars.bssgp_cell_id[1]);
+       f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra), 1);
+
+       T.start(2.0);
+       alt {
+       [] BSSGP[1].receive(tr_GMM_RAU_REJECT) {
+               setverdict(pass);
+               T.stop;
+               }
+       [] BSSGP[1].receive(tr_LLC_XID_MT_CMD(?, ?)) { repeat; }
+       [] T.timeout {
+               setverdict(fail, "Timeout waiting for RAU Reject");
+               mtc.stop;
+               }
+       }
+
+       /* perform RAU via cell B, this time with proper old RAI of cell A */
+       f_routing_area_update(old_ra := g_pars.ra, ran_index := 1);
+
+       f_detach_mo(c_GMM_DTT_MO_GPRS, true, true, 1);
+}
+testcase TC_attach_rau_invalid_old_rai() runs on test_CT {
+       var BSSGP_ConnHdlr vc_conn;
+       f_init();
+       f_sleep(1.0);
+       vc_conn := f_start_handler(refers(f_TC_attach_rau_invalid_old_rai), 
testcasename(), g_gb, 138);
+       vc_conn.done;
+       f_cleanup();
+}
+
 private function f_TC_attach_gmm_attach_req_while_gmm_attach(charstring id) 
runs on BSSGP_ConnHdlr {
        var integer count_req := 0;
        var MobileIdentityLV mi;
@@ -3984,6 +4027,8 @@

        /* At the end, may crash osmo-sgsn, see OS#3957, OS#4245 */
        execute( TC_attach_req_id_req_ra_update() );
+       /* At the end, may crash osmo-sgsn */
+       execute( TC_attach_rau_invalid_old_rai() );
 }



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36625?usp=email
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: I006adabdad26c0c48e1ebe99421bcab7295dc147
Gerrit-Change-Number: 36625
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanits...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to