summaryrefslogtreecommitdiffstats
path: root/sgsn
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-07-16 15:10:08 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-21 17:54:35 +0000
commit72edc8ad7f45f4fab3f4e55f73f4720abb0236ce (patch)
tree5ed995ad6e59c0da38aca4ef0ec11d201b94da48 /sgsn
parent28bb82990cdba2bbc0e208cdf7e236fa412a84e1 (diff)
sgsn: Add Test to verify timer t3395
Diffstat (limited to 'sgsn')
-rw-r--r--sgsn/SGSN_Tests.ttcn37
-rw-r--r--sgsn/expected-results.xml3
2 files changed, 39 insertions, 1 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 214239e..782d89c 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1303,6 +1303,42 @@ testcase TC_attach_restart_ctr_dettach() runs on test_CT {
g_use_echo := false
}
+/* ATTACH + PDP CTX ACT + user plane traffic + PDP CTX DEACT in MT direction + trigger T3395 */
+private function f_TC_attach_pdp_act_deact_mt_t3395_expire(charstring id) runs on BSSGP_ConnHdlr {
+ var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip));
+ var integer seq_nr := 23;
+ var GtpPeer peer;
+ var integer i;
+
+ /* first perform regular attach */
+ f_TC_attach(id);
+ /* then activate PDP context */
+ f_pdp_ctx_act(apars);
+
+ BSSGP.clear;
+ peer := valueof(ts_GtpPeerC(apars.sgsn_ip_c));
+ GTP.send(ts_GTPC_DeletePDP(peer, seq_nr, apars.sgsn_tei_c, apars.nsapi, '1'B));
+
+ for (i := 0; i < 5; i := i+1) {
+ alt {
+ [] BSSGP.receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) {}
+ [] as_xid(apars);
+ }
+ }
+
+ GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) {}
+
+ BSSGP.send(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid));
+ setverdict(pass);
+}
+testcase TC_attach_pdp_act_deact_mt_t3395_expire() runs on test_CT {
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_attach_pdp_act_deact_mt_t3395_expire), testcasename(), g_gb[0], 25, 60.0);
+ vc_conn.done;
+}
+
private function f_TC_hlr_location_cancel_request_update(charstring id) runs on BSSGP_ConnHdlr {
/* MS: perform regular attach */
f_TC_attach(id);
@@ -1678,6 +1714,7 @@ control {
execute( TC_attach_pdp_act_user_deact_mt() );
execute( TC_attach_second_attempt() );
execute( TC_attach_restart_ctr_dettach() );
+ execute( TC_attach_pdp_act_deact_mt_t3395_expire() );
}
diff --git a/sgsn/expected-results.xml b/sgsn/expected-results.xml
index 2d7063b..f2bf327 100644
--- a/sgsn/expected-results.xml
+++ b/sgsn/expected-results.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<testsuite name='Titan' tests='27' failures='4' errors='3' skipped='0' inconc='0' time='MASKED'>
+<testsuite name='Titan' tests='28' failures='4' errors='3' skipped='0' inconc='0' time='MASKED'>
<testcase classname='SGSN_Tests' name='TC_attach' time='MASKED'/>
<testcase classname='SGSN_Tests' name='TC_attach_mnc3' time='MASKED'/>
<testcase classname='SGSN_Tests' name='TC_attach_umts_aka_umts_res' time='MASKED'/>
@@ -61,4 +61,5 @@
<error type='DTE'></error>
</testcase>
<testcase classname='SGSN_Tests' name='TC_attach_restart_ctr_dettach' time='MASKED'/>
+ <testcase classname='SGSN_Tests' name='TC_attach_pdp_act_deact_mt_t3395_expire' time='MASKED'/>
</testsuite>