This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18890 ) Change subject: sgsn: Add series of tests on suspend/resume and paging behavior ...................................................................... sgsn: Add series of tests on suspend/resume and paging behavior Let's test whether paging si triggered after T3314 expiration, as well as suspend and explicit and implicit resume work as expected Change-Id: I83b7a453958e30dfc727ba3140168217c209833f Related: OS#4616 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 162 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/18890/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index c157d39..7a405ca 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -2901,6 +2901,163 @@ f_cleanup(); } +private altstep as_nopaging_ps(integer ran_idx := 0) runs on BSSGP_ConnHdlr { +var PDU_BSSGP rx; +[] BSSGP_SIG[ran_idx].receive(tr_BSSGP_PS_PAGING(?)) -> value rx { + setverdict(fail, "Received unexpected PS PAGING: ", rx); + } +} + +/* SUSPEND, then DL traffic: should not pass + no paging expected */ +private function f_TC_suspend_nopaging(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var default d; + + /* 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)); + + /* now suspend GPRS */ + f_bssgp_suspend(); + + d := activate(as_nopaging_ps()); + + /* at this point we don't expect any downlink traffic at all, neither actual LLC/SNDCP data, + * nor any related paging requests */ + f_gtpu_xceive_mt(apars, f_rnd_octstring(100), expect_fwd := false); + + deactivate(d); +} +testcase TC_suspend_nopaging() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_suspend_nopaging), testcasename(), g_gb, 48); + vc_conn.done; + f_cleanup(); +} + + +/* SUSPEND, then RESUME: data expected to flow after explicit resume */ +private function f_TC_suspend_resume(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var OCT1 susp_ref; + var default d; + + /* 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)); + + /* now suspend GPRS */ + susp_ref := f_bssgp_suspend(); + + d := activate(as_nopaging_ps()); + + /* at this point we don't expect any downlink traffic at all, neither actual LLC/SNDCP data, + * nor any related paging requests */ + f_gtpu_xceive_mt(apars, f_rnd_octstring(100), expect_fwd := false); + + deactivate(d); + + /* resume GPRS */ + f_bssgp_resume(susp_ref); + + /* now data should be flowing again */ + f_gtpu_xceive_mt(apars, f_rnd_octstring(100)); +} +testcase TC_suspend_resume() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_suspend_resume), testcasename(), g_gb, 49); + vc_conn.done; + f_cleanup(); +} + +/* SUSPEND, then RAU: data expected to flow after implicit resume */ +private function f_TC_suspend_rau(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var default d; + + /* 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)); + + /* now suspend GPRS */ + f_bssgp_suspend(); + + d := activate(as_nopaging_ps()); + + /* at this point we don't expect any downlink traffic at all, neither actual LLC/SNDCP data, + * nor any related paging requests */ + f_gtpu_xceive_mt(apars, f_rnd_octstring(100), expect_fwd := false); + + deactivate(d); + + /* perform RAU (implicit RESUME) */ + f_routing_area_update(g_pars.ra); + + /* now data should be flowing again */ + f_gtpu_xceive_mt(apars, f_rnd_octstring(100)); + +} +testcase TC_suspend_rau() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_suspend_rau), testcasename(), g_gb, 50); + vc_conn.done; + f_cleanup(); +} + + +/* wait for T3314 expiration and check that PS PAGING is created on DL PDU */ +private function f_TC_paging_ps(charstring id) runs on BSSGP_ConnHdlr { + var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); + var default d; + + /* 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)); + + /* now wait for T3314 expiration (test_CT below has reduced it to 3s) */ + f_sleep(5.0); + + /* now data should be flowing again, but with PS PAGING */ + f_gtpu_xceive_mt(apars, f_rnd_octstring(100)); + BSSGP_SIG[0].receive(tr_BSSGP_PS_PAGING(?)); + + /* FIXME: simulate paging response */ + /* FIXME: verify PDU actually arrives only after paging response was successful */ + +} +testcase TC_paging_ps() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + f_vty_config(SGSNVTY, "sgsn", "timer 3314 3"); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_paging_ps), testcasename(), g_gb, 51); + vc_conn.done; + f_vty_config(SGSNVTY, "sgsn", "timer 3314 default"); + f_cleanup(); +} + + + + + control { execute( TC_attach() ); execute( TC_attach_mnc3() ); @@ -2958,6 +3115,11 @@ execute( TC_llc_sabm_dm_llgmm() ); execute( TC_llc_sabm_dm_ll5() ); + execute( TC_suspend_nopaging() ); + execute( TC_suspend_resume() ); + execute( TC_suspend_rau() ); + execute( TC_paging_ps() ); + /* At the end, may crash osmo-sgsn, see OS#3957, OS#4245 */ execute( TC_attach_req_id_req_ra_update() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18890 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I83b7a453958e30dfc727ba3140168217c209833f Gerrit-Change-Number: 18890 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200617/64738a9b/attachment.htm>