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

July 2023

  • 1 participants
  • 3051 discussions
[M] Change in libosmo-netif[master]: stream: Add IPA send function, pull IPA headers in segm. cb
by daniel 10 Jul '23

10 Jul '23
Attention is currently required from: arehbein, laforge, pespin. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33201 ) Change subject: stream: Add IPA send function, pull IPA headers in segm. cb ...................................................................... Patch Set 11: (7 comments) Patchset: PS11: > I really still fail to see why do we want to have & use a new API which puts together prepending the […] I think it looks nicer with the helper, but I'd split up this commit into a part that changes the segmentation_cb and one that adds the send helpers. File examples/ipa-stream-client.c: https://gerrit.osmocom.org/c/libosmo-netif/+/33201/comment/225882f8_e022b85f PS11, Line 109: if (osmo_ipa_process_msg(msg) < 0) { Remove this, it's now handled in the segmentation_cb File examples/ipa-stream-server.c: https://gerrit.osmocom.org/c/libosmo-netif/+/33201/comment/2f74e189_050dada7 PS11, Line 54: if (osmo_ipa_process_msg(msg) < 0) { Remove this, it's now handled in the segmentation_cb https://gerrit.osmocom.org/c/libosmo-netif/+/33201/comment/24775613_32fcd78f PS11, Line 60: osmo_ipa_stream_srv_send(conn, IPAC_PROTO_UNSPECIFIED, IPAC_PROTO_UNSPECIFIED, msg); Using the proto/proto_ext getters here is more clear imho than using IPAC_PROTO_UNSPECIFIED and dealing with it in osmo_ipa_stream_srv_send() File src/ipa.c: https://gerrit.osmocom.org/c/libosmo-netif/+/33201/comment/c5dbc8f9_4483f5a5 PS11, Line 481: if (ipaccess_proto == IPAC_PROTO_UNSPECIFIED) { : ipaccess_proto = msg_get_ipa_proto(msg); : pe = msg_get_ipa_proto_ext(msg); : } I wouldn't special-case this here. Also I'm not sure where IPAC_PROTO_UNSPECIFIED is defined and what its value is. File src/stream.c: https://gerrit.osmocom.org/c/libosmo-netif/+/33201/comment/018a01ca_84206334 PS11, Line 47: #include <osmocom/netif/ipa.h> Unneeded https://gerrit.osmocom.org/c/libosmo-netif/+/33201/comment/d8eafb25_54a1cc43 PS11, Line 612: if (res == 0) { Unrelated/Unneeded? -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I61e1fe59166c46595efe8c1f32b8f2607cb6c529 Gerrit-Change-Number: 33201 Gerrit-PatchSet: 11 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: daniel <dwillmann(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 10 Jul 2023 16:52:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: msc: TC_lu_and_mt/mo_csd: reduce call open time
by fixeria 10 Jul '23

10 Jul '23
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33631 ) Change subject: msc: TC_lu_and_mt/mo_csd: reduce call open time ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33631 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: Ie733028f7953d5d9fa1907efdb19485dee93ece9 Gerrit-Change-Number: 33631 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Mon, 10 Jul 2023 15:57:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: msc: TC_lu_and_mo_csd: test multiple bearer services
by fixeria 10 Jul '23

10 Jul '23
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33665 ) Change subject: msc: TC_lu_and_mo_csd: test multiple bearer services ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33665 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: I74f983e1f5c0fef61018a9a5b92ed3b3cdbdfb5f Gerrit-Change-Number: 33665 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Mon, 10 Jul 2023 15:55:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: msc: f_call_hangup: add missing rx MNCC_REL_cnf
by fixeria 10 Jul '23

10 Jul '23
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33664 ) Change subject: msc: f_call_hangup: add missing rx MNCC_REL_cnf ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33664 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: Ia2ed7ce092e73e17c4243e83bfd239ead8266b49 Gerrit-Change-Number: 33664 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Mon, 10 Jul 2023 15:50:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-msc[master]: mncc_builtin: permit data bearer types
by fixeria 10 Jul '23

10 Jul '23
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33666 ) Change subject: mncc_builtin: permit data bearer types ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33666 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I7bd6fa836e5a5c05c5d2358a9b8fd2b61981dd5f Gerrit-Change-Number: 33666 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Mon, 10 Jul 2023 15:45:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: fix PLMN in g_hnb_cfg
by neels 10 Jul '23

10 Jul '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33476 ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: hnbgw: fix PLMN in g_hnb_cfg ...................................................................... hnbgw: fix PLMN in g_hnb_cfg To get 001-01, we need to encode the placeholder 0xf nibble. Since recently, osmo-hnbgw cares about the PLMN in messages, in specific cases: in upcoming CN pool tests, the PLMN is part of the algorithm that picks the CN link. So let's encode 001-01 correctly. Change-Id: I5299c521479dc25ea0f82d7d294d53942960d2cf --- M hnbgw/HNBGW_Tests.ttcn 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index 3106750..bf70003 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -337,7 +337,7 @@ for (var integer i := 0; i < g_num_hnbs; i := i+1) { g_hnb_cfg[i] := { lai := { - mcc_mnc := '00101'H, + mcc_mnc := '00F110'H, lac := 2342 + i }, sac := 55 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33476 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: I5299c521479dc25ea0f82d7d294d53942960d2cf Gerrit-Change-Number: 33476 Gerrit-PatchSet: 5 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: tweak HNB name sent in HNBAP HNB Register
by neels 10 Jul '23

10 Jul '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33477 ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: hnbgw: tweak HNB name sent in HNBAP HNB Register ...................................................................... hnbgw: tweak HNB name sent in HNBAP HNB Register It helps when each distinct HNB has a different name showing in the osmo-hnbgw.log. Change-Id: I560415caba591a3f1139897c6ca4d31566f4c178 --- M hnbgw/HNBGW_Tests.ttcn 1 file changed, 13 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index bf70003..d4f101b 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -717,7 +717,7 @@ { timer T := 2.0; - HNBAP[hnb_idx].send(ts_HNBAP_HNBRegisterRequest(char2oct("TTCN3 HNodeB"), + HNBAP[hnb_idx].send(ts_HNBAP_HNBRegisterRequest(char2oct("TTCN3-HNB-" & int2str(hnb_idx)), '00F110'O, int2bit(1 + cell_id, 28), int2oct(2, 2), -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33477 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: I560415caba591a3f1139897c6ca4d31566f4c178 Gerrit-Change-Number: 33477 Gerrit-PatchSet: 5 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: move f_str_split() from UPF_Tests to Osmocom_VTY_Functions
by neels 10 Jul '23

10 Jul '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33478 ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: move f_str_split() from UPF_Tests to Osmocom_VTY_Functions ...................................................................... move f_str_split() from UPF_Tests to Osmocom_VTY_Functions I want to use it in a new function f_verify_talloc_bytes() added to Osmocom_VTY_Functions.ttcn in I2948ee6f167369a2252f85b493e9653b93c7e4e9. Change-Id: I9ddd9977734efd7599481261f04df82620845cef --- M library/Osmocom_VTY_Functions.ttcn M upf/UPF_Tests.ttcn 2 files changed, 32 insertions(+), 17 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn index 6e3ee37..ed506a7 100644 --- a/library/Osmocom_VTY_Functions.ttcn +++ b/library/Osmocom_VTY_Functions.ttcn @@ -15,6 +15,7 @@ import from TELNETasp_PortType all; import from Osmocom_Types all; import from TCCConversion_Functions all; + import from Socket_API_Definitions all; modulepar { charstring mp_prompt_prefix := "OpenBSC"; @@ -290,4 +291,23 @@ 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; +} + } diff --git a/upf/UPF_Tests.ttcn b/upf/UPF_Tests.ttcn index 5db143a..7dc01bb 100644 --- a/upf/UPF_Tests.ttcn +++ b/upf/UPF_Tests.ttcn @@ -76,23 +76,6 @@ f_vty_transceive(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg); } -private 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; - } - parts := parts & { substr(str, pos, delim_pos - pos) }; - pos := delim_pos + 1; - } - return parts; -} - private function f_get_name_val(out charstring val, charstring str, charstring name, charstring sep := ":", charstring delim := " ") return boolean { var charstring labl := name & sep; var integer namepos := f_strstr(str, labl); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33478 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: I9ddd9977734efd7599481261f04df82620845cef Gerrit-Change-Number: 33478 Gerrit-PatchSet: 5 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: hnbgw: verify empty talloc asn1_context at end of tests
by neels 10 Jul '23

10 Jul '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33479 ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: hnbgw: verify empty talloc asn1_context at end of tests ...................................................................... hnbgw: verify empty talloc asn1_context at end of tests This allowed me to find massive memory leaks in osmo-hnbgw: at the end of each test, run f_shutdown_helper(), and in it query 'show talloc' for an empty asn1_context. Hence verify that all the scenarios run in these ttcn3 tests have no asn1 de/encoding memory leaks. Change-Id: I2948ee6f167369a2252f85b493e9653b93c7e4e9 --- M hnbgw/HNBGW_Tests.ttcn M library/Osmocom_VTY_Functions.ttcn 2 files changed, 73 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index d4f101b..e9db214 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -61,6 +61,8 @@ import from PFCP_Templates all; import from PFCP_CodecPort all; +import from TCCConversion_Functions all; + modulepar { /* IP address at which the HNodeB can be reached */ charstring mp_hnodeb_ip := "127.0.0.1"; @@ -372,6 +374,8 @@ } friend function f_shutdown_helper() runs on test_CT { + f_verify_talloc_bytes(HNBGWVTY, {"asn1_context"}, 1); + all component.stop; setverdict(pass); mtc.stop; diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn index ed506a7..a448b8b 100644 --- a/library/Osmocom_VTY_Functions.ttcn +++ b/library/Osmocom_VTY_Functions.ttcn @@ -310,4 +310,57 @@ return parts; } +public function f_verify_talloc_bytes(TELNETasp_PT pt, 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"; + + while (attempts > 0) { + attempts := attempts - 1; + var charstring ret := f_vty_transceive_ret(pt, show_cmd); + + var ro_charstring lines := f_str_split(ret); + + var boolean ok := true; + for (var integer i := 0; i < lengthof(object_strs); i := i + 1) { + var charstring object_str := object_strs[i]; + + var integer bytes := 0; + + for (var integer j := 0; j < lengthof(lines); j := j + 1) { + var charstring line := lines[j]; + if (f_strstr(line, object_str) < 0) { + continue; + } + var ro_charstring tokens := f_str_split(line, " "); + if (lengthof(tokens) < 4) { + continue; + } + if (tokens[3] != "bytes") { + continue; + } + bytes := f_str2int(tokens[2]); + } + + if (bytes != expect_bytes) { + ok := false; + log("ERROR: talloc reports ", object_str, " = ", bytes, " bytes, expecting ", expect_bytes, + " from VTY response ", lines); + } else { + log("ok: talloc reports ", object_str, " = ", bytes, " bytes"); + } + } + if (ok) { + return; + } + if (attempts == 0) { + break; + } + log("bytes count mismatch, retrying in ", wait_time); + f_sleep(wait_time); + } + setverdict(fail, "talloc bytes count mismatch"); + mtc.stop; +} + } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33479 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: I2948ee6f167369a2252f85b493e9653b93c7e4e9 Gerrit-Change-Number: 33479 Gerrit-PatchSet: 5 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: hnbgw: prepare cn pool: add multiple MSCs and SGSNs
by neels 10 Jul '23

10 Jul '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33480 ) Change subject: hnbgw: prepare cn pool: add multiple MSCs and SGSNs ...................................................................... hnbgw: prepare cn pool: add multiple MSCs and SGSNs Change-Id: Ia29565cabc072de9aa46565b57232e1eda65874f --- M hnbgw/HNBGW_Tests.ttcn M hnbgw/gen_links.sh 2 files changed, 148 insertions(+), 39 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve neels: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index e9db214..f38fc0c 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -62,6 +62,14 @@ import from PFCP_CodecPort all; import from TCCConversion_Functions all; +import from MobileL3_Types all; +import from L3_Templates all; + +const integer NUM_MSC := 4; +const integer NUM_SGSN := 4; + +const integer FIRST_MSC_IDX := 0; +const integer FIRST_SGSN_IDX := NUM_MSC; modulepar { /* IP address at which the HNodeB can be reached */ @@ -75,27 +83,98 @@ charstring mp_mgw_ip := "127.0.0.1"; integer mp_mgw_port := 2427; - RAN_Configuration mp_msc_cfg := { - transport := RANAP_TRANSPORT_IuCS, - sccp_service_type := "mtp3_itu", - sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" }, - own_pc := 188, /* 0.23.4 first MSC emulation */ - own_ssn := 142, - peer_pc := 189, /* 0.23.5 osmo-hnbgw */ - peer_ssn := 142, - sio := '83'O, - rctx := 1 - }; - RAN_Configuration mp_sgsn_cfg := { - transport := RANAP_TRANSPORT_IuCS, - sccp_service_type := "mtp3_itu", - sctp_addr := { /* local */ 23906, "127.0.0.1", /* remote */ 2905, "127.0.0.1" }, - own_pc := 185, /* 0.23.1 first SGSN emulation */ - own_ssn := 142, - peer_pc := 189, /* 0.23.5 osmo-hnbgw */ - peer_ssn := 142, - sio := '83'O, - rctx := 2 + RAN_Configurations mp_cn_cfg := { + /* MSCs (NUM_MSC entries) */ + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" }, + own_pc := 188, /* 0.23.4 first MSC emulation */ + own_ssn := 142, + peer_pc := 189, /* 0.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 1 + }, + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { 23907, "127.0.0.1", 2905, "127.0.0.1" }, + own_pc := 2, /* 0.0.2 second MSC emulation */ + own_ssn := 142, + peer_pc := 189, /* 0.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 3 + }, + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { 23909, "127.0.0.1", 2905, "127.0.0.1" }, + own_pc := 3, /* 0.0.3 third MSC emulation */ + own_ssn := 142, + peer_pc := 189, /* 0.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 5 + }, + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { 23911, "127.0.0.1", 2905, "127.0.0.1" }, + own_pc := 4, /* 0.0.4 fourth MSC emulation */ + own_ssn := 142, + peer_pc := 189, /* 0.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 7 + }, + + /* SGSNs (NUM_SGSN entries) */ + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { /* local */ 23906, "127.0.0.1", /* remote */ 2905, "127.0.0.1" }, + own_pc := 185, /* 0.23.1 first SGSN emulation */ + own_ssn := 142, + peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 2 + }, + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { /* local */ 23908, "127.0.0.1", /* remote */ 2905, "127.0.0.1" }, + own_pc := 10, /* 0.1.2 second SGSN emulation */ + own_ssn := 142, + peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 4 + }, + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { /* local */ 23910, "127.0.0.1", /* remote */ 2905, "127.0.0.1" }, + own_pc := 11, /* 0.1.3 third SGSN emulation */ + own_ssn := 142, + peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 6 + }, + { + transport := RANAP_TRANSPORT_IuCS, + sccp_service_type := "mtp3_itu", + sctp_addr := { /* local */ 23912, "127.0.0.1", /* remote */ 2905, "127.0.0.1" }, + own_pc := 12, /* 0.1.4 fourth SGSN emulation */ + own_ssn := 142, + peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */ + peer_ssn := 142, + sio := '83'O, + rctx := 8 + } }; boolean mp_enable_pfcp_tests := false; @@ -179,6 +258,9 @@ type record TestHdlrParams { integer hnb_idx, + /* cn_idx indicates which CN link from g_cn[] to connect to the test component. + * See also f_cn_idx(). */ + integer cn_idx, hexstring imsi, boolean ps_domain, MgcpParameters mgcp_pars optional, @@ -225,9 +307,7 @@ var boolean g_initialized := false; /********************* Iu side */ - var RAN_Adapter g_msc; - var RAN_Adapter g_sgsn; - /* SGSN IuPS missing */ + var RAN_Adapter g_cn[NUM_MSC + NUM_SGSN]; /********************* Iuh side */ var HnbConfig g_hnb_cfg[NUM_HNB]; @@ -326,7 +406,7 @@ } /* global initialization function */ -function f_init(charstring id := "HNBGW", float guard_timeout := 30.0) runs on test_CT { +function f_init(charstring id := "HNBGW", float guard_timeout := 30.0, integer nr_msc := 1, integer nr_sgsn := 1) runs on test_CT { T_guard.start(guard_timeout); activate(as_Tguard()); @@ -361,13 +441,19 @@ sccp_addr_local := omit, sccp_addr_peer := omit }; - f_ran_adapter_init(g_msc, mp_msc_cfg, "HNBGW_Test", ranops); - f_ran_adapter_start(g_msc); + for (var integer i := 0; i < nr_msc; i := i + 1) { + var integer cn_idx := FIRST_MSC_IDX + i; + f_ran_adapter_init(g_cn[cn_idx], mp_cn_cfg[cn_idx], "HNBGW_Test", ranops); + f_ran_adapter_start(g_cn[cn_idx]); + } /* SGSN emulation */ ranops.ps_domain := true; - f_ran_adapter_init(g_sgsn, mp_sgsn_cfg, "HNBGW_Test", ranops); - f_ran_adapter_start(g_sgsn); + for (var integer i := 0; i < nr_sgsn; i := i + 1) { + var integer cn_idx := FIRST_SGSN_IDX + i; + f_ran_adapter_init(g_cn[cn_idx], mp_cn_cfg[cn_idx], "HNBGW_Test", ranops); + f_ran_adapter_start(g_cn[cn_idx]); + } f_init_mgcp(id); f_init_vty("VirtHNBGW"); @@ -415,15 +501,10 @@ /* Iuh RUA part */ connect(vc_conn:RUA, vc_RUA[pars.hnb_idx]:CLIENT); - if (pars.ps_domain) { - /* SGSN side */ - connect(vc_conn:BSSAP, g_sgsn.vc_RAN:CLIENT); - connect(vc_conn:BSSAP_PROC, g_sgsn.vc_RAN:PROC); - } else { - /* MSC side */ - connect(vc_conn:BSSAP, g_msc.vc_RAN:CLIENT); - connect(vc_conn:BSSAP_PROC, g_msc.vc_RAN:PROC); - } + /* MSC or SGSN */ + connect(vc_conn:BSSAP, g_cn[pars.cn_idx].vc_RAN:CLIENT); + connect(vc_conn:BSSAP_PROC, g_cn[pars.cn_idx].vc_RAN:PROC); + /* MGCP part */ connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT); connect(vc_conn:MGCP_PROC, vc_MGCP:MGCP_PROC); @@ -799,10 +880,28 @@ * RUA / RANAP Testing ***********************************************************************/ +/* Translate from {msc,sgsn}x{0..n} to the proper index to use in g_cn[]. + * g_cn[] stores CN links, MSCs and SGSNs in the same array. + * For example, for 'sgsn 23', use g_cn[ f_cn_idx(ps_domain := true, cn_nr := 23) ]. + * + * Note the naming: + * cn_nr is the number used in the cfg file, as in 'msc 0'. + * cn_idx is the array index in g_cn[]. + */ +private function f_cn_idx(boolean ps_domain, integer cn_nr := 0) return integer +{ + if (ps_domain) { + return FIRST_SGSN_IDX + cn_nr; + } + return FIRST_MSC_IDX + cn_nr; +} + private template (value) TestHdlrParams t_pars(integer imsi_suffix, boolean ps_domain := false, integer hnb_idx := 0, - boolean expect_separate_sccp_cr := false, integer tx_sccp_cr_data_len := 0) := { + boolean expect_separate_sccp_cr := false, integer tx_sccp_cr_data_len := 0, + integer cn_nr := 0) := { hnb_idx := hnb_idx, + cn_idx := f_cn_idx(ps_domain, cn_nr), imsi := f_gen_imsi(imsi_suffix), ps_domain := ps_domain, hnb := omit, /* filled in later */ diff --git a/hnbgw/gen_links.sh b/hnbgw/gen_links.sh index 4be3b53..17addbd 100755 --- a/hnbgw/gen_links.sh +++ b/hnbgw/gen_links.sh @@ -103,6 +103,7 @@ FILES+="PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn PFCP_Templates.ttcn " FILES+="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn " FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcn " +FILES+="L3_Templates.ttcn " gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33480 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: Ia29565cabc072de9aa46565b57232e1eda65874f Gerrit-Change-Number: 33480 Gerrit-PatchSet: 5 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • ...
  • 306
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.