sgsn: introduce f_routing_area_update()
Will be used by future RAU tests
Change-Id: I4064e013f73319f24bb893a9047c8b9eb7d6aac2
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 3616a62..336f38e 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -809,20 +809,8 @@
/* first perform regular attach */
f_TC_attach(id);
- /* then send RAU */
- BSSGP[0].send(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, false, omit, omit));
- alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_RAU_ACCEPT)) -> value bd {
- f_process_rau_accept(bd.l3_mt.msgs.gprs_mm.routingAreaUpdateAccept);
- BSSGP[0].send(ts_GMM_RAU_COMPL);
- setverdict(pass);
- }
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_RAU_REJECT)) {
- setverdict(fail, "Unexpected RAU Reject");
- mtc.stop;
- }
- [] BSSGP[0].receive { repeat; }
- }
+ f_routing_area_update(g_pars.ra);
+
}
testcase TC_attach_rau() runs on test_CT {
var BSSGP_ConnHdlr vc_conn;
@@ -1816,6 +1804,25 @@
vc_conn.done;
}
+private function f_routing_area_update(RoutingAreaIdentificationV ra, integer bssgp := 0) runs on BSSGP_ConnHdlr {
+ var BssgpDecoded bd;
+
+ /* then send RAU */
+ BSSGP[bssgp].send(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, false, omit, omit));
+ alt {
+ [] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_RAU_ACCEPT)) -> value bd {
+ f_process_rau_accept(bd.l3_mt.msgs.gprs_mm.routingAreaUpdateAccept);
+ BSSGP[bssgp].send(ts_GMM_RAU_COMPL);
+ setverdict(pass);
+ }
+ [] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_RAU_REJECT)) {
+ setverdict(fail, "Unexpected RAU Reject");
+ mtc.stop;
+ }
+ [] BSSGP[bssgp].receive { repeat; }
+ }
+}
+
control {
execute( TC_attach() );
execute( TC_attach_mnc3() );