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

June 2023

  • 1 participants
  • 2480 discussions
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: do not dup MSC_RanOps
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33481 ) Change subject: hnbgw: do not dup MSC_RanOps ...................................................................... hnbgw: do not dup MSC_RanOps Change-Id: I556eb4293f51b56a526d4e60c3ac2aa357a8d3e7 --- M hnbgw/HNBGW_Tests.ttcn 1 file changed, 10 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/81/33481/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index d39a236..c2bf843 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -427,19 +427,7 @@ } /* MSC emulation */ - var RanOps ranops := { - ranap_create_cb := refers(RAN_Emulation.RanapExpectedCreateCallback), - ranap_unitdata_cb := omit, - ps_domain := false, - decode_dtap := false, - role_ms := false, - protocol := RAN_PROTOCOL_RANAP, - transport := RANAP_TRANSPORT_IuCS, - use_osmux := false, - bssap_reset_retries := 1, - sccp_addr_local := omit, - sccp_addr_peer := omit - }; + var RanOps ranops := MSC_RanOps; 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); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33481 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: I556eb4293f51b56a526d4e60c3ac2aa357a8d3e7 Gerrit-Change-Number: 33481 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: hnbgw: prepare cn pool: add multiple MSCs and SGSNs
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( 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 1 file changed, 138 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/80/33480/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index 66d0ef2..d39a236 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,8 @@ type record TestHdlrParams { integer hnb_idx, + /* array index in g_cn[] (in which SGSNs follow MSCs) */ + integer cn_idx, hexstring imsi, boolean ps_domain, MgcpParameters mgcp_pars optional, @@ -225,9 +306,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 +405,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 +440,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 +500,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 +879,20 @@ * RUA / RANAP Testing ***********************************************************************/ +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 */ -- 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: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: ctrl: f_counter_name_vals_get_n(): add start_idx, for hnbgw
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33483 ) Change subject: ctrl: f_counter_name_vals_get_n(): add start_idx, for hnbgw ...................................................................... ctrl: f_counter_name_vals_get_n(): add start_idx, for hnbgw Allow starting with a specific 'msc' / 'sgsn' instance without having to read all the lower numbers along. For HNBGW_Tests.ttcn. Change-Id: I9b74a1df9e115883b4b0ac0f606a370c6aca7f40 --- M library/Osmocom_CTRL_Functions.ttcn 1 file changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/33483/1 diff --git a/library/Osmocom_CTRL_Functions.ttcn b/library/Osmocom_CTRL_Functions.ttcn index 2c90de4..75f8646 100644 --- a/library/Osmocom_CTRL_Functions.ttcn +++ b/library/Osmocom_CTRL_Functions.ttcn @@ -233,10 +233,11 @@ /* Retrieve the first N instances' rate counter values of the given names */ function f_counter_name_vals_get_n(IPA_CTRL_PT pt, charstring instance_name := "msc", - integer instance_count, CounterNameVals counternames) + integer instance_count, CounterNameVals counternames, + integer start_idx := 0) return CounterNameValsList { var CounterNameValsList valslist; - for (var integer instance_nr := 0; instance_nr < instance_count; instance_nr := instance_nr + 1) { + for (var integer instance_nr := start_idx; instance_nr < start_idx + instance_count; instance_nr := instance_nr + 1) { valslist[instance_nr] := f_counter_name_vals_get(pt, instance_name, instance_nr, counternames); } log("retrieved rate counters: ", instance_name, ": ", valslist); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33483 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: I9b74a1df9e115883b4b0ac0f606a370c6aca7f40 Gerrit-Change-Number: 33483 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: call f_start_hnbs() by default
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33482 ) Change subject: hnbgw: call f_start_hnbs() by default ...................................................................... hnbgw: call f_start_hnbs() by default Most tests need to run f_start_hnbs() directly after f_init(), so make that the default behavior. The three tests that don't whant f_start_hnbs() to run now pass a new arg, f_init(start_hnb := false). Change-Id: I2b29ce66aee0b2d57fa26e6110f06292c481ab6b --- M hnbgw/HNBGW_Tests.ttcn 1 file changed, 25 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/82/33482/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index c2bf843..a4af399 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -405,7 +405,8 @@ } /* global initialization function */ -function f_init(charstring id := "HNBGW", float guard_timeout := 30.0, integer nr_msc := 1, integer nr_sgsn := 1) runs on test_CT { +function f_init(charstring id := "HNBGW", float guard_timeout := 30.0, integer nr_msc := 1, integer nr_sgsn := 1, + boolean start_hnb := true) runs on test_CT { T_guard.start(guard_timeout); activate(as_Tguard()); @@ -444,6 +445,10 @@ f_init_mgcp(id); f_init_vty("VirtHNBGW"); + + if (start_hnb) { + f_start_hnbs(); + } } friend function f_shutdown_helper() runs on test_CT { @@ -823,7 +828,7 @@ testcase TC_hnb_register() runs on test_CT { g_num_hnbs := 1; - f_init(); + f_init(start_hnb := false); f_hnbap_register(0); f_shutdown_helper(); } @@ -832,7 +837,7 @@ * one should be rejected. */ testcase TC_hnb_register_duplicate() runs on test_CT { g_num_hnbs := 2; - f_init(); + f_init(start_hnb := false); f_hnbap_register(0); f_hnbap_register(1, 0, expect_reject := true); f_verify_talloc_count(HNBGWVTY, {"struct hnb_context"}, expect_count := 1); @@ -844,7 +849,7 @@ * applied. TS 25.469 8.2.4 */ testcase TC_hnb_register_duplicate_reuse_sctp_assoc() runs on test_CT { g_num_hnbs := 1; - f_init(); + f_init(start_hnb := false); f_hnbap_register(0); f_hnbap_register(0); f_verify_talloc_count(HNBGWVTY, {"struct hnb_context"}, expect_count := 1); @@ -855,7 +860,7 @@ * Related: OS#5676, SYS#6113 */ testcase TC_hnb_reregister_reuse_sctp_assoc() runs on test_CT { g_num_hnbs := 1; - f_init(); + f_init(start_hnb := false); f_hnbap_register(0); HNBAP[0].send(ts_HNBAP_HNBDe_Register(ts_HnbapCause(unspecified))); f_hnbap_register(0); @@ -900,7 +905,6 @@ g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_initial_ue), t_pars(1)); vc_conn.done; @@ -912,7 +916,6 @@ g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_initial_ue), t_pars(2, true)); vc_conn.done; @@ -939,7 +942,6 @@ g_num_hnbs := 1; f_init(); - f_start_hnbs(); f_vty_set_sccp_max_optional_data(HNBGWVTY, 0); @@ -956,7 +958,6 @@ g_num_hnbs := 1; f_init(); - f_start_hnbs(); f_vty_set_sccp_max_optional_data(HNBGWVTY, 0); @@ -979,7 +980,6 @@ testcase TC_sccp_cr_limit() runs on test_CT { g_num_hnbs := 1; f_init(); - f_start_hnbs(); const Testdata_CR_Limits tests := { { data_len := 130, max_optional_data := -1, expect_separate_sccp_cr := false }, @@ -1237,7 +1237,6 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_rab_assignment), t_pars(3)); vc_conn.done; @@ -1275,7 +1274,6 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_rab_assign_fail), t_pars(4)); vc_conn.done; @@ -1317,7 +1315,6 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_rab_release), t_pars(5)); vc_conn.done; @@ -1368,7 +1365,6 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_rab_assign_mgcp_to), t_pars(6)); vc_conn.done; @@ -1395,7 +1391,6 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_ranap_bidir), t_pars(3)); vc_conn.done; @@ -1406,7 +1401,6 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_ranap_bidir), t_pars(4, true)); vc_conn.done; @@ -1433,7 +1427,6 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_ranap_mo_disconnect), t_pars(5)); vc_conn.done; @@ -1444,7 +1437,6 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); - f_start_hnbs(); vc_conn := f_start_handler_with_pars(refers(f_tc_ranap_mo_disconnect), t_pars(6)); vc_conn.done; @@ -1613,7 +1605,6 @@ var ConnHdlr vc_conn; g_num_hnbs := 1; f_init(); - f_start_hnbs(); f_sleep(1.0); vc_conn := f_start_handler_with_pars(refers(f_tc_ps_rab_assignment_with_pfcp), t_pars(7, ps_domain := true)); @@ -1677,7 +1668,6 @@ testcase TC_ps_rab_assignment_without_pfcp() runs on test_CT { var ConnHdlr vc_conn; f_init(); - f_start_hnbs(); f_sleep(1.0); vc_conn := f_start_handler_with_pars(refers(f_tc_ps_rab_assignment_without_pfcp), t_pars(7, ps_domain := true)); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33482 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: I2b29ce66aee0b2d57fa26e6110f06292c481ab6b Gerrit-Change-Number: 33482 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: add CTRL port
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33484 ) Change subject: hnbgw: add CTRL port ...................................................................... hnbgw: add CTRL port Change-Id: I4c06e1fda135d87ce52151fd574f481cd414722f --- M hnbgw/HNBGW_Tests.ttcn 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/84/33484/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index a4af399..92264f0 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -79,6 +79,7 @@ /* IP address at which the test binds */ charstring mp_hnbgw_ip := "127.0.0.1"; integer mp_hnbgw_iuh_port := 29169; + integer mp_hnbgw_ctrl_port := 4262; charstring mp_mgw_ip := "127.0.0.1"; integer mp_mgw_port := 2427; @@ -427,6 +428,8 @@ f_init_hnodeb(testcasename(), i, rua_ops); } + f_ipa_ctrl_start_client(mp_hnbgw_ip, mp_hnbgw_ctrl_port); + /* MSC emulation */ var RanOps ranops := MSC_RanOps; for (var integer i := 0; i < nr_msc; i := i + 1) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33484 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: I4c06e1fda135d87ce52151fd574f481cd414722f Gerrit-Change-Number: 33484 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: hnbgw: CN links: implement 'allow attach'
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33485 ) Change subject: hnbgw: CN links: implement 'allow attach' ...................................................................... hnbgw: CN links: implement 'allow attach' Prep for I027a059faed3f140f8801f84338956cd004043b5 Change-Id: I5c9db4b31298ca9855b4390481a709f863459172 --- M hnbgw/HNBGW_Tests.ttcn 1 file changed, 89 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/33485/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index 92264f0..c56d382 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -405,6 +405,60 @@ vc_RUA[hnb_idx].start(RUA_Emulation.main(rua_ops, id & "-RUA")); } +private type record of boolean BooleanList; + +private function f_vty_cnlink_allow_attach(TELNETasp_PT pt, boolean ps_domain, BooleanList allow_attach_list) +{ + var charstring config := f_vty_transceive_ret(pt, "show running-config"); + + var charstring msc_sgsn; + if (ps_domain) { + msc_sgsn := "sgsn"; + } else { + msc_sgsn := "msc"; + } + + f_vty_enter_config(pt); + for (var integer cn_nr := 0; cn_nr < sizeof(allow_attach_list); cn_nr := cn_nr+1) { + if (f_strstr(config, "\n" & msc_sgsn & " " & int2str(cn_nr) & "\n") < 0) { + /* There is no 'msc N' for this cn_nr in the running config, so don't create an empty cn by + * stepping into that config node. */ + log(msc_sgsn, cn_nr, " is not configured, skipping"); + continue; + } + f_vty_transceive(pt, msc_sgsn & " " & int2str(cn_nr)); + + if (allow_attach_list[cn_nr]) { + /* strict := false: ignore if osmo-hnbgw does not support this config option (latest build) */ + f_vty_transceive(pt, "allow-attach", strict := false); + } else { + f_vty_transceive(pt, "no allow-attach", strict := false); + } + f_vty_transceive(pt, "exit"); + } + f_vty_transceive(pt, "exit"); +} + +/* Start RAN adapter for CN link N. + * e.g. link for 'msc 0' = (ps_domain := false, cn_nr := 0) + * link for 'sgsn 3' = (ps_domain := true, cn_nr := 3) + */ +private function f_cn_nr_init(boolean ps_domain, integer cn_nr) runs on test_CT { + var RanOps ranops := MSC_RanOps; + ranops.ps_domain := ps_domain; + var integer cn_idx := f_cn_idx(ps_domain, cn_nr); + var charstring msc_sgsn := "msc"; + if (ps_domain) { + msc_sgsn := "sgsn"; + } + f_ran_adapter_init(g_cn[cn_idx], mp_cn_cfg[cn_idx], "HNBGW_Test." & msc_sgsn & int2str(cn_nr), ranops); + f_ran_adapter_start(g_cn[cn_idx]); +} + +private function f_cn_idx_disconnect(integer cn_idx) runs on test_CT { + f_ran_adapter_cleanup(g_cn[cn_idx]); +} + /* global initialization function */ function f_init(charstring id := "HNBGW", float guard_timeout := 30.0, integer nr_msc := 1, integer nr_sgsn := 1, boolean start_hnb := true) runs on test_CT { @@ -428,26 +482,41 @@ f_init_hnodeb(testcasename(), i, rua_ops); } + f_init_vty("VirtHNBGW"); f_ipa_ctrl_start_client(mp_hnbgw_ip, mp_hnbgw_ctrl_port); /* MSC emulation */ - var RanOps ranops := MSC_RanOps; + + /* Make sure each MSC's internal state is "DISCONNECTED" at first */ + for (var integer i := 0; i < NUM_MSC; i := i + 1) { + f_vty_transceive(HNBGWVTY, "msc " & int2str(i) & " ranap reset", strict := false); + } + + var BooleanList allow_attach := { false, false, false, false }; 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]); + allow_attach[i] := true; + f_cn_nr_init(ps_domain := false, cn_nr := i); } + /* start the test with exactly all enabled MSCs allowed to attach */ + f_vty_cnlink_allow_attach(HNBGWVTY, false, allow_attach); /* SGSN emulation */ - ranops.ps_domain := true; - 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]); + + /* Make sure each SGSN's internal state is "DISCONNECTED" at first */ + for (var integer i := 0; i < NUM_SGSN; i := i + 1) { + f_vty_transceive(HNBGWVTY, "sgsn " & int2str(i) & " ranap reset", strict := false); } + allow_attach := { false, false, false, false }; + for (var integer i := 0; i < nr_sgsn; i := i + 1) { + var integer cn_idx := FIRST_SGSN_IDX + i; + allow_attach[i] := true; + f_cn_nr_init(ps_domain := true, cn_nr := i); + } + f_vty_cnlink_allow_attach(HNBGWVTY, true, allow_attach); + f_init_mgcp(id); - f_init_vty("VirtHNBGW"); if (start_hnb) { f_start_hnbs(); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33485 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: I5c9db4b31298ca9855b4390481a709f863459172 Gerrit-Change-Number: 33485 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: RANAP_Templates: drop unused arg from ts_RANAP_Paging()
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33487 ) Change subject: RANAP_Templates: drop unused arg from ts_RANAP_Paging() ...................................................................... RANAP_Templates: drop unused arg from ts_RANAP_Paging() Change-Id: I7e4bbdba34d2f0af9044050fff19ced5ea969ae9 --- M library/ranap/RANAP_Templates.ttcn 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/87/33487/1 diff --git a/library/ranap/RANAP_Templates.ttcn b/library/ranap/RANAP_Templates.ttcn index 7fac3a4..bc56bdb 100644 --- a/library/ranap/RANAP_Templates.ttcn +++ b/library/ranap/RANAP_Templates.ttcn @@ -661,7 +661,6 @@ template (value) RANAP_PDU ts_RANAP_Paging(template (value) CN_DomainIndicator dom, template (value) IMSI imsi, - template (omit) TemporaryUE_ID temp_id := omit, template (omit) Paging.protocolExtensions exts := omit) := { initiatingMessage := { procedureCode := id_Paging, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33487 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: I7e4bbdba34d2f0af9044050fff19ced5ea969ae9 Gerrit-Change-Number: 33487 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: hnbgw: add mscpool paging tests
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33488 ) Change subject: hnbgw: add mscpool paging tests ...................................................................... hnbgw: add mscpool paging tests Change-Id: If4bbd5c970108b01e8556fa7744ff627db75fb13 --- M hnbgw/HNBGW_Tests.ttcn M library/RAN_Emulation.ttcnpp M library/ranap/RANAP_Templates.ttcn 3 files changed, 180 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/33488/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index ac8991a..a649bf6 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -46,6 +46,7 @@ import from RANAP_PDU_Contents all; import from RANAP_IEs all; import from RANAP_Templates all; +import from RANAP_CodecPort all; import from RAN_Adapter all; import from RAN_Emulation all; @@ -68,6 +69,8 @@ import from L3_Templates all; import from L3_Common all; +import from SCCPasp_Types all; + const integer NUM_MSC := 4; const integer NUM_SGSN := 4; @@ -271,7 +274,10 @@ boolean expect_separate_sccp_cr, integer tx_sccp_cr_data_len, charstring pfcp_local_addr, - octetstring nas_pdu optional + octetstring nas_pdu optional, + /* local and remote SCCP addresses, used in TC_mscpool_paging_* */ + SCCP_PAR_Address sccp_addr_msc optional, + SCCP_PAR_Address sccp_addr_hnbgw optional } /* We extend: @@ -973,7 +979,9 @@ expect_separate_sccp_cr := expect_separate_sccp_cr, tx_sccp_cr_data_len := tx_sccp_cr_data_len, pfcp_local_addr := mp_pfcp_ip_local, - nas_pdu := omit + nas_pdu := omit, + sccp_addr_msc := omit, + sccp_addr_hnbgw := omit } /* Create an Iuh connection; send InitialUE; expect it to appear on new SCCP conenction */ @@ -2269,6 +2277,117 @@ f_shutdown_helper(); } +/* Make sure that whichever MSC paged a subscriber will also get the Paging Response. Page by IMSI, which would be + * round-robined to another MSC, to make sure the Paging->Response relation is stronger than the NRI->MSC mapping. */ +friend function f_tc_mscpool_paging_imsi(charstring id, TestHdlrParams pars) runs on ConnHdlr { + f_init_handler(pars); + + var hexstring imsi := '001010000000123'H; + var RANAP_IEs.CN_DomainIndicator domain_ind; + if (pars.ps_domain) { + domain_ind := ps_domain; + } else { + domain_ind := cs_domain; + } + var template (value) RANAP_PDU paging := ts_RANAP_Paging(domain_ind, imsi_hex2oct(imsi)); + BSSAP.send(ts_RANAP_UNITDATA_req(pars.sccp_addr_hnbgw, pars.sccp_addr_msc, paging)); + /* TODO: Expect RUA ConnectionlessTransfer Paging (on all HNB). + * We sent a Paging from CN to osmo-hnbgw, and osmo-hnbgw forwarded the Paging to RUA. + * In this ttcn3 code, so far, RUA Emulation forwards those RUA Unitdata only to the ranap_unitdata_cb. + * Instead, we may add RUA procedures so that we can RUA.receive(tr_Paging) here. + * In result, we would have to expect a RUA Paging to every HNB here. + * + * But, this test does not care whether the Paging was forwarded to RUA or not, only that osmo-hnbgw *received* + * the Paging. In the CN pool decisions, osmo-hnbgw should match up Paging Response to an earlier Paging. + */ + + f_sleep(1.0); + + /* Despite the round robin pointing at the second MSC ('roundrobin next msc 1'), the earlier Paging for the same IMSI + * causes this Paging Response to go to the first MSC ('msc 0'). */ + f_perform_compl_l3(f_gen_one_compl_l3(PAGRESP, ts_MI_IMSI_LV(imsi))); + f_sleep(1.0); +} + +testcase TC_mscpool_paging_imsi() runs on test_CT { + f_init(nr_msc := 3); + f_sleep(1.0); + + var boolean ps_domain := false; + + /* Testing a Paging on the first MSC to get a Paging Response back to the first MSC. Set round robin to the + * second MSC to make sure we're getting the Paging logic, not a coincidental round robin match. */ + f_vty_set_roundrobin_next(HNBGWVTY, ps_domain, 0); + + f_ctrs_cn_init(ps_domain := ps_domain); + + var ConnHdlr vc_conn1; + var template (value) TestHdlrParams pars1 := t_pars(0, ps_domain := ps_domain, cn_nr := 0); + pars1.sccp_addr_hnbgw := g_cn[valueof(pars1.cn_idx)].sccp_addr_peer; + pars1.sccp_addr_msc := g_cn[valueof(pars1.cn_idx)].sccp_addr_own; + vc_conn1 := f_start_handler_with_pars(refers(f_tc_mscpool_paging_imsi), pars1); + vc_conn1.done; + f_ctrs_cn_expect(0, "cnpool:subscr:paged"); + f_shutdown_helper(); +} + +/* Make sure that whichever MSC paged a subscriber will also get the Paging Response. Page by TMSI with an NRI value + * that matches a different MSC, to make sure the Paging->Response relation is stronger than the NRI->MSC mapping. */ +friend function f_tc_mscpool_paging_tmsi(charstring id, TestHdlrParams pars) runs on ConnHdlr { + f_init_handler(pars); + + var hexstring imsi := '001010000000124'H; + var integer nri_v := 300; /* <-- second MSC's NRI */ + var octetstring tmsi := f_gen_tmsi(suffix := 0, nri_v := nri_v); + + var RANAP_IEs.CN_DomainIndicator domain_ind; + if (pars.ps_domain) { + domain_ind := ps_domain; + } else { + domain_ind := cs_domain; + } + var template (value) RANAP_PDU paging := ts_RANAP_Paging_temp_id(domain_ind, imsi_hex2oct(imsi), + ts_RANAP_TemporaryUE_ID_TMSI(tmsi)); + BSSAP.send(ts_RANAP_UNITDATA_req(pars.sccp_addr_hnbgw, pars.sccp_addr_msc, paging)); + /* TODO: Expect RUA ConnectionlessTransfer Paging (on all HNB). + * We sent a Paging from CN to osmo-hnbgw, and osmo-hnbgw forwarded the Paging to RUA. + * In this ttcn3 code, so far, RUA Emulation forwards those RUA Unitdata only to the ranap_unitdata_cb. + * Instead, we may add RUA procedures so that we can RUA.receive(tr_Paging) here. + * In result, we would have to expect a RUA Paging to every HNB here. + * + * But, this test does not care whether the Paging was forwarded to RUA or not, only that osmo-hnbgw *received* + * the Paging. In the CN pool decisions, osmo-hnbgw should match up Paging Response to an earlier Paging. + */ + + f_sleep(1.0); + + /* Despite the round robin pointing at the third MSC ('roundrobin next msc 2'), the earlier Paging for the same + * TMSI causes this Paging Response to go to the first MSC ('msc 0'). */ + f_perform_compl_l3(f_gen_one_compl_l3(PAGRESP, ts_MI_TMSI_NRI_LV(nri_v))); + f_sleep(1.0); +} +testcase TC_mscpool_paging_tmsi() runs on test_CT { + f_init(nr_msc := 3); + f_sleep(1.0); + + var boolean ps_domain := false; + + /* Testing a Paging on the first MSC to get a Paging Response back to the first MSC. Set round robin to the + * third MSC to make sure we're getting the Paging logic, not a coincidental round robin match. */ + f_vty_set_roundrobin_next(HNBGWVTY, ps_domain, 0); + + f_ctrs_cn_init(ps_domain := ps_domain); + + var ConnHdlr vc_conn1; + var template (value) TestHdlrParams pars1 := t_pars(0, ps_domain := ps_domain, cn_nr := 0); + pars1.sccp_addr_hnbgw := g_cn[valueof(pars1.cn_idx)].sccp_addr_peer; + pars1.sccp_addr_msc := g_cn[valueof(pars1.cn_idx)].sccp_addr_own; + vc_conn1 := f_start_handler_with_pars(refers(f_tc_mscpool_paging_tmsi), pars1); + vc_conn1.done; + f_ctrs_cn_expect(0, "cnpool:subscr:paged"); + f_shutdown_helper(); +} + /* For round-robin, skip a CN link that has 'no allow-attach' set. */ testcase TC_mscpool_no_allow_attach_round_robin() runs on test_CT { @@ -2432,6 +2551,8 @@ execute( TC_mscpool_L3Complete_by_tmsi_valid_nri_1() ); execute( TC_mscpool_L3Complete_by_tmsi_valid_nri_2() ); execute( TC_mscpool_LU_by_tmsi_from_other_PLMN() ); + execute( TC_mscpool_paging_imsi() ); + execute( TC_mscpool_paging_tmsi() ); execute( TC_mscpool_no_allow_attach_round_robin() ); execute( TC_mscpool_no_allow_attach_valid_nri() ); execute( TC_mscpool_sccp_n_pcstate_detaches_cnlink() ); diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index 6a1f784..49ca891 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -168,6 +168,7 @@ #endif #ifdef RAN_EMULATION_RANAP RANAP_PDU, + RANAP_N_UNITDATA_req, /* Client requests us to create SCCP Connection */ RANAP_Conn_Req, #endif @@ -968,6 +969,7 @@ var RANAP_N_DISCONNECT_ind rdisc_ind; var RANAP_Conn_Req creq; var RANAP_PDU ranap; + var RANAP_N_UNITDATA_req ranap_ud; var RAN_ConnHdlr vc_conn; var PDU_DTAP_PS_MO ps_mo; var PDU_DTAP_PS_MT ps_mt; @@ -1033,6 +1035,11 @@ RANAP.send(ts_RANAP_DATA_req(conn_id, ranap)); } + /* e.g. for Paging from virtual MSC/SGSN to SUT osmo-hnbgw */ + [] CLIENT.receive(RANAP_N_UNITDATA_req:?) -> value ranap_ud sender vc_conn { + RANAP.send(ranap_ud); + } + /* Disconnect request client -> SCCP */ [] CLIENT.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ) -> sender vc_conn { var integer conn_id := f_conn_id_by_comp(vc_conn); diff --git a/library/ranap/RANAP_Templates.ttcn b/library/ranap/RANAP_Templates.ttcn index bc56bdb..051195f 100644 --- a/library/ranap/RANAP_Templates.ttcn +++ b/library/ranap/RANAP_Templates.ttcn @@ -720,6 +720,47 @@ } } +template (value) TemporaryUE_ID ts_RANAP_TemporaryUE_ID_TMSI(octetstring tmsi) := { + tMSI := tmsi +} + +template (value) RANAP_PDU +ts_RANAP_Paging_temp_id(template (value) CN_DomainIndicator dom, template (value) IMSI imsi, + template (value) TemporaryUE_ID temp_id, + template (omit) Paging.protocolExtensions exts := omit) := { + initiatingMessage := { + procedureCode := id_Paging, + criticality := ignore, + value_ := { + paging := { + protocolIEs := { + { + id := id_CN_DomainIndicator, + criticality := ignore, + value_ := { + cN_DomainIndicator := dom + } + }, { + id := id_PermanentNAS_UE_ID, + criticality := ignore, + value_ := { + permanentNAS_UE_ID := { + iMSI := imsi + } + } + }, { + id := id_TemporaryUE_ID, + criticality := ignore, + value_ := { + temporaryUE_ID := temp_id + } + } + }, + protocolExtensions := exts + } + } + } +} /***************************************************************************************************** -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33488 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: If4bbd5c970108b01e8556fa7744ff627db75fb13 Gerrit-Change-Number: 33488 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: rua: RUA_Disc_Ind only when CLIENT is connected
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33489 ) Change subject: rua: RUA_Disc_Ind only when CLIENT is connected ...................................................................... rua: RUA_Disc_Ind only when CLIENT is connected Only dispatch RUA_Disc_Ind to CLIENT when CLIENT is connected. Reason: If a test does not care much about conn cleanup, it may cause a situation where the CLIENT has already disconnected when osmo-hnbgw sends a RUA Disconnect. A disconnected CLIENT port will cause the final verdict to become 'error'. Instead, if the CLIENT is already disconnected, just don't bother, and allow tests to still pass. This will become necessary, because: So far a RUA Disconnect without any RANAP payload is not detected by the RUA emulation. But patch Ia0b89e9198794d196a88040ee89bdf24f3b08ae0 will fix it, so that *every* RUA Disconnect causes a RUA_Disc_Ind sent to the CLIENT. From then on, we will see a bunch more RUA_Disc_Ind at the end of tests. Some of those happen *after* the client already disconnected, causing tests to error that have been passing for a long time. Change-Id: Ia1403f39cfdc75139922292a3eace7a69a64a576 --- M library/rua/RUA_Emulation.ttcn 1 file changed, 31 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/33489/1 diff --git a/library/rua/RUA_Emulation.ttcn b/library/rua/RUA_Emulation.ttcn index 40eb3b7..af4b8b3 100644 --- a/library/rua/RUA_Emulation.ttcn +++ b/library/rua/RUA_Emulation.ttcn @@ -309,7 +309,9 @@ ranap_enc := rua.initiatingMessage.value_.disconnect_.protocolIEs[3].value_.rANAP_Message; f_handle_userData_RANAP(vc_conn, dec_RANAP_PDU(ranap_enc)); /* notify user of disconnect */ - CLIENT.send(RUA_Disc_Ind:{cause}); + if (CLIENT.checkstate("Connected")) { + CLIENT.send(RUA_Disc_Ind:{cause}); + } f_conn_table_del(context_id); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33489 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: Ia1403f39cfdc75139922292a3eace7a69a64a576 Gerrit-Change-Number: 33489 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: rua: also match on RUA Disconnect without RANAP payload
by neels 27 Jun '23

27 Jun '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33490 ) Change subject: rua: also match on RUA Disconnect without RANAP payload ...................................................................... rua: also match on RUA Disconnect without RANAP payload Add tr_RUA_Disconnect_opt_ranap that matches RUA Disconnect with and without RANAP payload. Use this in RUA_Emulation as_main_rua(), to trigger a RUA_Disc_Ind to the CLIENT also for Disconnect without RANAP data. Rationale: In upcoming new HNBGW_Tests.ttcn, I want to test for an ungraceful RUA Disconnect, which is sent without a RANAP payload. But tr_RUA_Disconnect only matches when a RANAP Message IE is present. In consequence, RUA_Emulation ignores "empty" RUA Disconnect, and my test case cannot verify that the RUA Disconnect occurred. Fix that. Change-Id: Ia0b89e9198794d196a88040ee89bdf24f3b08ae0 --- M library/rua/RUA_Emulation.ttcn M library/rua/RUA_Templates.ttcn 2 files changed, 60 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/33490/1 diff --git a/library/rua/RUA_Emulation.ttcn b/library/rua/RUA_Emulation.ttcn index af4b8b3..a9c445e 100644 --- a/library/rua/RUA_Emulation.ttcn +++ b/library/rua/RUA_Emulation.ttcn @@ -301,13 +301,15 @@ } /* RUA -> Client: disconnect of an existing connection */ - [] RUA.receive(tr_RUA_Disconnect) -> value rua { + [] RUA.receive(tr_RUA_Disconnect_opt_ranap) -> value rua { cause := rua.initiatingMessage.value_.disconnect_.protocolIEs[2].value_.cause; context_id := rua.initiatingMessage.value_.disconnect_.protocolIEs[1].value_.context_ID; vc_conn := f_comp_by_context_id(context_id); /* send contained RANAP message to user */ - ranap_enc := rua.initiatingMessage.value_.disconnect_.protocolIEs[3].value_.rANAP_Message; - f_handle_userData_RANAP(vc_conn, dec_RANAP_PDU(ranap_enc)); + if (lengthof(rua.initiatingMessage.value_.disconnect_.protocolIEs) > 3) { + ranap_enc := rua.initiatingMessage.value_.disconnect_.protocolIEs[3].value_.rANAP_Message; + f_handle_userData_RANAP(vc_conn, dec_RANAP_PDU(ranap_enc)); + } /* notify user of disconnect */ if (CLIENT.checkstate("Connected")) { CLIENT.send(RUA_Disc_Ind:{cause}); diff --git a/library/rua/RUA_Templates.ttcn b/library/rua/RUA_Templates.ttcn index ee65412..738042e 100644 --- a/library/rua/RUA_Templates.ttcn +++ b/library/rua/RUA_Templates.ttcn @@ -231,6 +231,38 @@ } } +/* Same as tr_RUA_Disconnect() but without a ranap arg: match also a RUA Disconnect without any RANAP payload. */ +template (present) RUA_PDU +tr_RUA_Disconnect_opt_ranap(template (present) CN_DomainIndicator domain := ?, + template (present) bitstring context_id := ?, + template (present) Cause cause := ?) := { + initiatingMessage := { + procedureCode := 3, + criticality := reject, + value_ := { + disconnect_ := { + protocolIEs := { + { + id := 7, + criticality := reject, + value_ := { cN_DomainIndicator := domain } + }, { + id := 3, + criticality := reject, + value_ := { context_ID := context_id } + }, { + id := 1, + criticality := reject, + value_ := { cause := cause } + }, + * + }, + protocolExtensions := omit + } + } + } +} + /* 9.1.6 CONNECTIONLESS TRANSFER */ template (value) RUA_PDU ts_RUA_ConnectionlessTransfer(template (value) octetstring ranap_msg) := { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33490 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: Ia0b89e9198794d196a88040ee89bdf24f3b08ae0 Gerrit-Change-Number: 33490 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.