pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40271?usp=email )
Change subject: hnbgw: Introduce altstep as_pfcp_handle_del_req() ...................................................................... hnbgw: Introduce altstep as_pfcp_handle_del_req() Change-Id: I94101b5f0ad8634db68f0a9d5230c00926b02061 --- M hnbgw/ConnHdlr.ttcn M hnbgw/HNBGW_Tests.ttcn 2 files changed, 25 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/71/40271/1 diff --git a/hnbgw/ConnHdlr.ttcn b/hnbgw/ConnHdlr.ttcn index d722b60..093677d 100644 --- a/hnbgw/ConnHdlr.ttcn +++ b/hnbgw/ConnHdlr.ttcn @@ -573,11 +573,14 @@ T.stop; } if (pfcp_teardown) { - var PDU_PFCP m; - m := f_pfcp_expect(tr_PFCP_Session_Del_Req(g_pars.pfcp_pars.upf_f_seid.seid)); - PFCP.send(ts_PFCP_Session_Del_Resp(m.sequence_number, g_pars.pfcp_pars.hnbgw_f_seid.seid)); - /* ask PFCPEM to *not* route PDUs with this specific SEID to us */ - f_PFCPEM_unsubscribe_seid(g_pars.pfcp_pars.upf_f_seid.seid); + T.start(5.0); + alt { + [] as_pfcp_handle_del_req() {} + [] T.timeout { + setverdict(fail, "Timeout waiting for PFCP Del Sess Req"); + } + } + T.stop; } tx := valueof(ts_RANAP_IuReleaseComplete()); @@ -982,6 +985,22 @@ } } +altstep as_pfcp_handle_del_req() runs on ConnHdlr +{ + var template (present) PDU_PFCP exp_rx := tr_PFCP_Session_Del_Req(g_pars.pfcp_pars.upf_f_seid.seid); + var PDU_PFCP m; + + [] PFCP.receive(exp_rx) -> value m { + PFCP.send(ts_PFCP_Session_Del_Resp(m.sequence_number, g_pars.pfcp_pars.hnbgw_f_seid.seid)); + /* ask PFCPEM to *not* route PDUs with this specific SEID to us */ + f_PFCPEM_unsubscribe_seid(g_pars.pfcp_pars.upf_f_seid.seid); + } + [] PFCP.receive(PDU_PFCP:?) -> value m { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Got an unexpected PFCP message: ", m, " vs exp ", exp_rx)); + } +} + function f_perform_compl_l3(octetstring nas, boolean do_clear := true, boolean expect_success := true) runs on ConnHdlr { timer T := 10.0; diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index a123dda..2ce36d5 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -1542,8 +1542,7 @@ /* HNBGW tears down related PFCP sessions: */ if (g_pars.pfcp_pars.pfcp_enabled) { - var PDU_PFCP m := f_pfcp_expect(tr_PFCP_Session_Del_Req(g_pars.pfcp_pars.upf_f_seid.seid)); - PFCP.send(ts_PFCP_Session_Del_Resp(m.sequence_number, g_pars.pfcp_pars.hnbgw_f_seid.seid)); + as_pfcp_handle_del_req(); } /* We cannot guarantee we can send Iu-ReleaseCommand at RANAP_Emulation -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40271?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I94101b5f0ad8634db68f0a9d5230c00926b02061 Gerrit-Change-Number: 40271 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pes...@sysmocom.de>