diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2018-07-31 03:16:37 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-08-14 13:26:47 +0000 |
commit | 5dce90da1449a7cc54852aad03b708c1a250ca97 (patch) | |
tree | 70b51746d8b18cb2703567bc0d9071926e35ebf8 /sgsn | |
parent | 51114d1d9b1c03b3a7a35dd3c98416897c2c7755 (diff) |
sgsn: introduce f_routing_area_update()
Will be used by future RAU tests
Change-Id: I4064e013f73319f24bb893a9047c8b9eb7d6aac2
Diffstat (limited to 'sgsn')
-rw-r--r-- | sgsn/SGSN_Tests.ttcn | 35 |
1 files changed, 21 insertions, 14 deletions
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 @@ private function f_TC_attach_rau(charstring id) runs on BSSGP_ConnHdlr { /* 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 @@ testcase TC_attach_check_complete_resend() runs on test_CT { 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() ); |