aboutsummaryrefslogtreecommitdiffstats
path: root/sgsn/SGSN_Tests.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'sgsn/SGSN_Tests.ttcn')
-rw-r--r--sgsn/SGSN_Tests.ttcn37
1 files changed, 31 insertions, 6 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index d76c182b..78086af6 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -959,19 +959,22 @@ function f_pdp_ctx_deact_mo(inout PdpActPars apars, OCT1 cause) runs on BSSGP_Co
}
}
-function f_pdp_ctx_deact_mt(inout PdpActPars apars, OCT1 cause) runs on BSSGP_ConnHdlr {
+function f_pdp_ctx_deact_mt(inout PdpActPars apars, boolean error_ind := false) runs on BSSGP_ConnHdlr {
var Gtp1cUnitdata g_ud;
var integer seq_nr := 23;
var GtpPeer peer := valueof(ts_GtpPeerC(apars.sgsn_ip_c));
BSSGP.clear;
- GTP.send(ts_GTPC_DeletePDP(peer, seq_nr, apars.sgsn_tei_c, apars.nsapi, '1'B));
-
- interleave {
+ if (error_ind) {
+ GTP.send(ts_GTPU_ErrorIndication(peer, 0 /* seq */, apars.ggsn_tei_u, apars.ggsn_ip_u));
+ } else {
+ GTP.send(ts_GTPC_DeletePDP(peer, seq_nr, apars.sgsn_tei_c, apars.nsapi, '1'B));
+ }
+ alt {
[] BSSGP.receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) {
BSSGP.send(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid));
}
- [] GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) { }
+ [not error_ind] GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) { }
}
}
@@ -1241,7 +1244,7 @@ private function f_TC_attach_pdp_act_user_deact_mt(charstring id) runs on BSSGP_
f_gtpu_xceive_mt(apars, f_rnd_octstring(100));
f_gtpu_xceive_mo(apars, f_rnd_octstring(200));
- f_pdp_ctx_deact_mt(apars, '00'O);
+ f_pdp_ctx_deact_mt(apars, false);
}
testcase TC_attach_pdp_act_user_deact_mt() runs on test_CT {
var BSSGP_ConnHdlr vc_conn;
@@ -1411,6 +1414,27 @@ private function f_TC_hlr_location_cancel_request_update(charstring id) runs on
}
}
+/* ATTACH + PDP CTX ACT + user plane traffic + ERROR IND in MT direction */
+private function f_TC_attach_pdp_act_user_error_ind_ggsn(charstring id) runs on BSSGP_ConnHdlr {
+ var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip));
+
+ /* first perform regular attach */
+ f_TC_attach(id);
+ /* then activate PDP context */
+ f_pdp_ctx_act(apars);
+ /* then transceive a downlink PDU */
+ f_gtpu_xceive_mo(apars, f_rnd_octstring(200));
+
+ /* Send Error indication as response from upload PDU and expect deact towards MS */
+ f_pdp_ctx_deact_mt(apars, true);
+}
+testcase TC_attach_pdp_act_user_error_ind_ggsn() runs on test_CT {
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ vc_conn := f_start_handler(refers(f_TC_attach_pdp_act_user_error_ind_ggsn), testcasename(), g_gb[0], 26);
+ vc_conn.done;
+}
+
testcase TC_hlr_location_cancel_request_update() runs on test_CT {
/* MS <-> SGSN: GMM Attach
* HLR -> SGSN: Cancel Location Request
@@ -1762,6 +1786,7 @@ control {
execute( TC_attach_restart_ctr_echo() );
execute( TC_attach_restart_ctr_create() );
execute( TC_attach_pdp_act_deact_mt_t3395_expire() );
+ execute( TC_attach_pdp_act_user_error_ind_ggsn() );
}