fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38241?usp=email ) Change subject: s1ap_proxy_test: test E-RAB RELEASE INDICATION ...................................................................... s1ap_proxy_test: test E-RAB RELEASE INDICATION Change-Id: I13584620e28edf529325dc661c4b40d09acacc3f --- M test/s1ap_proxy_test.erl 1 file changed, 32 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/41/38241/1 diff --git a/test/s1ap_proxy_test.erl b/test/s1ap_proxy_test.erl index 5f6167d..78b8688 100644 --- a/test/s1ap_proxy_test.erl +++ b/test/s1ap_proxy_test.erl @@ -33,7 +33,9 @@ {"E-RAB SETUP REQUEST/RESPONSE", ?TC(fun test_e_rab_setup/1)}, {"E-RAB RELEASE COMMAND/RESPONSE", - ?TC(fun test_e_rab_release/1)}, + ?TC(fun test_e_rab_release_cmd/1)}, + {"E-RAB RELEASE INDICATION", + ?TC(fun test_e_rab_release_ind/1)}, {"E-RAB MODIFICATION INDICATION", ?TC(fun test_e_rab_modify_ind/1)}, {"INITIAL CONTEXT SETUP REQUEST/RESPONSE", @@ -65,7 +67,7 @@ ?_assertEqual(SetupRspExp, SetupRspOut)]. -test_e_rab_release(S0) -> +test_e_rab_release_cmd(S0) -> %% [eNB <- MME] E-RAB SETUP REQUEST SetupReqIn = e_rab_setup_req_pdu(?ADDR_U2C, ?TEID_U2C), {_, S1} = s1ap_proxy:handle_pdu(SetupReqIn, S0), @@ -88,6 +90,24 @@ ?_assertEqual(ReleaseRsp, ReleaseRspOut)]. +test_e_rab_release_ind(S0) -> + %% [eNB <- MME] E-RAB SETUP REQUEST + SetupReqIn = e_rab_setup_req_pdu(?ADDR_U2C, ?TEID_U2C), + {_, S1} = s1ap_proxy:handle_pdu(SetupReqIn, S0), + + %% [eNB -> MME] E-RAB SETUP RESPONSE + SetupRspIn = e_rab_setup_rsp_pdu(?ADDR_U2A, ?TEID_U2A), + {_, S2} = s1ap_proxy:handle_pdu(SetupRspIn, S1), + + %% [eNB -> MME] E-RAB RELEASE INDICATION + ReleaseInd = e_rab_release_ind_pdu(), + {ReleaseIndOut, _S3} = s1ap_proxy:handle_pdu(ReleaseInd, S2), + + %% TODO: make sure that the E-RAB FSM has been terminated + + [?_assertEqual(ReleaseInd, ReleaseIndOut)]. + + test_e_rab_modify_ind(S0) -> %% [eNB -> MME] E-RAB MODIFICATION INDICATION ModifyIndIn = e_rab_modify_ind_pdu(?ADDR_U2A, ?TEID_U2A), @@ -185,6 +205,16 @@ >>. +%% [eNB -> MME] E-RAB RELEASE INDICATION +%% TODO: make E-RAB IDs configurable +e_rab_release_ind_pdu() -> + << 16#00, 16#08, 16#00, 16#1b, 16#00, 16#00, 16#03, 16#00, + 16#00, 16#00, 16#03, 16#40, 16#10, 16#92, 16#00, 16#08, + 16#00, 16#02, 16#00, 16#00, 16#00, 16#6e, 16#40, 16#07, + 16#00, 16#00, 16#23, 16#40, 16#02, 16#00, 16#40 + >>. + + %% [eNB -> MME] E-RAB MODIFICATION INDICATION e_rab_modify_ind_pdu(TLA, TEID) when is_binary(TLA), is_integer(TEID) -> -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38241?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I13584620e28edf529325dc661c4b40d09acacc3f Gerrit-Change-Number: 38241 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>