diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-18 22:04:55 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-18 22:04:55 +0100 |
commit | 6f20316985b912189a130e7a0c485adf78639dd1 (patch) | |
tree | 516efe817ef601530d4807e68fe611324b66866f /sgsn/SGSN_Tests.ttcn | |
parent | 5b5ca1b1e78ebe011081a8ae860145dc2d95e01f (diff) |
sgsn: Add TC_attach_pdp_act_user_deact_mo
Change-Id: I43cb7728658cae6590eb1bd31c7c285b942a265e
Diffstat (limited to 'sgsn/SGSN_Tests.ttcn')
-rw-r--r-- | sgsn/SGSN_Tests.ttcn | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 4369078d..06ed56be 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -257,14 +257,12 @@ runs on BSSGP_ConnHdlr { * ATTACH / RAU ** with / without authentication ** with / without P-TMSI allocation - ** reject from HLR on SAI - ** reject from HLR on UL * re-transmissions of LLC frames * PDP Context activation ** with different GGSN config in SGSN VTY ** with different PDP context type (v4/v6/v46) ** timeout from GGSN - ** reject from GGSN + ** multiple / secondary PDP context */ testcase TC_wait_ns_up() runs on test_CT { @@ -826,6 +824,25 @@ function f_pdp_ctx_act(inout PdpActPars apars) runs on BSSGP_ConnHdlr { } } +function f_pdp_ctx_deact_mo(inout PdpActPars apars, OCT1 cause) runs on BSSGP_ConnHdlr { + var boolean exp_rej := ispresent(apars.exp_rej_cause); + var Gtp1cUnitdata g_ud; + + BSSGP.send(ts_SM_DEACT_PDP_REQ_MO(apars.tid, cause, false, omit)); + GTP.receive(tr_GTPC_MsgType(?, deletePDPContextRequest, apars.ggsn_tei_c)) -> value g_ud { + var integer seq_nr := oct2int(g_ud.gtpc.opt_part.sequenceNumber); + BSSGP.clear; + GTP.send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, apars.sgsn_tei_c, '7F'O)); + } + alt { + [] BSSGP.receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid))) { + setverdict(pass); + } + [] as_xid(apars); + } +} + + /* Table 10.5.156/3GPP TS 24.008 */ template (value) QoSV t_QosDefault := { reliabilityClass := '011'B, /* unacknowledged GTP+LLC, acknowledged RLC */ @@ -1057,6 +1074,27 @@ testcase TC_attach_pdp_act_ggsn_reject() runs on test_CT { vc_conn.done; } +/* ATTACH + PDP CTX ACT + user plane traffic + PDP CTX DEACT in MO direction */ +private function f_TC_attach_pdp_act_user_deact_mo(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_mt(apars, f_rnd_octstring(100)); + f_gtpu_xceive_mo(apars, f_rnd_octstring(200)); + + f_pdp_ctx_deact_mo(apars, '00'O); +} +testcase TC_attach_pdp_act_user_deact_mo() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_TC_attach_pdp_act_user_deact_mo), testcasename(), g_gb[0], 21); + vc_conn.done; +} + control { execute( TC_attach() ); @@ -1078,6 +1116,7 @@ control { execute( TC_pdp_act_unattached() ); execute( TC_attach_pdp_act_user() ); execute( TC_attach_pdp_act_ggsn_reject() ); + execute( TC_attach_pdp_act_user_deact_mo() ); } |