pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37625?usp=email )
Change subject: WIP: sgsn: Introduce test TC_attach_pdp_act_pmm_idle_lost_pdp_status ......................................................................
WIP: sgsn: Introduce test TC_attach_pdp_act_pmm_idle_lost_pdp_status
Change-Id: I34a0dabc37ba24d0c9fb1ae2587e7ec8c1b606fa --- M sgsn/SGSN_Tests_Iu.ttcn M sgsn/expected-results.xml 2 files changed, 48 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/25/37625/1
diff --git a/sgsn/SGSN_Tests_Iu.ttcn b/sgsn/SGSN_Tests_Iu.ttcn index 40035ab..2bb4afa 100644 --- a/sgsn/SGSN_Tests_Iu.ttcn +++ b/sgsn/SGSN_Tests_Iu.ttcn @@ -179,6 +179,44 @@ f_cleanup(); }
+/* TODO: same as TC_attach_pdp_act_pmm_idle, but with pdp_status=0000, meaning UE lost status about previous PDP Ctx. + * We should see SGSN doing DeletePDPCtxReq towards GGSN instead of UdatePDPCtxReq, then probably re-create it. */ +private function f_TC_attach_pdp_act_pmm_idle_lost_pdp_status(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip, mp_ranap_cfg[0].sctp_addr.local_ip_addr)); + + /* first perform regular attach */ + f_gmm_attach(umts_aka_challenge := true, force_gsm_sres := false, ran_index := 3); + + f_service_request(ran_index := 3); + + f_pdp_ctx_act(apars, ran_index := 3); + + f_iu_release_req(ts_RanapCause_radio_conn_release); + /* Now UE is in PMM IDLE state at the SGSN. + * Expect SGSN to point GTPU at GGSN back to itself: */ + as_ggsn_gtp_ctx_upd_req(apars, exp_dir_tun := false, ran_index := 3); + + /* Now UE tries to send new data after a while of being IDLE. + * It forgot its previous pdp status, hence := 0000 */ + f_service_request(pdp_status := '0000'O /*NSAPI=5*/, ran_index := 3); + as_ranap_rab_ass_req(apars); + // TODO: expected DeletePDPContextReq.... + //as_ggsn_gtp_ctx_upd_req(apars, exp_dir_tun := true, ran_index := 3); + f_sleep(1.0); + + /* Now UE is in PMM ENABLED state, tear it down to clean up: */ + f_pdp_ctx_deact_mo(apars, '00'O, ran_index := 3); + setverdict(pass); +} +testcase TC_attach_pdp_act_pmm_idle_lost_pdp_status() 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_pmm_idle_lost_pdp_status), testcasename(), g_gb, 1001); + vc_conn.done; + f_cleanup(); +} + control { execute( TC_iu_attach() ); execute( TC_iu_attach_encr() ); diff --git a/sgsn/expected-results.xml b/sgsn/expected-results.xml index 8b17802..7b38e99 100644 --- a/sgsn/expected-results.xml +++ b/sgsn/expected-results.xml @@ -94,6 +94,7 @@ <testcase classname='SGSN_Tests_Iu' name='TC_geran_attach_iu_rau' time='MASKED'/> <testcase classname='SGSN_Tests_Iu' name='TC_attach_pdp_act_user' time='MASKED'/> <testcase classname='SGSN_Tests_Iu' name='TC_attach_pdp_act_pmm_idle' time='MASKED'/> + <testcase classname='SGSN_Tests_Iu' name='TC_attach_pdp_act_pmm_idle_lost_pdp_status' time='MASKED'/> <!-- SGSN_Tests_NS (handle_sns == true) testcases start here --> <testcase classname='SGSN_Tests_NS' name='TC_SNS_size' time='MASKED'/> <testcase classname='SGSN_Tests_NS' name='TC_SNS_size_too_big' time='MASKED'/>