lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

August 2024

  • 1 participants
  • 1478 discussions
[M] Change in ...osmo-s1gw[master]: s1ap_proxy: Support replying errors
by pespin 23 Aug '24

23 Aug '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37924?usp=email ) Change subject: s1ap_proxy: Support replying errors ...................................................................... s1ap_proxy: Support replying errors Sometimes it is needed not only to forward, but to transmit messages initiated at the s1gw. This is the case for instance if the MME wants to initiate a eRAB but the co-located UPF is not available at the time. This patch all the generic infrastructure to be able to reply (errors) and implements the above mentioned specific case. Change-Id: I242e84fb09b00f4794b6e1aa770f348a0e60aea4 --- M src/s1ap_proxy.erl M src/sctp_proxy.erl M test/s1ap_proxy_test.erl 3 files changed, 110 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/24/37924/1 diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index f28ff56..dd053db 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -78,7 +78,7 @@ %% Process an S1AP PDU --spec handle_pdu(binary(), proxy_state()) -> {binary(), proxy_state()}. +-spec handle_pdu(binary(), proxy_state()) -> {binary(), binary(), proxy_state()}. handle_pdu(Data, S) when is_binary(Data) -> case decode_pdu(Data) of {ok, Pdu} -> @@ -86,7 +86,7 @@ handle_pdu(Data, Pdu, S); {error, {asn1, Error}} -> ?LOG_ERROR("S1AP PDU decoding failed: ~p", [Error]), - {Data, S} + {Data, undefined, S} end. @@ -119,13 +119,30 @@ %% Attempt to encode a new (modified) S1AP PDU, %% return a new binary() on success or Data on error. handle_pdu_new(Data, NewPdu, S) -> - case encode_pdu(NewPdu) of - {ok, NewData} -> - {NewData, S}; - {error, {asn1, Error}} -> - ?LOG_ERROR("S1AP PDU encoding failed: ~p", [Error]), - {Data, S} - end. + handle_pdu_new(Data, NewPdu, undefined, S). + +handle_pdu_new(Data, NewPdu, ReplyPdu, S) -> + case NewPdu of + undefined -> NewData = undefined; + _ -> + case encode_pdu(NewPdu) of + {ok, NewData} -> ok; + {error, {asn1, Error1}} -> + ?LOG_ERROR("S1AP PDU encoding failed: ~p -> ~p", [NewPdu, Error1]), + NewData = Data + end + end, + case ReplyPdu of + undefined -> NewReplyData = undefined; + _ -> + case encode_pdu(ReplyPdu) of + {ok, NewReplyData} -> ok; + {error, {asn1, Error2}} -> + ?LOG_ERROR("S1AP PDU encoding failed: ~p -> ~p", [NewPdu, Error2]), + NewReplyData = undefined + end + end, + {NewData, NewReplyData, S}. %% 9.1.3.1 E-RAB SETUP REQUEST @@ -133,10 +150,20 @@ #'InitiatingMessage'{procedureCode = ?'id-E-RABSetup', value = Content} = Pdu}, S0) -> ?LOG_DEBUG("Patching E-RAB SETUP REQUEST"), - {IEs, S1} = handle_ies(Content#'E-RABSetupRequest'.protocolIEs, + Result = handle_ies(Content#'E-RABSetupRequest'.protocolIEs, ?'id-E-RABToBeSetupListBearerSUReq', S0), - NewContent = Content#'E-RABSetupRequest'{protocolIEs = IEs}, - handle_pdu_new(Data, {Outcome, Pdu#'InitiatingMessage'{value = NewContent}}, S1); + case Result of + {error, Reason, S1} -> + ?LOG_NOTICE("Patching E-RAB SETUP REQUEST failed: ~p", [Reason]), + %% Send E-RABSetupResponse with error to ENB... + ?LOG_NOTICE("Tx RABSetupResponse(~p, ~p) to MME", [S1#proxy_state.mme_ue_id, S1#proxy_state.enb_ue_id]), + ReplyPdu = build_erab_setup_response_failure(S1), + handle_pdu_new(Data, undefined, ReplyPdu, S1); + {IEs, S1} -> + NewContent = Content#'E-RABSetupRequest'{protocolIEs = IEs}, + NewPdu = {Outcome, Pdu#'InitiatingMessage'{value = NewContent}}, + handle_pdu_new(Data, NewPdu, undefined, S1) + end; %% 9.1.3.2 E-RAB SETUP RESPONSE handle_pdu(Data, {Outcome = successfulOutcome, @@ -212,11 +239,11 @@ %% Proxy all other messages unmodified handle_pdu(Data, _Pdu, S) -> - {Data, S}. + {Data, undefined, S}. %% Handle a single IE (Information Element) --spec handle_ie(tuple(), proxy_state()) -> {tuple(), proxy_state()}. +-spec handle_ie(tuple(), proxy_state()) -> {tuple(), proxy_state()} | {error, tuple(), proxy_state()}. %% E-RAB SETUP REQUEST related IEs handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABToBeSetupListBearerSUReq', @@ -231,10 +258,14 @@ 'transportLayerAddress' = TLA_In, 'gTP-TEID' = << TEID_In:32/big >>} = C0, {Pid, S1} = erab_fsm_start_reg(ERABId, S0), - {ok, {TEID_Out, TLA_Out}} = erab_fsm:erab_setup_req(Pid, {TEID_In, TLA_In}), - C1 = C0#'E-RABToBeSetupItemBearerSUReq'{'transportLayerAddress' = TLA_Out, - 'gTP-TEID' = << TEID_Out:32/big >>}, - {C1, S1}; + Result = erab_fsm:erab_setup_req(Pid, {TEID_In, TLA_In}), + case Result of + {ok, {TEID_Out, TLA_Out}} -> + C1 = C0#'E-RABToBeSetupItemBearerSUReq'{'transportLayerAddress' = TLA_Out, + 'gTP-TEID' = << TEID_Out:32/big >>}, + {C1, S1}; + {error, Reason} -> {error, Reason, S1} + end; %% E-RAB SETUP RESPONSE related IEs handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABSetupListBearerSURes', @@ -255,7 +286,7 @@ 'gTP-TEID' = << TEID_Out:32/big >>}; error -> ?LOG_ERROR("E-RAB-ID ~p is not registered", [ERABId]), - C0 %% XXX: proxy as-is or drop? + C0 %% XXX: proxy as-is or drop? {error, Reason, S} end, {C1, S}; @@ -366,16 +397,19 @@ %% Iterate over the given list of 'ProtocolIE-Field' IEs, %% calling function handle_ie/1 for IEs matching the given IEI. %% Additionally look for {MME,eNB}-UE-S1AP-ID IEs and store their values. --spec handle_ies(list(), integer(), proxy_state()) -> {list(), proxy_state()}. +-spec handle_ies(list(), integer(), proxy_state()) -> {list(), proxy_state()} | {error, tuple(), proxy_state()}. handle_ies(IEs, IEI, S) -> handle_ies([], IEs, IEI, S). handle_ies(Acc, [IE | IEs], IEI, S0) -> case IE of #'ProtocolIE-Field'{id = IEI} -> - {Content, S1} = handle_ie(IE, S0), - NewIE = IE#'ProtocolIE-Field'{value = Content}, - handle_ies([NewIE | Acc], IEs, IEI, S1); + case handle_ie(IE, S0) of + {error, Reason, S1} -> {error, Reason, S1}; + {Content, S1} -> + NewIE = IE#'ProtocolIE-Field'{value = Content}, + handle_ies([NewIE | Acc], IEs, IEI, S1) + end; #'ProtocolIE-Field'{id = ?'id-MME-UE-S1AP-ID', value = Id} -> S1 = S0#proxy_state{mme_ue_id = Id}, handle_ies([IE | Acc], IEs, IEI, S1); @@ -390,6 +424,23 @@ {lists:reverse(Acc), S}. +build_erab_setup_response_failure(S) -> + [{_, _, FirstERABid}|_] = dict:fetch_keys(S#proxy_state.erabs), %% TODO: iterate state erabs... + ERABitem = #'E-RABItem'{'e-RAB-ID' = FirstERABid, cause = {transport, 'transport-resource-unavailable'}}, + ERABlist = [#'ProtocolIE-Field'{id = ?'id-E-RABItem', criticality = ignore, value = ERABitem}], + IEs = [ + #'ProtocolIE-Field'{id = ?'id-MME-UE-S1AP-ID', criticality = ignore, value = S#proxy_state.mme_ue_id}, + #'ProtocolIE-Field'{id = ?'id-eNB-UE-S1AP-ID', criticality = ignore, value = S#proxy_state.enb_ue_id}, + #'ProtocolIE-Field'{id = ?'id-E-RABFailedToSetupListBearerSURes', criticality = ignore, value = ERABlist} + ], + ReplyContent = #'E-RABSetupResponse'{protocolIEs = IEs}, + ReplyPdu = {successfulOutcome, + #'SuccessfulOutcome'{procedureCode = ?'id-E-RABSetup', + criticality = reject, + value = ReplyContent}}, + ReplyPdu. + + -spec erab_fsm_start_reg(erab_id(), proxy_state()) -> {pid(), proxy_state()}. erab_fsm_start_reg(RABId, #proxy_state{erabs = ERABs, mme_ue_id = MmeUeId, diff --git a/src/sctp_proxy.erl b/src/sctp_proxy.erl index 3ebabbd..83a5bc9 100644 --- a/src/sctp_proxy.erl +++ b/src/sctp_proxy.erl @@ -161,11 +161,22 @@ %% Handle an #sctp_sndrcvinfo event (MME -> eNB data) connected(info, {sctp, _Socket, MmeAddr, MmePort, {[#sctp_sndrcvinfo{assoc_id = Aid}], Data}}, - #{enb_aid := EnbAid, priv := Priv} = S) -> + #{sock := Sock, + enb_aid := EnbAid, + mme_aid := Aid, + priv := Priv} = S) -> ?LOG_DEBUG("MME connection (id=~p, ~p:~p) -> eNB: ~p", [Aid, MmeAddr, MmePort, Data]), - {NewData, NewPriv} = handle_pdu(Data, Priv), - sctp_server:send_data(EnbAid, NewData), + {NewData, ReplyData, NewPriv} = handle_pdu(Data, Priv), + case {NewData, ReplyData} of + {undefined, undefined} -> ok; + {undefined, ReplyData} -> ok = sctp_client:send_data({Sock, Aid}, ReplyData); + {NewData, undefined} -> sctp_server:send_data(EnbAid, NewData); + {NewData, ReplyData} -> + sctp_server:send_data(EnbAid, NewData), + ok = sctp_client:send_data({Sock, Aid}, ReplyData) + end, + {keep_state, S#{priv := NewPriv}}; %% Handle termination events of the child processes @@ -213,10 +224,10 @@ %% ------------------------------------------------------------------ %% A safe wrapper for s1ap_proxy:handle_pdu/1 --spec handle_pdu(binary(), term()) -> {binary(), term()}. +-spec handle_pdu(binary(), term()) -> {binary(), binary(), term()}. handle_pdu(Data, Priv) when is_binary(Data) -> try s1ap_proxy:handle_pdu(Data, Priv) of - Result -> Result %% {NewData, NewPriv} + Result -> Result %% {NewData, ReplyData, NewPriv} catch Exception:Reason:StackTrace -> ?LOG_ERROR("An exception occurred: ~p, ~p, ~p", [Exception, Reason, StackTrace]), @@ -227,10 +238,18 @@ %% Send a single message to the MME sctp_send(Data, #{sock := Sock, + enb_aid := EnbAid, mme_aid := Aid, priv := Priv} = S) -> - {NewData, NewPriv} = handle_pdu(Data, Priv), - ok = sctp_client:send_data({Sock, Aid}, NewData), + {NewData, ReplyData, NewPriv} = handle_pdu(Data, Priv), + case {NewData, ReplyData} of + {undefined, undefined} -> ok; + {undefined, ReplyData} -> sctp_server:send_data(EnbAid, ReplyData); + {NewData, undefined} -> ok = sctp_client:send_data({Sock, Aid}, NewData); + {NewData, ReplyData} -> + sctp_server:send_data(EnbAid, ReplyData), + ok = sctp_client:send_data({Sock, Aid}, NewData) + end, S#{priv := NewPriv}. diff --git a/test/s1ap_proxy_test.erl b/test/s1ap_proxy_test.erl index 9534980..f53ce5c 100644 --- a/test/s1ap_proxy_test.erl +++ b/test/s1ap_proxy_test.erl @@ -47,19 +47,19 @@ test_s1_setup_req(S0) -> SetupReq = s1_setup_req_pdu(), %% Expect the PDU to be proxied unmodified - [?_assertEqual({SetupReq, S0}, s1ap_proxy:handle_pdu(SetupReq, S0))]. + [?_assertEqual({SetupReq, undefined, S0}, s1ap_proxy:handle_pdu(SetupReq, S0))]. test_e_rab_setup(S0) -> %% [eNB <- MME] E-RAB SETUP REQUEST SetupReqIn = e_rab_setup_req_pdu(?ADDR_U2C, ?TEID_U2C), SetupReqExp = e_rab_setup_req_pdu(?ADDR_A2U, ?TEID_A2U), - {SetupReqOut, S1} = s1ap_proxy:handle_pdu(SetupReqIn, S0), + {SetupReqOut, undefined, S1} = s1ap_proxy:handle_pdu(SetupReqIn, S0), %% [eNB -> MME] E-RAB SETUP RESPONSE SetupRspIn = e_rab_setup_rsp_pdu(?ADDR_U2A, ?TEID_U2A), SetupRspExp = e_rab_setup_rsp_pdu(?ADDR_C2U, ?TEID_C2U), - {SetupRspOut, _S2} = s1ap_proxy:handle_pdu(SetupRspIn, S1), + {SetupRspOut, undefined, _S2} = s1ap_proxy:handle_pdu(SetupRspIn, S1), [?_assertEqual(SetupReqExp, SetupReqOut), ?_assertEqual(SetupRspExp, SetupRspOut)]. @@ -68,19 +68,19 @@ test_e_rab_release(S0) -> %% [eNB <- MME] E-RAB SETUP REQUEST SetupReqIn = e_rab_setup_req_pdu(?ADDR_U2C, ?TEID_U2C), - {_, S1} = s1ap_proxy:handle_pdu(SetupReqIn, S0), + {_, undefined, 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), + {_, undefined, S2} = s1ap_proxy:handle_pdu(SetupRspIn, S1), %% [eNB <- MME] E-RAB RELEASE COMMAND ReleaseCmd = e_rab_release_cmd_pdu(), - {ReleaseCmdOut, S3} = s1ap_proxy:handle_pdu(ReleaseCmd, S2), + {ReleaseCmdOut, undefined, S3} = s1ap_proxy:handle_pdu(ReleaseCmd, S2), %% [eNB -> MME] E-RAB RELEASE RESPONSE ReleaseRsp = e_rab_release_rsp_pdu(), - {ReleaseRspOut, _S4} = s1ap_proxy:handle_pdu(ReleaseRsp, S3), + {ReleaseRspOut, undefined, _S4} = s1ap_proxy:handle_pdu(ReleaseRsp, S3), %% TODO: make sure that the E-RAB FSM has been terminated @@ -93,7 +93,7 @@ ModifyIndIn = e_rab_modify_ind_pdu(?ADDR_U2A, ?TEID_U2A), %% XXX: not implemented, we should actually expect ?ADDR_C2U, ?TEID_C2U ModifyIndExp = e_rab_modify_ind_pdu(?ADDR_U2A, ?TEID_U2A), - {ModifyIndOut, _S1} = s1ap_proxy:handle_pdu(ModifyIndIn, S0), + {ModifyIndOut, undefined, _S1} = s1ap_proxy:handle_pdu(ModifyIndIn, S0), [?_assertEqual(ModifyIndExp, ModifyIndOut)]. @@ -101,12 +101,12 @@ %% [eNB <- MME] INITIAL CONTEXT SETUP REQUEST InitCtxSetupReqIn = initial_context_setup_req_pdu(?ADDR_U2C, ?TEID_U2C), InitCtxSetupReqExp = initial_context_setup_req_pdu(?ADDR_A2U, ?TEID_A2U), - {InitCtxSetupReqOut, S1} = s1ap_proxy:handle_pdu(InitCtxSetupReqIn, S0), + {InitCtxSetupReqOut, undefined, S1} = s1ap_proxy:handle_pdu(InitCtxSetupReqIn, S0), %% [eNB -> MME] INITIAL CONTEXT SETUP RESPONSE InitCtxSetupRspIn = initial_context_setup_rsp_pdu(?ADDR_U2A, ?TEID_U2A), InitCtxSetupRspExp = initial_context_setup_rsp_pdu(?ADDR_C2U, ?TEID_C2U), - {InitCtxSetupRspOut, _S2} = s1ap_proxy:handle_pdu(InitCtxSetupRspIn, S1), + {InitCtxSetupRspOut, undefined, _S2} = s1ap_proxy:handle_pdu(InitCtxSetupRspIn, S1), [?_assertEqual(InitCtxSetupReqExp, InitCtxSetupReqOut), ?_assertEqual(InitCtxSetupRspExp, InitCtxSetupRspOut)]. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37924?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: I242e84fb09b00f4794b6e1aa770f348a0e60aea4 Gerrit-Change-Number: 37924 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: s1gw: Add initial PFCP support emulating UPF
by pespin 23 Aug '24

23 Aug '24
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37920?usp=email ) Change subject: s1gw: Add initial PFCP support emulating UPF ...................................................................... s1gw: Add initial PFCP support emulating UPF Change-Id: If2b135e113d2568092e90ac9b6c5f651ab30f5d0 --- M library/PFCP_Emulation.ttcn M s1gw/ConnHdlr.ttcn M s1gw/S1GW_Tests.ttcn M s1gw/gen_links.sh M s1gw/osmo-s1gw.config M s1gw/regen_makefile.sh 6 files changed, 149 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/37920/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37920?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If2b135e113d2568092e90ac9b6c5f651ab30f5d0 Gerrit-Change-Number: 37920 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: WIP: s1gw: Add initial PFCP support emulating UPF
by pespin 23 Aug '24

23 Aug '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37920?usp=email ) Change subject: WIP: s1gw: Add initial PFCP support emulating UPF ...................................................................... WIP: s1gw: Add initial PFCP support emulating UPF Change-Id: If2b135e113d2568092e90ac9b6c5f651ab30f5d0 --- M library/PFCP_Emulation.ttcn M s1gw/ConnHdlr.ttcn M s1gw/S1GW_Tests.ttcn M s1gw/gen_links.sh M s1gw/osmo-s1gw.config M s1gw/regen_makefile.sh 6 files changed, 149 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/37920/1 diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn index d5a15a2..d872367 100644 --- a/library/PFCP_Emulation.ttcn +++ b/library/PFCP_Emulation.ttcn @@ -199,4 +199,12 @@ } } +altstep as_pfcp_ignore(PFCPEM_PT pt, template PDU_PFCP pfcp_expect := ?) +{ + [] pt.receive(pfcp_expect) { + log("Ignoring ", pfcp_expect); + repeat; + } +} + } diff --git a/s1gw/ConnHdlr.ttcn b/s1gw/ConnHdlr.ttcn index 408b315..fcedc87 100644 --- a/s1gw/ConnHdlr.ttcn +++ b/s1gw/ConnHdlr.ttcn @@ -19,6 +19,11 @@ import from IPL4asp_Types all; import from Misc_Helpers all; +import from PFCP_Types all; +import from PFCP_Emulation all; +import from PFCP_Templates all; +import from PFCP_CodecPort all; + import from S1AP_CodecPort all; import from S1AP_CodecPort_CtrlFunct all; import from S1AP_Types all; @@ -31,13 +36,15 @@ import from SCTP_Templates all; import from S1AP_Server all; -type component ConnHdlr extends S1APSRV_ConnHdlr { +type component ConnHdlr extends S1APSRV_ConnHdlr, PFCP_ConnHdlr { + var ConnHdlrPars g_pars; port S1AP_CODEC_PT S1AP_ENB; var ConnectionId g_s1ap_conn_id := -1; }; type record of ConnHdlr ConnHdlrList; type record ConnHdlrPars { + integer idx, Global_ENB_ID genb_id }; @@ -52,11 +59,19 @@ } template (value) ConnHdlrPars -t_ConnHdlrPars(integer enb_id := 0) := { - genb_id := ts_Global_ENB_ID(enb_id) +t_ConnHdlrPars(integer idx := 0) := { + idx := idx, + genb_id := ts_Global_ENB_ID(idx) } -type function void_fn(ConnHdlrPars pars) runs on ConnHdlr; +type function void_fn(charstring id) runs on ConnHdlr; + +function f_ConnHdlr_init(void_fn fn, charstring id, ConnHdlrPars pars) +runs on ConnHdlr { + g_pars := pars; + fn.apply(id); +} + function f_ConnHdlr_connect(charstring local_addr, charstring remote_addr) runs on ConnHdlr { var Result res; @@ -167,7 +182,7 @@ } } -function f_ConnHdlr_setup(Global_ENB_ID genb_id) runs on ConnHdlr { +function f_ConnHdlr_setup(Global_ENB_ID genb_id, float Tval := 5.0) runs on ConnHdlr { var S1AP_PDU pdu; timer T; @@ -182,7 +197,7 @@ f_ConnHdlr_tx_s1ap_from_enb(ts_S1AP_SetupReq(genb_id, supported_tas_dummy, v32)); - T.start(1.0); + T.start(Tval); alt { [] S1AP_CONN.receive(S1APSRV_Event:S1APSRV_EVENT_CONN_UP) { repeat; } [] S1AP_CONN.receive(tr_S1AP_SetupReq) { @@ -209,4 +224,51 @@ } } +altstep as_pfcp_handle_assoc_setup_req(template (present) PDU_PFCP exp_rx := tr_PFCP_Assoc_Setup_Req(), boolean do_repeat := false) +runs on ConnHdlr +{ + var PDU_PFCP rx; + + [] PFCP.receive(exp_rx) -> value rx { + var Node_ID upf_node_id := valueof(ts_PFCP_Node_ID_fqdn("\07osmocom\03org")); + PFCP.send(ts_PFCP_Assoc_Setup_Resp(rx.sequence_number, upf_node_id, + ts_PFCP_Cause(REQUEST_ACCEPTED), + 1234)); + if (do_repeat) { + repeat; + } + } +} + +private function f_pfcp_wait_assoc_setup(template (present) PDU_PFCP exp_rx := tr_PFCP_Assoc_Setup_Req(), + float wait_time := 10.0) +runs on ConnHdlr +{ + var PDU_PFCP rx; + timer T := wait_time; + T.start; + alt { + [] as_pfcp_handle_assoc_setup_req(exp_rx); + [] PFCP.receive(PDU_PFCP:?) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Got an unexpected PFCP message, was waiting for ", exp_rx)); + } + [] T.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Timeout waiting for PFCP ", exp_rx)); + } + } + T.stop; +} + +function f_ConnHdlr_register_pfcp() runs on ConnHdlr +{ + f_pfcp_register(); + if (g_pars.idx == 0) { + /* First ConnHdlr answers the AssocSetup: */ + activate(as_pfcp_handle_assoc_setup_req(do_repeat := true)); + } else { + activate(as_pfcp_ignore(PFCP, tr_PFCP_Assoc_Setup_Req())); + } +} } diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 5e2433e..2483e06 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -28,20 +28,28 @@ import from S1AP_PDU_Contents all; import from S1AP_Constants all; +import from PFCP_Types all; +import from PFCP_Emulation all; +import from PFCP_Templates all; +import from PFCP_CodecPort all; + import from SCTP_Templates all; import from S1AP_Server all; import from ConnHdlr all; modulepar { - charstring mp_s1gw_enb_ip; /* eNB facing address of the S1GW */ - charstring mp_s1gw_mme_ip; /* MME facing address of the S1GW */ - charstring mp_enb_bind_ip; /* eNB address to use locally when connecting to S1GW */ - charstring mp_mme_bind_ip; /* MME address on which we get connections from S1GW */ + charstring mp_s1gw_enb_ip := "127.0.1.1"; /* eNB facing address of the S1GW */ + charstring mp_s1gw_mme_ip := "127.0.2.1"; /* MME facing address of the S1GW */ + charstring mp_s1gw_upf_ip := "127.0.3.1"; /* UPF facing address of the S1GW */ + charstring mp_enb_bind_ip := "127.0.1.10"; /* eNB address to use locally when connecting to S1GW */ + charstring mp_mme_bind_ip := "127.0.2.10"; /* MME address on which we get connections from S1GW */ + charstring mp_upf_bind_ip := "127.0.3.10"; /* UPF address on which we get connections from S1GW */ } type component test_CT { timer g_Tguard; var S1AP_Server_CT vc_S1APSRV; + var PFCP_Emulation_CT vc_PFCP; }; private altstep as_Tguard() runs on test_CT { @@ -50,51 +58,78 @@ } } -function f_init(float Tval := 20.0) runs on test_CT { +function f_init(boolean s1apsrv_start := true, + boolean upf_start := true, + float Tval := 20.0) runs on test_CT { g_Tguard.start(Tval); activate(as_Tguard()); + + if (s1apsrv_start) { + f_init_s1ap_srv(testcasename()); + } + if (upf_start) { + f_init_pfcp(testcasename()); + } } -function f_init_s1ap_srv() runs on test_CT { +function f_init_s1ap_srv(charstring id) runs on test_CT { var S1APSRV_ConnParams cpars := { local_ip := mp_mme_bind_ip, local_port := 36412 }; - vc_S1APSRV := S1AP_Server_CT.create("S1APSRV-" & testcasename()); + vc_S1APSRV := S1AP_Server_CT.create("S1APSRV-" & id) alive; vc_S1APSRV.start(S1AP_Server.main(cpars)); } +function f_init_pfcp(charstring id) runs on test_CT { + var PFCP_Emulation_Cfg pfcp_cfg := { + pfcp_bind_ip := mp_upf_bind_ip, + pfcp_bind_port := PFCP_PORT, + pfcp_remote_ip := mp_s1gw_upf_ip, + pfcp_remote_port := PFCP_PORT, + role := UPF + }; + + vc_PFCP := PFCP_Emulation_CT.create("PFCP-" & id) alive; + vc_PFCP.start(PFCP_Emulation.main(pfcp_cfg)); +} + function f_ConnHdlr_spawn(void_fn fn, ConnHdlrPars pars) runs on test_CT return ConnHdlr { var ConnHdlr vc_conn; + var charstring id := "ConnHdlr-" & testcasename() & "-" & int2str(pars.idx); - vc_conn := ConnHdlr.create("ConnHdlr-" & testcasename()); - if (vc_S1APSRV.running) { + vc_conn := ConnHdlr.create(id) alive; + if (isbound(vc_S1APSRV) and vc_S1APSRV.running) { connect(vc_conn:S1AP_CONN, vc_S1APSRV:S1AP_CLIENT); connect(vc_conn:S1AP_PROC, vc_S1APSRV:S1AP_PROC); } - vc_conn.start(derefers(fn)(pars)); + if (isbound(vc_PFCP) and vc_PFCP.running) { + connect(vc_conn:PFCP, vc_PFCP:CLIENT); + connect(vc_conn:PFCP_PROC, vc_PFCP:CLIENT_PROC); + } + vc_conn.start(f_ConnHdlr_init(fn, id, pars)); return vc_conn; } -function f_TC_setup(ConnHdlrPars pars) runs on ConnHdlr { - f_ConnHdlr_register(pars.genb_id); +function f_TC_setup(charstring id) runs on ConnHdlr { + f_ConnHdlr_register_pfcp(); + f_ConnHdlr_register(g_pars.genb_id); f_ConnHdlr_connect(mp_enb_bind_ip, mp_s1gw_enb_ip); - f_ConnHdlr_setup(pars.genb_id); + f_ConnHdlr_setup(g_pars.genb_id); f_sleep(0.5); /* keep the connection idle for some time */ f_ConnHdlr_disconnect(); - f_ConnHdlr_unregister(pars.genb_id); + f_ConnHdlr_unregister(g_pars.genb_id); } testcase TC_setup() runs on test_CT { var ConnHdlrPars pars := valueof(t_ConnHdlrPars); var ConnHdlr vc_conn; f_init(); - f_init_s1ap_srv(); vc_conn := f_ConnHdlr_spawn(refers(f_TC_setup), pars); vc_conn.done; @@ -103,7 +138,6 @@ var ConnHdlrList vc_conns := { }; f_init(); - f_init_s1ap_srv(); for (var integer i := 0; i < 42; i := i + 1) { var ConnHdlrPars pars := valueof(t_ConnHdlrPars(i)); @@ -118,26 +152,26 @@ /* MME terminates connection, expect S1GW to terminate the eNB connection */ -function f_TC_conn_term_by_mme(ConnHdlrPars pars) runs on ConnHdlr { - f_ConnHdlr_register(pars.genb_id); +function f_TC_conn_term_by_mme(charstring id) runs on ConnHdlr { + f_ConnHdlr_register_pfcp(); + f_ConnHdlr_register(g_pars.genb_id); f_ConnHdlr_connect(mp_enb_bind_ip, mp_s1gw_enb_ip); - f_ConnHdlr_setup(pars.genb_id); + f_ConnHdlr_setup(g_pars.genb_id); f_sleep(0.5); /* keep the connection idle for some time */ /* MME (S1AP_Server_CT) terminates connection */ - f_ConnHdlr_close_conn(pars.genb_id); + f_ConnHdlr_close_conn(g_pars.genb_id); /* expect our eNB connection to be released gracefully */ f_ConnHdlr_expect_shutdown(); - f_ConnHdlr_unregister(pars.genb_id); + f_ConnHdlr_unregister(g_pars.genb_id); } testcase TC_conn_term_by_mme() runs on test_CT { var ConnHdlrPars pars := valueof(t_ConnHdlrPars); var ConnHdlr vc_conn; f_init(); - f_init_s1ap_srv(); vc_conn := f_ConnHdlr_spawn(refers(f_TC_conn_term_by_mme), pars); vc_conn.done; @@ -145,7 +179,8 @@ /* MME is not available, expect S1GW to terminate the eNB connection */ -function f_TC_conn_term_mme_unavail(ConnHdlrPars pars) runs on ConnHdlr { +function f_TC_conn_term_mme_unavail(charstring id) runs on ConnHdlr { + f_ConnHdlr_register_pfcp(); /* establish an eNB connection to the S1GW */ f_ConnHdlr_connect(mp_enb_bind_ip, mp_s1gw_enb_ip); /* expect our eNB connection to be released gracefully */ @@ -156,24 +191,22 @@ var ConnHdlrPars pars := valueof(t_ConnHdlrPars); var ConnHdlr vc_conn; - f_init(); - f_init_s1ap_srv(); - vc_S1APSRV.stop; - vc_S1APSRV.done; + f_init(s1apsrv_start := false); vc_conn := f_ConnHdlr_spawn(refers(f_TC_conn_term_mme_unavail), pars); vc_conn.done; } -function f_TC_e_rab_setup(ConnHdlrPars pars) runs on ConnHdlr { +function f_TC_e_rab_setup(charstring id) runs on ConnHdlr { const integer mme_id := 7; const integer enb_id := 9; const integer erab_id := 6; var S1AP_PDU pdu; - f_ConnHdlr_register(pars.genb_id); + f_ConnHdlr_register_pfcp(); + f_ConnHdlr_register(g_pars.genb_id); f_ConnHdlr_connect(mp_enb_bind_ip, mp_s1gw_enb_ip); - f_ConnHdlr_setup(pars.genb_id); + f_ConnHdlr_setup(g_pars.genb_id); log("eNB <- [S1GW] <- MME: E-RAB SETUP REQUEST"); var template (value) E_RABToBeSetupListBearerSUReq items_req; @@ -227,14 +260,13 @@ f_ConnHdlr_rx_s1ap_from_enb(pdu, tr_S1AP_RABSetupRsp(mme_id, enb_id, items_res)); f_ConnHdlr_disconnect(); - f_ConnHdlr_unregister(pars.genb_id); + f_ConnHdlr_unregister(g_pars.genb_id); } testcase TC_e_rab_setup() runs on test_CT { var ConnHdlrPars pars := valueof(t_ConnHdlrPars); var ConnHdlr vc_conn; f_init(); - f_init_s1ap_srv(); vc_conn := f_ConnHdlr_spawn(refers(f_TC_e_rab_setup), pars); vc_conn.done; diff --git a/s1gw/gen_links.sh b/s1gw/gen_links.sh index fd54815..ef8bdde 100755 --- a/s1gw/gen_links.sh +++ b/s1gw/gen_links.sh @@ -17,6 +17,10 @@ FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" gen_links $DIR $FILES +DIR=$BASEDIR/titan.ProtocolModules.PFCP_v15.1.0/src +FILES="PFCP_Types.ttcn" +gen_links $DIR $FILES + DIR=../library/s1ap FILES="S1AP_CommonDataTypes.asn S1AP_Constants.asn S1AP_Containers.asn S1AP_IEs.asn " FILES+="S1AP_PDU_Contents.asn S1AP_PDU_Descriptions.asn " @@ -25,6 +29,7 @@ DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn " +FILES+="PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn PFCP_Templates.ttcn " FILES+="S1AP_CodecPort.ttcn S1AP_CodecPort_CtrlFunctDef.cc S1AP_CodecPort_CtrlFunct.ttcn " FILES+="SCTP_Templates.ttcn " gen_links $DIR $FILES diff --git a/s1gw/osmo-s1gw.config b/s1gw/osmo-s1gw.config index f4a4a73..a04d1cf 100644 --- a/s1gw/osmo-s1gw.config +++ b/s1gw/osmo-s1gw.config @@ -13,7 +13,9 @@ {osmo_s1gw, [{s1gw_bind_addr, "127.0.1.1"}, %% S1GW bind address for incoming eNB connections {mme_loc_addr, "127.0.2.1"}, %% local address for outgoing connections to the MME - {mme_rem_addr, "127.0.2.10"} %% remote address for outgoing connections to the MME + {mme_rem_addr, "127.0.2.10"}, %% remote address for outgoing connections to the MME + {pfcp_loc_addr, "127.0.3.1"}, %% local address for outgoing connections to the UPF + {pfcp_rem_addr, "127.0.3.10"} %% local address for outgoing connections to the UPF ]}, %% ================================================================================ %% kernel config diff --git a/s1gw/regen_makefile.sh b/s1gw/regen_makefile.sh index 7eef51b..8c32b3d 100755 --- a/s1gw/regen_makefile.sh +++ b/s1gw/regen_makefile.sh @@ -8,6 +8,7 @@ IPL4asp_PT.cc IPL4asp_discovery.cc Native_FunctionDefs.cc + PFCP_CodecPort_CtrlFunctDef.cc S1AP_CodecPort_CtrlFunctDef.cc S1AP_EncDec.cc TCCConversion.cc -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37920?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: If2b135e113d2568092e90ac9b6c5f651ab30f5d0 Gerrit-Change-Number: 37920 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in libosmocore[master]: tests: add unit test for osmo_fr_sid_classify()
by laforge 23 Aug '24

23 Aug '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/37912?usp=email ) Change subject: tests: add unit test for osmo_fr_sid_classify() ...................................................................... tests: add unit test for osmo_fr_sid_classify() The bit patterns used to construct this unit test have been generated here: https://www.freecalypso.org/hg/vband-misc/file/tip/fr-sid These test patterns have been used successfully to reveal an off-by-one bug in the implementation of FRv1 Rx SID classification in Nokia InSite BTS: https://osmocom.org/projects/retro-gsm/wiki/InSite_UL_captures The implementation in TI Calypso DSP has also been tested with these patterns and found to be correct per GSM 06.31 spec, unlike the Nokia BTS. Related: OS#6538 Change-Id: Ie3f5339cdfecf39e359d635d58864dd323f41fff --- M tests/Makefile.am A tests/codec/codec_fr_sid_test.c A tests/codec/codec_fr_sid_test.in A tests/codec/codec_fr_sid_test.ok M tests/testsuite.at 5 files changed, 469 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/Makefile.am b/tests/Makefile.am index c82e924..48242c3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -27,7 +27,7 @@ prbs/prbs_test gsm23003/gsm23003_test \ gsm23236/gsm23236_test \ codec/codec_ecu_fr_test codec/codec_efr_sid_test \ - codec/codec_hr_sid_test \ + codec/codec_fr_sid_test codec/codec_hr_sid_test \ timer/clk_override_test \ oap/oap_client_test gsm29205/gsm29205_test \ logging/logging_vty_test \ @@ -270,6 +270,9 @@ codec_codec_efr_sid_test_SOURCES = codec/codec_efr_sid_test.c codec_codec_efr_sid_test_LDADD = $(top_builddir)/src/codec/libosmocodec.la $(LDADD) +codec_codec_fr_sid_test_SOURCES = codec/codec_fr_sid_test.c +codec_codec_fr_sid_test_LDADD = $(top_builddir)/src/codec/libosmocodec.la $(LDADD) + codec_codec_hr_sid_test_SOURCES = codec/codec_hr_sid_test.c codec_codec_hr_sid_test_LDADD = $(top_builddir)/src/codec/libosmocodec.la $(LDADD) @@ -447,6 +450,7 @@ codec/codec_test.ok \ codec/codec_ecu_fr_test.ok \ codec/codec_efr_sid_test.ok codec/codec_efr_sid_test.in \ + codec/codec_fr_sid_test.ok codec/codec_fr_sid_test.in \ codec/codec_hr_sid_test.ok codec/codec_hr_sid_test.in \ vty/vty_test.ok vty/vty_test.err \ vty/fail_not_de-indented.cfg \ @@ -610,6 +614,8 @@ >$(srcdir)/codec/codec_ecu_fr_test.ok codec/codec_efr_sid_test $(srcdir)/codec/codec_efr_sid_test.in \ >$(srcdir)/codec/codec_efr_sid_test.ok + codec/codec_fr_sid_test $(srcdir)/codec/codec_fr_sid_test.in \ + >$(srcdir)/codec/codec_fr_sid_test.ok codec/codec_hr_sid_test $(srcdir)/codec/codec_hr_sid_test.in \ >$(srcdir)/codec/codec_hr_sid_test.ok if ENABLE_GB diff --git a/tests/codec/codec_fr_sid_test.c b/tests/codec/codec_fr_sid_test.c new file mode 100644 index 0000000..25c1b3f --- /dev/null +++ b/tests/codec/codec_fr_sid_test.c @@ -0,0 +1,97 @@ +/* + * This program is a test for osmo_fr_sid_classify(). It reads a set of + * FRv1 codec frames in hex format (TS 101 318 RTP format represented in hex, + * each frame as its own hex line) and feeds each test frame to + * osmo_fr_sid_classify(). It then prints the output next to each input. + * + * Author: Mychaela N. Falconia <falcon(a)freecalypso.org>, 2024 - however, + * Mother Mychaela's contributions are NOT subject to copyright. + * No rights reserved, all rights relinquished. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <ctype.h> +#include <stdio.h> +#include <stdint.h> +#include <stdbool.h> +#include <stdlib.h> +#include <string.h> + +#include <osmocom/core/utils.h> +#include <osmocom/codec/codec.h> + +static void process_record(const char *hex_str) +{ + uint8_t frame_bytes[GSM_FR_BYTES]; + enum osmo_gsm631_sid_class sidc; + + osmo_hexparse(hex_str, frame_bytes, GSM_FR_BYTES); + sidc = osmo_fr_sid_classify(frame_bytes); + printf("%s ==> %d\n", hex_str, (int) sidc); +} + +static void process_line(char *linebuf, const char *infname, int lineno) +{ + char *cp = linebuf, *hex_str; + int ndig; + + while (isspace(*cp)) + cp++; + if (*cp == '\0' || *cp == '#') + return; + /* expect string of 66 hex digits */ + hex_str = cp; + for (ndig = 0; ndig < GSM_FR_BYTES * 2; ndig++) { + if (!isxdigit(*cp)) + goto inv; + cp++; + } + if (*cp) { + if (!isspace(*cp)) + goto inv; + *cp++ = '\0'; + } + /* must be end of non-comment line */ + while (isspace(*cp)) + cp++; + if (*cp != '\0' && *cp != '#') + goto inv; + + process_record(hex_str); + return; + +inv: fprintf(stderr, "%s line %d: invalid syntax\n", infname, lineno); + exit(1); +} + +int main(int argc, char **argv) +{ + const char *infname; + FILE *inf; + char linebuf[128]; + int lineno; + + if (argc != 2) { + fprintf(stderr, "usage: %s input-file\n", argv[0]); + exit(1); + } + infname = argv[1]; + inf = fopen(infname, "r"); + if (!inf) { + perror(infname); + exit(1); + } + for (lineno = 1; fgets(linebuf, sizeof(linebuf), inf); lineno++) + process_line(linebuf, infname, lineno); + fclose(inf); + exit(0); +} diff --git a/tests/codec/codec_fr_sid_test.in b/tests/codec/codec_fr_sid_test.in new file mode 100644 index 0000000..d5930e2 --- /dev/null +++ b/tests/codec/codec_fr_sid_test.in @@ -0,0 +1,184 @@ +# This file is input for the FRv1 SID classifier test program. +# It has been generated here: +# +# https://www.freecalypso.org/hg/vband-misc/file/tip/fr-sid +# +# It is based on the same principle as the EFR version: +# +# https://www.freecalypso.org/hg/vband-misc/file/tip/efr-sid/Unit-test-desc + +DAE6DB659B00010000000000000100000000000001000000000000010000000000 +DAE6DB659B00014000000000000100000000000001000000000000010000000000 +DAE6DB659B00012000000000000100000000000001000000000000010000000000 +DAE6DB659B00010800000000000100000000000001000000000000010000000000 +DAE6DB659B00010400000000000100000000000001000000000000010000000000 +DAE6DB659B00010100000000000100000000000001000000000000010000000000 +DAE6DB659B00010080000000000100000000000001000000000000010000000000 +DAE6DB659B00010020000000000100000000000001000000000000010000000000 +DAE6DB659B00010010000000000100000000000001000000000000010000000000 +DAE6DB659B00010004000000000100000000000001000000000000010000000000 +DAE6DB659B00010002000000000100000000000001000000000000010000000000 +DAE6DB659B00010000800000000100000000000001000000000000010000000000 +DAE6DB659B00010000400000000100000000000001000000000000010000000000 +DAE6DB659B00010000100000000100000000000001000000000000010000000000 +DAE6DB659B00010000080000000100000000000001000000000000010000000000 +DAE6DB659B00010000020000000100000000000001000000000000010000000000 +DAE6DB659B00010000010000000100000000000001000000000000010000000000 +DAE6DB659B00010000004000000100000000000001000000000000010000000000 +DAE6DB659B00010000002000000100000000000001000000000000010000000000 +DAE6DB659B00010000000800000100000000000001000000000000010000000000 +DAE6DB659B00010000000400000100000000000001000000000000010000000000 +DAE6DB659B00010000000100000100000000000001000000000000010000000000 +DAE6DB659B00010000000080000100000000000001000000000000010000000000 +DAE6DB659B00010000000020000100000000000001000000000000010000000000 +DAE6DB659B00010000000010000100000000000001000000000000010000000000 +DAE6DB659B00010000000004000100000000000001000000000000010000000000 +DAE6DB659B00010000000002000100000000000001000000000000010000000000 +DAE6DB659B00010000000000000140000000000001000000000000010000000000 +DAE6DB659B00010000000000000120000000000001000000000000010000000000 +DAE6DB659B00010000000000000108000000000001000000000000010000000000 +DAE6DB659B00010000000000000104000000000001000000000000010000000000 +DAE6DB659B00010000000000000101000000000001000000000000010000000000 +DAE6DB659B00010000000000000100800000000001000000000000010000000000 +DAE6DB659B00010000000000000100200000000001000000000000010000000000 +DAE6DB659B00010000000000000100100000000001000000000000010000000000 +DAE6DB659B00010000000000000100040000000001000000000000010000000000 +DAE6DB659B00010000000000000100020000000001000000000000010000000000 +DAE6DB659B00010000000000000100008000000001000000000000010000000000 +DAE6DB659B00010000000000000100004000000001000000000000010000000000 +DAE6DB659B00010000000000000100001000000001000000000000010000000000 +DAE6DB659B00010000000000000100000800000001000000000000010000000000 +DAE6DB659B00010000000000000100000200000001000000000000010000000000 +DAE6DB659B00010000000000000100000100000001000000000000010000000000 +DAE6DB659B00010000000000000100000040000001000000000000010000000000 +DAE6DB659B00010000000000000100000020000001000000000000010000000000 +DAE6DB659B00010000000000000100000008000001000000000000010000000000 +DAE6DB659B00010000000000000100000004000001000000000000010000000000 +DAE6DB659B00010000000000000100000001000001000000000000010000000000 +DAE6DB659B00010000000000000100000000800001000000000000010000000000 +DAE6DB659B00010000000000000100000000200001000000000000010000000000 +DAE6DB659B00010000000000000100000000100001000000000000010000000000 +DAE6DB659B00010000000000000100000000040001000000000000010000000000 +DAE6DB659B00010000000000000100000000020001000000000000010000000000 +DAE6DB659B00010000000000000100000000000001400000000000010000000000 +DAE6DB659B00010000000000000100000000000001200000000000010000000000 +DAE6DB659B00010000000000000100000000000001080000000000010000000000 +DAE6DB659B00010000000000000100000000000001040000000000010000000000 +DAE6DB659B00010000000000000100000000000001010000000000010000000000 +DAE6DB659B00010000000000000100000000000001008000000000010000000000 +DAE6DB659B00010000000000000100000000000001002000000000010000000000 +DAE6DB659B00010000000000000100000000000001001000000000010000000000 +DAE6DB659B00010000000000000100000000000001000400000000010000000000 +DAE6DB659B00010000000000000100000000000001000200000000010000000000 +DAE6DB659B00010000000000000100000000000001000080000000010000000000 +DAE6DB659B00010000000000000100000000000001000040000000010000000000 +DAE6DB659B00010000000000000100000000000001000010000000010000000000 +DAE6DB659B00010000000000000100000000000001000008000000010000000000 +DAE6DB659B00010000000000000100000000000001000002000000010000000000 +DAE6DB659B00010000000000000100000000000001000001000000010000000000 +DAE6DB659B00010000000000000100000000000001000000400000010000000000 +DAE6DB659B00010000000000000100000000000001000000200000010000000000 +DAE6DB659B00010000000000000100000000000001000000080000010000000000 +DAE6DB659B00010000000000000100000000000001000000040000010000000000 +DAE6DB659B00010000000000000100000000000001000000010000010000000000 +DAE6DB659B00010000000000000100000000000001000000008000010000000000 +DAE6DB659B00010000000000000100000000000001000000002000010000000000 +DAE6DB659B00010000000000000100000000000001000000001000010000000000 +DAE6DB659B00010000000000000100000000000001000000000400010000000000 +DAE6DB659B00010000000000000100000000000001000000000200010000000000 +DAE6DB659B00010000000000000100000000000001000000000000014000000000 +DAE6DB659B00010000000000000100000000000001000000000000012000000000 +DAE6DB659B00010000000000000100000000000001000000000000010800000000 +DAE6DB659B00010000000000000100000000000001000000000000010400000000 +DAE6DB659B00010000000000000100000000000001000000000000010100000000 +DAE6DB659B00010000000000000100000000000001000000000000010080000000 +DAE6DB659B00010000000000000100000000000001000000000000010020000000 +DAE6DB659B00010000000000000100000000000001000000000000010010000000 +DAE6DB659B00010000000000000100000000000001000000000000010004000000 +DAE6DB659B00010000000000000100000000000001000000000000010000800000 +DAE6DB659B00010000000000000100000000000001000000000000010000100000 +DAE6DB659B00010000000000000100000000000001000000000000010000020000 +DAE6DB659B00010000000000000100000000000001000000000000010000004000 +DAE6DB659B00010000000000000100000000000001000000000000010000000800 +DAE6DB659B00010000000000000100000000000001000000000000010000000100 +DAE6DB659B00010000000000000100000000000001000000000000010000000020 +DAE6DB659B00010000000000000100000000000001000000000000010000000004 +DAE6DB659B00014000000000000100000000800001000000000000010000000000 +DAE6DB659B00012000000000000100000000200001000000000000010000000000 +DAE6DB659B00010800000000000100000000100001000000000000010000000000 +DAE6DB659B00010400000000000100000000040001000000000000010000000000 +DAE6DB659B00010100000000000100000000020001000000000000010000000000 +DAE6DB659B00010080000000000100000000000001400000000000010000000000 +DAE6DB659B00010020000000000100000000000001200000000000010000000000 +DAE6DB659B00010010000000000100000000000001080000000000010000000000 +DAE6DB659B00010004000000000100000000000001040000000000010000000000 +DAE6DB659B00010002000000000100000000000001010000000000010000000000 +DAE6DB659B00010000800000000100000000000001008000000000010000000000 +DAE6DB659B00010000400000000100000000000001002000000000010000000000 +DAE6DB659B00010000100000000100000000000001001000000000010000000000 +DAE6DB659B00010000080000000100000000000001000400000000010000000000 +DAE6DB659B00010000020000000100000000000001000200000000010000000000 +DAE6DB659B00010000010000000100000000000001000080000000010000000000 +DAE6DB659B00010000004000000100000000000001000040000000010000000000 +DAE6DB659B00010000002000000100000000000001000010000000010000000000 +DAE6DB659B00010000000800000100000000000001000008000000010000000000 +DAE6DB659B00010000000400000100000000000001000002000000010000000000 +DAE6DB659B00010000000100000100000000000001000001000000010000000000 +DAE6DB659B00010000000080000100000000000001000000400000010000000000 +DAE6DB659B00010000000020000100000000000001000000200000010000000000 +DAE6DB659B00010000000010000100000000000001000000080000010000000000 +DAE6DB659B00010000000004000100000000000001000000040000010000000000 +DAE6DB659B00010000000002000100000000000001000000010000010000000000 +DAE6DB659B00010000000000000140000000000001000000008000010000000000 +DAE6DB659B00010000000000000120000000000001000000002000010000000000 +DAE6DB659B00010000000000000108000000000001000000001000010000000000 +DAE6DB659B00010000000000000104000000000001000000000400010000000000 +DAE6DB659B00010000000000000101000000000001000000000200010000000000 +DAE6DB659B00010000000000000100800000000001000000000000014000000000 +DAE6DB659B00010000000000000100200000000001000000000000012000000000 +DAE6DB659B00010000000000000100100000000001000000000000010800000000 +DAE6DB659B00010000000000000100040000000001000000000000010400000000 +DAE6DB659B00010000000000000100020000000001000000000000010100000000 +DAE6DB659B00010000000000000100008000000001000000000000010080000000 +DAE6DB659B00010000000000000100004000000001000000000000010020000000 +DAE6DB659B00010000000000000100001000000001000000000000010010000000 +DAE6DB659B00010000000000000100000800000001000000000000010004000000 +DAE6DB659B00010000000000000100000200000001000000000000010000800000 +DAE6DB659B00010000000000000100000100000001000000000000010000100000 +DAE6DB659B00010000000000000100000040000001000000000000010000020000 +DAE6DB659B00010000000000000100000020000001000000000000010000004000 +DAE6DB659B00010000000000000100000008000001000000000000010000000800 +DAE6DB659B00010000000000000100000004000001000000000000010000000100 +DAE6DB659B00010000000000000100000001000001000000000000010000000020 +DAE6DB659B00010000000000000100000000800001000000000000010000000004 +DAE6DB659B00014020100804000101008040200001080402010000014020000000 +DAE6DB659B00012010080402000100804020100001040201008000012010000000 +DAE6DB659B00010804020100000140201008040001010080402000010804000000 +DAE6DB659B00010402010080000120100804020001008040201000010400800000 +DAE6DB659B00010100804020000108040201000001402010080400010100100000 +DAE6DB659B00010080402010000104020100800001201008040200010080020000 +DAE6DB659B00010020100804000101008040200001080402010000014020004000 +DAE6DB659B00010010080402000100804020100001040201008000012010000800 +DAE6DB659B00010004020100000140201008040001010080402000010804000100 +DAE6DB659B00010002010080000120100804020001008040201000010400800020 +DAE6DB659B00010000804020000108040201000001402010080400010100100004 +DAE6DB659B00014080810102000101020204040001040408081000010000000000 +DAE6DB659B00012020404080000140808101020001010202040400010000000000 +DAE6DB659B00010810102020000120204040800001408081010200010000000000 +DAE6DB659B00010404080810000108101020200001202040408000014000000000 +DAE6DB659B00010102020404000104040808100001081010202000012000000000 +DAE6DB659B00010080810102000101020204040001040408081000010800000000 +DAE6DB659B00010020404080000140808101020001010202040400010400000000 +DAE6DB659B00010010102020000120204040800001408081010200010100000000 +DAE6DB659B00010004080810000108101020200001202040408000014080000000 +DAE6DB659B00010002020404000104040808100001081010202000012020000000 +DAE6DB659B00010000810102000101020204040001040408081000010810000000 +DAE6DB659B00010000404080000140808101020001010202040400010404000000 +DAE6DB659B00010000102020000120204040800001408081010200010100800000 +DAE6DB659B00010000080810000108101020200001202040408000014080100000 +DAE6DB659B00010000020404000104040808100001081010202000012020020000 +DAE6DB659B00010000010102000101020204040001040408081000010810004000 +DAE6DB659B00010000004080000140808101020001010202040400010404000800 +DAE6DB659B00010000002020000120204040800001408081010200010100800100 +DAE6DB659B00010000000810000108101020200001202040408000014080100020 +DAE6DB659B00010000000404000104040808100001081010202000012020020004 diff --git a/tests/codec/codec_fr_sid_test.ok b/tests/codec/codec_fr_sid_test.ok new file mode 100644 index 0000000..8dcaa34 --- /dev/null +++ b/tests/codec/codec_fr_sid_test.ok @@ -0,0 +1,175 @@ +DAE6DB659B00010000000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00014000000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00012000000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010800000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010400000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010100000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010080000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010020000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010010000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010004000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010002000000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000800000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000400000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000100000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000080000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000020000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000010000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000004000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000002000000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000800000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000400000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000100000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000080000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000020000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000010000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000004000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000002000100000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000140000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000120000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000108000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000104000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000101000000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100800000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100200000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100100000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100040000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100020000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100008000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100004000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100001000000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000800000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000200000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000100000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000040000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000020000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000008000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000004000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000001000001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000800001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000200001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000100001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000040001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000020001000000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001400000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001200000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001080000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001040000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001010000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001008000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001002000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001001000000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000400000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000200000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000080000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000040000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000010000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000008000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000002000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000001000000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000400000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000200000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000080000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000040000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000010000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000008000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000002000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000001000010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000400010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000200010000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000014000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000012000000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010800000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010400000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010100000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010080000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010020000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010010000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010004000000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010000800000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010000100000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010000020000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010000004000 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010000000800 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010000000100 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010000000020 ==> 2 +DAE6DB659B00010000000000000100000000000001000000000000010000000004 ==> 2 +DAE6DB659B00014000000000000100000000800001000000000000010000000000 ==> 1 +DAE6DB659B00012000000000000100000000200001000000000000010000000000 ==> 1 +DAE6DB659B00010800000000000100000000100001000000000000010000000000 ==> 1 +DAE6DB659B00010400000000000100000000040001000000000000010000000000 ==> 1 +DAE6DB659B00010100000000000100000000020001000000000000010000000000 ==> 1 +DAE6DB659B00010080000000000100000000000001400000000000010000000000 ==> 1 +DAE6DB659B00010020000000000100000000000001200000000000010000000000 ==> 1 +DAE6DB659B00010010000000000100000000000001080000000000010000000000 ==> 1 +DAE6DB659B00010004000000000100000000000001040000000000010000000000 ==> 1 +DAE6DB659B00010002000000000100000000000001010000000000010000000000 ==> 1 +DAE6DB659B00010000800000000100000000000001008000000000010000000000 ==> 1 +DAE6DB659B00010000400000000100000000000001002000000000010000000000 ==> 1 +DAE6DB659B00010000100000000100000000000001001000000000010000000000 ==> 1 +DAE6DB659B00010000080000000100000000000001000400000000010000000000 ==> 1 +DAE6DB659B00010000020000000100000000000001000200000000010000000000 ==> 1 +DAE6DB659B00010000010000000100000000000001000080000000010000000000 ==> 1 +DAE6DB659B00010000004000000100000000000001000040000000010000000000 ==> 1 +DAE6DB659B00010000002000000100000000000001000010000000010000000000 ==> 1 +DAE6DB659B00010000000800000100000000000001000008000000010000000000 ==> 1 +DAE6DB659B00010000000400000100000000000001000002000000010000000000 ==> 1 +DAE6DB659B00010000000100000100000000000001000001000000010000000000 ==> 1 +DAE6DB659B00010000000080000100000000000001000000400000010000000000 ==> 1 +DAE6DB659B00010000000020000100000000000001000000200000010000000000 ==> 1 +DAE6DB659B00010000000010000100000000000001000000080000010000000000 ==> 1 +DAE6DB659B00010000000004000100000000000001000000040000010000000000 ==> 1 +DAE6DB659B00010000000002000100000000000001000000010000010000000000 ==> 1 +DAE6DB659B00010000000000000140000000000001000000008000010000000000 ==> 1 +DAE6DB659B00010000000000000120000000000001000000002000010000000000 ==> 1 +DAE6DB659B00010000000000000108000000000001000000001000010000000000 ==> 1 +DAE6DB659B00010000000000000104000000000001000000000400010000000000 ==> 1 +DAE6DB659B00010000000000000101000000000001000000000200010000000000 ==> 1 +DAE6DB659B00010000000000000100800000000001000000000000014000000000 ==> 1 +DAE6DB659B00010000000000000100200000000001000000000000012000000000 ==> 1 +DAE6DB659B00010000000000000100100000000001000000000000010800000000 ==> 1 +DAE6DB659B00010000000000000100040000000001000000000000010400000000 ==> 1 +DAE6DB659B00010000000000000100020000000001000000000000010100000000 ==> 1 +DAE6DB659B00010000000000000100008000000001000000000000010080000000 ==> 1 +DAE6DB659B00010000000000000100004000000001000000000000010020000000 ==> 1 +DAE6DB659B00010000000000000100001000000001000000000000010010000000 ==> 1 +DAE6DB659B00010000000000000100000800000001000000000000010004000000 ==> 1 +DAE6DB659B00010000000000000100000200000001000000000000010000800000 ==> 1 +DAE6DB659B00010000000000000100000100000001000000000000010000100000 ==> 1 +DAE6DB659B00010000000000000100000040000001000000000000010000020000 ==> 1 +DAE6DB659B00010000000000000100000020000001000000000000010000004000 ==> 1 +DAE6DB659B00010000000000000100000008000001000000000000010000000800 ==> 1 +DAE6DB659B00010000000000000100000004000001000000000000010000000100 ==> 1 +DAE6DB659B00010000000000000100000001000001000000000000010000000020 ==> 1 +DAE6DB659B00010000000000000100000000800001000000000000010000000004 ==> 1 +DAE6DB659B00014020100804000101008040200001080402010000014020000000 ==> 1 +DAE6DB659B00012010080402000100804020100001040201008000012010000000 ==> 1 +DAE6DB659B00010804020100000140201008040001010080402000010804000000 ==> 1 +DAE6DB659B00010402010080000120100804020001008040201000010400800000 ==> 1 +DAE6DB659B00010100804020000108040201000001402010080400010100100000 ==> 1 +DAE6DB659B00010080402010000104020100800001201008040200010080020000 ==> 1 +DAE6DB659B00010020100804000101008040200001080402010000014020004000 ==> 1 +DAE6DB659B00010010080402000100804020100001040201008000012010000800 ==> 1 +DAE6DB659B00010004020100000140201008040001010080402000010804000100 ==> 1 +DAE6DB659B00010002010080000120100804020001008040201000010400800020 ==> 1 +DAE6DB659B00010000804020000108040201000001402010080400010100100004 ==> 1 +DAE6DB659B00014080810102000101020204040001040408081000010000000000 ==> 0 +DAE6DB659B00012020404080000140808101020001010202040400010000000000 ==> 0 +DAE6DB659B00010810102020000120204040800001408081010200010000000000 ==> 0 +DAE6DB659B00010404080810000108101020200001202040408000014000000000 ==> 0 +DAE6DB659B00010102020404000104040808100001081010202000012000000000 ==> 0 +DAE6DB659B00010080810102000101020204040001040408081000010800000000 ==> 0 +DAE6DB659B00010020404080000140808101020001010202040400010400000000 ==> 0 +DAE6DB659B00010010102020000120204040800001408081010200010100000000 ==> 0 +DAE6DB659B00010004080810000108101020200001202040408000014080000000 ==> 0 +DAE6DB659B00010002020404000104040808100001081010202000012020000000 ==> 0 +DAE6DB659B00010000810102000101020204040001040408081000010810000000 ==> 0 +DAE6DB659B00010000404080000140808101020001010202040400010404000000 ==> 0 +DAE6DB659B00010000102020000120204040800001408081010200010100800000 ==> 0 +DAE6DB659B00010000080810000108101020200001202040408000014080100000 ==> 0 +DAE6DB659B00010000020404000104040808100001081010202000012020020000 ==> 0 +DAE6DB659B00010000010102000101020204040001040408081000010810004000 ==> 0 +DAE6DB659B00010000004080000140808101020001010202040400010404000800 ==> 0 +DAE6DB659B00010000002020000120204040800001408081010200010100800100 ==> 0 +DAE6DB659B00010000000810000108101020200001202040408000014080100020 ==> 0 +DAE6DB659B00010000000404000104040808100001081010202000012020020004 ==> 0 diff --git a/tests/testsuite.at b/tests/testsuite.at index acb3299..f22ca5a 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -224,6 +224,12 @@ AT_CHECK([$abs_top_builddir/tests/codec/codec_efr_sid_test $abs_srcdir/codec/codec_efr_sid_test.in], [0], [expout], [ignore]) AT_CLEANUP +AT_SETUP([codec_fr_sid]) +AT_KEYWORDS([codec_fr_sid]) +cat $abs_srcdir/codec/codec_fr_sid_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_fr_sid_test $abs_srcdir/codec/codec_fr_sid_test.in], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([codec_hr_sid]) AT_KEYWORDS([codec_hr_sid]) cat $abs_srcdir/codec/codec_hr_sid_test.ok > expout -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37912?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie3f5339cdfecf39e359d635d58864dd323f41fff Gerrit-Change-Number: 37912 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XL] Change in docker-playground[master]: Remove ttcn3 testsuites ported to testenv, part 1
by laforge 23 Aug '24

23 Aug '24
Attention is currently required from: daniel, osmith. laforge has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/docker-playground/+/37714?usp=email ) Change subject: Remove ttcn3 testsuites ported to testenv, part 1 ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: I thin kit makes sense to add some kind of README or other document that describes where those test suites are gone, with a pointer to howt they are run now? Just imagine some user who occasionally wants to run one of those every couple of months, and suddently they're gone with no pointer to the successor here -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37714?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I7182c7e8eb00a9323fe1b6d27f630d253b4d34f6 Gerrit-Change-Number: 37714 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Aug 2024 16:14:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[M] Change in libosmocore[master]: After writing VTY config, run sync() in a different thread
by laforge 23 Aug '24

23 Aug '24
Attention is currently required from: jolly, pespin. laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/37798?usp=email ) Change subject: After writing VTY config, run sync() in a different thread ...................................................................... Patch Set 5: (1 comment) Patchset: PS5: > I'm fine with whatever means not adding a new thread to libosmocore just for this specific case used […] My main concern is a global sync is not what we need. So either we do a fsync from a separate thread, or we remove it completely, as suggested by jolly above. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37798?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cb2ee68b2e4c730f96522208c4abf00d0f49a44 Gerrit-Change-Number: 37798 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: Hoernchen <ewild(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Aug 2024 16:12:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly <andreas(a)eversberg.eu> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: pySim-shell, cosmetic: define positional arguments last
by laforge 23 Aug '24

23 Aug '24
Attention is currently required from: dexter. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37895?usp=email ) Change subject: pySim-shell, cosmetic: define positional arguments last ...................................................................... Patch Set 2: (1 comment) File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/37895/comment/9e5074b9_83a9387a?usp=em… : PS1, Line 238: apdu_cmd_parser = argparse.ArgumentParser() > To my experience this will not change the command syntax. […] Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37895?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2412eb6e7dc32ae95a575f31d4489ce210d85ea0 Gerrit-Change-Number: 37895 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Aug 2024 16:10:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: pySim-shell, cosmetic: define positional arguments last
by laforge 23 Aug '24

23 Aug '24
Attention is currently required from: dexter. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37895?usp=email ) Change subject: pySim-shell, cosmetic: define positional arguments last ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37895?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2412eb6e7dc32ae95a575f31d4489ce210d85ea0 Gerrit-Change-Number: 37895 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Aug 2024 16:10:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in pysim[master]: global_platform: use scp_key_identity ICCID for ADF.ISD
by dexter 23 Aug '24

23 Aug '24
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37919?usp=email ) Change subject: global_platform: use scp_key_identity ICCID for ADF.ISD ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: I am not 100% sure if it is correct to always use the ICCID as scp_key_identity. At least on eUICCs I see an ADF.ISD-R and on UICCs I see an ADF.ISD. So ADF.ISD-R would use "EID" as scp_key_identity and ADF.ISD would use "ICCID" as scp_key_identity, but I am not sure if this is correct. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37919?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I73a6f7088321a2b703074aa5228910709050cab2 Gerrit-Change-Number: 37919 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: Jenkins Builder Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Fri, 23 Aug 2024 15:41:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[XS] Change in pysim[master]: filesystem: add command to delete all contents from a BER-TLV EF
by dexter 23 Aug '24

23 Aug '24
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37917?usp=email ) Change subject: filesystem: add command to delete all contents from a BER-TLV EF ...................................................................... filesystem: add command to delete all contents from a BER-TLV EF When working with BER-TLF files, we can only delete one tag at a time. There is no way to delete all tags at once. This may make working with BER-TLV files difficult, in particular when scripting is used and the script needs to start with an empty file. Also export has problems, since it does not reset the file before setting the new values there may be unexpected results in case there still tags in the file that are not set during import. To fill the gap, let's add a commandd that deletes all tags in a BER-TLV EF at once. Related: OS#6531 Change-Id: I5d6bcfe865df7cb8fa6dd0052cab3b364d929f94 --- M pySim/filesystem.py 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/17/37917/1 diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 35af140..d5e99a4 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -1338,6 +1338,12 @@ if data: self._cmd.poutput(data) + def do_delete_all(self, opts): + """Delete all data from a BER-TLV EF""" + tags = self._cmd.lchan.retrieve_tags() + for tag in tags: + self._cmd.lchan.set_data(tag, None) + def __init__(self, fid: str, sfid: str = None, name: str = None, desc: str = None, parent: CardDF = None, size: Size = (1, None), **kwargs): """ @@ -1374,6 +1380,7 @@ if tags == []: export_str += "# empty file, no tags" else: + export_str += "delete_all\n" for t in tags: result = lchan.retrieve_data(t) (tag, l, val, remainer) = bertlv_parse_one(h2b(result[0])) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37917?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5d6bcfe865df7cb8fa6dd0052cab3b364d929f94 Gerrit-Change-Number: 37917 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • ...
  • 148
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.