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 -----
  • 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

April 2024

  • 1 participants
  • 1128 discussions
[S] Change in docker-playground[master]: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario
by osmith 18 Apr '24

18 Apr '24
Attention is currently required from: daniel, neels, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/36590?usp=email ) Change subject: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36590?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264 Gerrit-Change-Number: 36590 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <daniel(a)totalueberwachung.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <daniel(a)totalueberwachung.de> Gerrit-Comment-Date: Thu, 18 Apr 2024 10:15:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario
by pespin 18 Apr '24

18 Apr '24
Attention is currently required from: daniel, neels, osmith. Hello Jenkins Builder, daniel, fixeria, neels, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/docker-playground/+/36590?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review-1 by neels, Verified+1 by Jenkins Builder Change subject: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario ...................................................................... ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario Recent commits applied changes to the default scenario, but forgot to apply them to the 'with-pfcp' subdir. Fixes: 6de89a5fb529928ce9b7b3320e0ca2e3e568d458 Fixes: 3736d31fc0314cb5d39c707374eecdcfe33241c9 Fixes: 0bdbcd6815358a7b1c4b0bb4575a585c45a01e57 Fixes: 2c22a96355b8e057dbd85ac1922ae84cc63f8b1e Fixes: d3711e67103691171d7ed3e224c050e78c1f5bc4 Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264 --- M ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg M ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg 2 files changed, 35 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/90/36590/2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36590?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264 Gerrit-Change-Number: 36590 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <daniel(a)totalueberwachung.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: daniel <daniel(a)totalueberwachung.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: sgsn: derive altsteps from f_routing_area_update()
by fixeria 18 Apr '24

18 Apr '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36588?usp=email ) Change subject: sgsn: derive altsteps from f_routing_area_update() ...................................................................... sgsn: derive altsteps from f_routing_area_update() Change-Id: I7d5ec9c42a37a5746c36745ac738fd77e1632675 Related: SYS#6603, OS#6294 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 57 insertions(+), 26 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved osmith: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index b8b5735..92b744f 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -2630,46 +2630,67 @@ f_cleanup(); } -friend function f_routing_area_update(RoutingAreaIdentificationV old_ra, integer ran_index := 0) runs on BSSGP_ConnHdlr { +friend altstep as_routing_area_update_gb(integer ran_index := 0) runs on BSSGP_ConnHdlr { var PDU_L3_SGSN_MS l3_mt; - var PDU_DTAP_PS_MT mt; - var template (omit) OCT4 p_tmsi := omit; - if (is_iu(ran_index)) { - p_tmsi := g_pars.p_tmsi; - } - /* then send RAU */ - f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit, p_tmsi), ran_index); - alt { - [is_gb(ran_index)] BSSGP[ran_index].receive(tr_GMM_RAU_ACCEPT) -> value l3_mt { + [] BSSGP[ran_index].receive(tr_GMM_RAU_ACCEPT) -> value l3_mt { f_process_rau_accept(l3_mt.msgs.gprs_mm.routingAreaUpdateAccept, ran_index); f_send_l3(ts_GMM_RAU_COMPL, ran_index); setverdict(pass); } - [is_iu(ran_index)] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_RAU_ACCEPT)) -> value mt { + [] BSSGP[ran_index].receive(tr_GMM_RAU_REJECT) { + setverdict(fail, "Unexpected RAU Reject"); + mtc.stop; + } +} +friend altstep as_routing_area_update_iu(integer ran_index := 0) runs on BSSGP_ConnHdlr { + var PDU_DTAP_PS_MT mt; + + [] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_RAU_ACCEPT)) -> value mt { f_process_rau_accept(mt.dtap.msgs.gprs_mm.routingAreaUpdateAccept, ran_index); f_send_l3(ts_GMM_RAU_COMPL, ran_index); setverdict(pass); } - - [is_gb(ran_index)] BSSGP[ran_index].receive(tr_GMM_RAU_REJECT) { + [] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_RAU_REJECT)) { setverdict(fail, "Unexpected RAU Reject"); mtc.stop; } - [is_iu(ran_index)] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_RAU_REJECT)) { - setverdict(fail, "Unexpected RAU Reject"); - mtc.stop; - } + [] BSSAP.receive(tr_RANAP_SecurityModeCmd(uia_algs := ?, + uia_key := oct2bit(g_pars.vec.ik), + key_sts := ?)) { + var IntegrityProtectionAlgorithm uia_chosen := 0; /* 0 = standard_UMTS_integrity_algorithm_UIA1 */ + BSSAP.send(ts_RANAP_SecurityModeComplete(uia_chosen)); + BSSAP.receive(tr_RANAP_CommonId(imsi_hex2oct(g_pars.imsi))) + repeat; + } +} +friend altstep as_routing_area_update(integer ran_index := 0) runs on BSSGP_ConnHdlr { + [is_gb(ran_index)] as_routing_area_update_gb(ran_index); + [is_iu(ran_index)] as_routing_area_update_iu(ran_index); +} - [is_iu(ran_index)] BSSAP.receive(tr_RANAP_SecurityModeCmd(uia_algs := ?, uia_key := oct2bit(g_pars.vec.ik), - key_sts := ?)) { - var IntegrityProtectionAlgorithm uia_chosen := 0; /* 0 = standard_UMTS_integrity_algorithm_UIA1 */ - BSSAP.send(ts_RANAP_SecurityModeComplete(uia_chosen)); - BSSAP.receive(tr_RANAP_CommonId(imsi_hex2oct(g_pars.imsi))) - repeat; - } +friend function f_routing_area_update(RoutingAreaIdentificationV old_ra, + GprsUpdateType upd_type := GPRS_UPD_T_RA, + integer ran_index := 0, + float Tval := 2.0) runs on BSSGP_ConnHdlr { + var template (omit) OCT4 p_tmsi := omit; + timer T := Tval; + + if (is_iu(ran_index)) { + p_tmsi := g_pars.p_tmsi; + } + + f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), upd_type, old_ra, p_tmsi := p_tmsi), ran_index); + + T.start; + alt { + [] as_routing_area_update(ran_index) { setverdict(pass); } [is_gb(ran_index)] BSSGP[ran_index].receive { repeat; } [is_iu(ran_index)] BSSAP.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout completing the RAU procedure"); + mtc.stop; + } } } @@ -2706,14 +2727,14 @@ f_TC_attach(id); log("attach complete sending rau"); - f_routing_area_update(g_pars.ra, 0); + f_routing_area_update(g_pars.ra); log("rau complete unregistering"); f_bssgp_client_unregister(g_pars.imsi); f_bssgp_client_register(g_pars.imsi, g_pars.tlli, BSSGP_PROC[1]); log("sending second RAU via different RA"); - f_routing_area_update(f_cellid_to_RAI(g_pars.bssgp_cell_id[1]), 1); + f_routing_area_update(f_cellid_to_RAI(g_pars.bssgp_cell_id[1]), ran_index := 1); f_detach_mo(c_GMM_DTT_MO_GPRS, true, true, 1); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36588?usp=email 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: I7d5ec9c42a37a5746c36745ac738fd77e1632675 Gerrit-Change-Number: 36588 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: library: cosmetic: fix code formatting
by fixeria 18 Apr '24

18 Apr '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36585?usp=email ) Change subject: library: cosmetic: fix code formatting ...................................................................... library: cosmetic: fix code formatting Change-Id: Ic87f6e8dcb8e507d21082f28217c015ff2e5204b Related: SYS#6603, OS#6294 --- M library/GTPv1C_CodecPort.ttcn 1 file changed, 11 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/library/GTPv1C_CodecPort.ttcn b/library/GTPv1C_CodecPort.ttcn index 956a674..bf14723 100644 --- a/library/GTPv1C_CodecPort.ttcn +++ b/library/GTPv1C_CodecPort.ttcn @@ -28,7 +28,7 @@ /* Decoded GTP1C (Control Plane), used in send and receive direction */ type record Gtp1cUnitdata { - Gtp1cPeer peer, + Gtp1cPeer peer, PDU_GTPC gtpc } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36585?usp=email 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: Ic87f6e8dcb8e507d21082f28217c015ff2e5204b Gerrit-Change-Number: 36585 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: library: GTPv1C add ts_MM_ContextGSM
by fixeria 18 Apr '24

18 Apr '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36586?usp=email ) Change subject: library: GTPv1C add ts_MM_ContextGSM ...................................................................... library: GTPv1C add ts_MM_ContextGSM Change-Id: I483fdd0dee6e0ee92fcee798d8e85a80d1e0be8b Related: SYS#6603, OS#6294 --- M library/GTPv1C_Templates.ttcn 1 file changed, 34 insertions(+), 0 deletions(-) Approvals: osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/library/GTPv1C_Templates.ttcn b/library/GTPv1C_Templates.ttcn index 4a0c8b2..dcb8e60 100644 --- a/library/GTPv1C_Templates.ttcn +++ b/library/GTPv1C_Templates.ttcn @@ -338,6 +338,30 @@ } /* 7.7.28 MM Context */ + template (value) MM_Context ts_MM_ContextGSM(template (value) OCT8 kc, + template (value) BIT3 cksn := '000'B, + template (value) BIT3 gea := '000'B) := { + type_gtpc := '81'O, + context := { + mmcontGSM := { + lengthf := 0, /* overwritten */ + cksn := cksn, + spare := '00000'B, + usedCipher := gea, + noofVectors := 0, + security := '00'B, /* XXX */ + kc := kc, + triplet := ''O, + drx_par := '0000'O, + msNetW_cap_length := 0, /* overwritten */ + msNetw_cap := omit, + containerLength := 0, /* overwritten */ + container := omit, + access_restriction_data_length := 0, + access_restriction_data := omit + } + } + } template (value) MM_Context ts_MM_ContextUMTS(template (value) OCT16 ck, template (value) OCT16 ik) := { type_gtpc := '81'O, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36586?usp=email 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: I483fdd0dee6e0ee92fcee798d8e85a80d1e0be8b Gerrit-Change-Number: 36586 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: sgsn: fix unused param in f_routing_area_update()
by fixeria 18 Apr '24

18 Apr '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36587?usp=email ) Change subject: sgsn: fix unused param in f_routing_area_update() ...................................................................... sgsn: fix unused param in f_routing_area_update() Change-Id: I582b2836eba3188cfd4c640b1febbd25c50001e0 Related: SYS#6603, OS#6294 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 12 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 64ba981..b8b5735 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -2630,7 +2630,7 @@ f_cleanup(); } -friend function f_routing_area_update(RoutingAreaIdentificationV ra, integer ran_index := 0) runs on BSSGP_ConnHdlr { +friend function f_routing_area_update(RoutingAreaIdentificationV old_ra, integer ran_index := 0) runs on BSSGP_ConnHdlr { var PDU_L3_SGSN_MS l3_mt; var PDU_DTAP_PS_MT mt; var template (omit) OCT4 p_tmsi := omit; @@ -2639,7 +2639,7 @@ p_tmsi := g_pars.p_tmsi; } /* then send RAU */ - f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, false, omit, omit, p_tmsi), ran_index); + f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit, p_tmsi), ran_index); alt { [is_gb(ran_index)] BSSGP[ran_index].receive(tr_GMM_RAU_ACCEPT) -> value l3_mt { f_process_rau_accept(l3_mt.msgs.gprs_mm.routingAreaUpdateAccept, ran_index); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36587?usp=email 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: I582b2836eba3188cfd4c640b1febbd25c50001e0 Gerrit-Change-Number: 36587 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: sgsn: derive altsteps from f_routing_area_update()
by fixeria 18 Apr '24

18 Apr '24
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36588?usp=email ) Change subject: sgsn: derive altsteps from f_routing_area_update() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36588?usp=email 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: I7d5ec9c42a37a5746c36745ac738fd77e1632675 Gerrit-Change-Number: 36588 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 18 Apr 2024 09:56:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn
by pespin 18 Apr '24

18 Apr '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email ) Change subject: Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn ...................................................................... Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn This is quite a generic string handling function which fits better in a generic utility file like Misc_Helpers.ttcn. Change-Id: I54eff3eea60ed0624919baebfe0ff7393414d6b8 --- M library/Misc_Helpers.ttcn M library/Osmocom_VTY_Functions.ttcn M upf/UPF_Tests.ttcn 3 files changed, 39 insertions(+), 26 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn index cbc1e70..fd2e7bb 100644 --- a/library/Misc_Helpers.ttcn +++ b/library/Misc_Helpers.ttcn @@ -79,4 +79,24 @@ return count; } +type record of charstring ro_charstring; +function f_str_split(charstring str, charstring delim := "\n") return ro_charstring +{ + var integer pos := 0; + var ro_charstring parts := {}; + var integer delim_pos; + var integer end := lengthof(str); + while (pos < end) { + delim_pos := f_strstr(str, delim, pos); + if (delim_pos < 0) { + delim_pos := end; + } + if (delim_pos > pos) { + parts := parts & { substr(str, pos, delim_pos - pos) }; + } + pos := delim_pos + 1; + } + return parts; +} + } diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn index 6b0883f..b982a8f 100644 --- a/library/Osmocom_VTY_Functions.ttcn +++ b/library/Osmocom_VTY_Functions.ttcn @@ -274,26 +274,7 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "talloc count mismatch"); } -public function f_str_split(charstring str, charstring delim := "\n") return ro_charstring -{ - var integer pos := 0; - var ro_charstring parts := {}; - var integer delim_pos; - var integer end := lengthof(str); - while (pos < end) { - delim_pos := f_strstr(str, delim, pos); - if (delim_pos < 0) { - delim_pos := end; - } - if (delim_pos > pos) { - parts := parts & { substr(str, pos, delim_pos - pos) }; - } - pos := delim_pos + 1; - } - return parts; -} - -public function f_verify_talloc_bytes(TELNETasp_PT pt, ro_charstring object_strs, integer expect_bytes := 0, +public function f_verify_talloc_bytes(TELNETasp_PT pt, Misc_Helpers.ro_charstring object_strs, integer expect_bytes := 0, integer attempts := 5, float wait_time := 3.0) { var charstring show_cmd := "show talloc-context application brief"; @@ -302,7 +283,7 @@ attempts := attempts - 1; var charstring ret := f_vty_transceive_ret(pt, show_cmd); - var ro_charstring lines := f_str_split(ret); + var Misc_Helpers.ro_charstring lines := f_str_split(ret); var boolean ok := true; for (var integer i := 0; i < lengthof(object_strs); i := i + 1) { @@ -315,7 +296,7 @@ if (f_strstr(line, object_str) < 0) { continue; } - var ro_charstring tokens := f_str_split(line, " "); + var Misc_Helpers.ro_charstring tokens := f_str_split(line, " "); if (lengthof(tokens) < 4) { continue; } diff --git a/upf/UPF_Tests.ttcn b/upf/UPF_Tests.ttcn index 140e81b..cb8c489 100644 --- a/upf/UPF_Tests.ttcn +++ b/upf/UPF_Tests.ttcn @@ -125,7 +125,7 @@ if (not f_get_name_val(token, str, name)) { return false; } - var ro_charstring nrl := f_str_split(token, delim); + var Misc_Helpers.ro_charstring nrl := f_str_split(token, delim); if (lengthof(nrl) != 2) { return false; } @@ -270,7 +270,7 @@ private function f_vty_get_gtp_actions(TELNETasp_PT vty_pt) return GTP_Action_List { var charstring gtp_str := f_vty_transceive_ret(vty_pt, "show gtp"); - var ro_charstring lines := f_str_split(gtp_str, "\n"); + var Misc_Helpers.ro_charstring lines := f_str_split(gtp_str, "\n"); var GTP_Action_List gtps := {}; for (var integer i := 0; i < lengthof(lines); i := i + 1) { var charstring line := lines[i]; @@ -399,7 +399,7 @@ private function f_vty_get_sessions(TELNETasp_PT vty_pt) return PFCP_Session_Status_List { var charstring sessions_str := f_vty_transceive_ret(vty_pt, "show session"); - var ro_charstring lines := f_str_split(sessions_str, "\n"); + var Misc_Helpers.ro_charstring lines := f_str_split(sessions_str, "\n"); var PFCP_Session_Status_List sessions := {}; for (var integer i := 0; i < lengthof(lines); i := i + 1) { var charstring line := lines[i]; @@ -483,7 +483,7 @@ setverdict(pass); } -private function f_vty_netinst_cfg(TELNETasp_PT vty_pt, ro_charstring netinst_cmds) +private function f_vty_netinst_cfg(TELNETasp_PT vty_pt, Misc_Helpers.ro_charstring netinst_cmds) { f_vty_enter_config(vty_pt); f_vty_transceive(vty_pt, "netinst"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email 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: I54eff3eea60ed0624919baebfe0ff7393414d6b8 Gerrit-Change-Number: 36593 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn
by pespin 18 Apr '24

18 Apr '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email ) Change subject: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn ...................................................................... Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn This is quite a generic string handling function which fits better in a generic utility file like Misc_Helpers.ttcn. Change-Id: I105844d2bcab6c24624be1224c1ba78b69d4b44c --- M ccid/gen_links.sh M ccid/regen_makefile.sh M library/Misc_Helpers.ttcn M library/Osmocom_VTY_Functions.ttcn M simtrace/gen_links.sh M simtrace/regen_makefile.sh 6 files changed, 38 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/ccid/gen_links.sh b/ccid/gen_links.sh index e53954b..593f624 100755 --- a/ccid/gen_links.sh +++ b/ccid/gen_links.sh @@ -4,9 +4,9 @@ . ../gen_links.sh.inc -#DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src -#FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" -#gen_links $DIR $FILES +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCConversion_Functions.ttcn TCCConversion.cc" +gen_links $DIR $FILES DIR=$BASEDIR/titan.TestPorts.USB/src FILES="USB_PT.cc USB_PT.hh USB_PortType.ttcn USB_PortTypes.ttcn USB_Templates.ttcn USB_Types.ttcn USB_Component.ttcn " diff --git a/ccid/regen_makefile.sh b/ccid/regen_makefile.sh index bbb7f33..c91ac12 100755 --- a/ccid/regen_makefile.sh +++ b/ccid/regen_makefile.sh @@ -5,6 +5,7 @@ FILES=" *.ttcn Native_FunctionDefs.cc + TCCConversion.cc USB_PT.cc " diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn index dda2c2c..cbc1e70 100644 --- a/library/Misc_Helpers.ttcn +++ b/library/Misc_Helpers.ttcn @@ -1,6 +1,7 @@ module Misc_Helpers { import from Native_Functions all; +import from TCCConversion_Functions all; modulepar { charstring mp_osmo_repo := "nightly"; @@ -61,4 +62,21 @@ } } +/* Return a count of how many times sub_str occurs in str. */ +function f_strstr_count(in charstring str, in charstring sub_str) return integer +{ + var integer count := 0; + var integer pos := 0; + + while (true) { + var integer at := f_strstr(str, sub_str, pos); + if (at < 0) { + break; + } + count := count + 1; + pos := at + 1; + } + return count; +} + } diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn index 3dd0429..6b0883f 100644 --- a/library/Osmocom_VTY_Functions.ttcn +++ b/library/Osmocom_VTY_Functions.ttcn @@ -228,23 +228,6 @@ return ""; } -/* Return a count of how many times sub_str occurs in str. */ -function f_strstr_count(in charstring str, in charstring sub_str) return integer -{ - var integer count := 0; - var integer pos := 0; - - while (true) { - var integer at := f_strstr(str, sub_str, pos); - if (at < 0) { - break; - } - count := count + 1; - pos := at + 1; - } - return count; -} - private type record of charstring StrList; /* Perform a 'show talloc-context' to get a count of the given object_strs that are still allocated. diff --git a/simtrace/gen_links.sh b/simtrace/gen_links.sh index eef1fea..3bce04d 100755 --- a/simtrace/gen_links.sh +++ b/simtrace/gen_links.sh @@ -4,9 +4,9 @@ . ../gen_links.sh.inc -#DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src -#FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" -#gen_links $DIR $FILES +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCConversion_Functions.ttcn TCCConversion.cc" +gen_links $DIR $FILES DIR=$BASEDIR/titan.TestPorts.USB/src FILES="USB_PT.cc USB_PT.hh USB_PortType.ttcn USB_PortTypes.ttcn USB_Templates.ttcn USB_Types.ttcn USB_Component.ttcn " diff --git a/simtrace/regen_makefile.sh b/simtrace/regen_makefile.sh index baecf7d..04c8397 100755 --- a/simtrace/regen_makefile.sh +++ b/simtrace/regen_makefile.sh @@ -5,6 +5,7 @@ FILES=" *.ttcn Native_FunctionDefs.cc + TCCConversion.cc USB_PT.cc " -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email 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: I105844d2bcab6c24624be1224c1ba78b69d4b44c Gerrit-Change-Number: 36592 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-netif[master]: tests/stream: Fix missing msgb_free()
by pespin 18 Apr '24

18 Apr '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email ) Change subject: tests/stream: Fix missing msgb_free() ...................................................................... tests/stream: Fix missing msgb_free() Rework a bit the function to early free the rx msg when it is no longer needed. Change-Id: I7e7579175aa6a7c1c22eb3bc147a67f6f62ad6bc --- M tests/stream/stream_test.c 1 file changed, 22 insertions(+), 4 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/stream/stream_test.c b/tests/stream/stream_test.c index e50752b..d73dd1d 100644 --- a/tests/stream/stream_test.c +++ b/tests/stream/stream_test.c @@ -572,15 +572,21 @@ struct ipa_head *ih = (struct ipa_head *)msg->l1h; unsigned char *data; struct msgb *m; - uint8_t *msgt = msg->l2h; /* Octet right after IPA header */ + uint8_t msgt; + LOGSRV(conn, "[%u-srv] Received IPA message from stream (payload len = %" PRIu16 ")\n", ++msgnum_srv, msgb_length(msg)); LOGSRV(conn, "\tmsg buff data (including stripped headers): %s\n", osmo_hexdump((unsigned char *)ih, osmo_ntohs(ih->len) + sizeof(*ih))); LOGSRV(conn, "\tIPA payload: %s\n", osmo_hexdump(ih->data, osmo_ntohs(ih->len))); - LOGSRV(conn, "\tType: %s\n", IPAC_MSG_TYPES[*msgt]); + + msgt = *msg->l2h; /* Octet right after IPA header */ + LOGSRV(conn, "\tType: %s\n", IPAC_MSG_TYPES[msgt]); LOGSRV(conn, "\t(msg dump: %s)\n", osmo_hexdump(msg->l1h, msg->len + sizeof(struct ipa_head))); - if (*msgt == IPAC_MSGT_ID_RESP) { /* */ + + msgb_free(msg); + + if (msgt == IPAC_MSGT_ID_RESP) { /* */ LOGSRV(conn, "Send IPAC_MSGT_ID_GET to trigger client to send next third\n\n"); m = osmo_ipa_msg_alloc(128); if (m == NULL) { @@ -590,7 +596,7 @@ put_ipa_msg(data, m, ipac_msg_idreq_payload); osmo_ipa_msg_push_headers(m, IPAC_PROTO_IPACCESS, -1); osmo_stream_srv_send(conn, m); - } else if (msgnum_srv == 7 && *msgt == IPAC_MSGT_PONG) { + } else if (msgnum_srv == 7 && msgt == IPAC_MSGT_PONG) { test_segm_ipa_stream_srv_all_msgs_processed = true; osmo_stream_srv_destroy(conn); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7e7579175aa6a7c1c22eb3bc147a67f6f62ad6bc Gerrit-Change-Number: 36583 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • ...
  • 113
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.