neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33482 ) ( 5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )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 want 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(-) Approvals: neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index fb618b4..f196e64 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -408,7 +408,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()); @@ -447,6 +448,10 @@ f_init_mgcp(id); f_init_vty("VirtHNBGW"); + + if (start_hnb) { + f_start_hnbs(); + } } friend function f_shutdown_helper() runs on test_CT { @@ -828,7 +833,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(); } @@ -837,7 +842,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); @@ -849,7 +854,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); @@ -860,7 +865,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); @@ -913,7 +918,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; @@ -925,7 +929,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; @@ -952,7 +955,6 @@ g_num_hnbs := 1; f_init(); - f_start_hnbs(); f_vty_set_sccp_max_optional_data(HNBGWVTY, 0); @@ -969,7 +971,6 @@ g_num_hnbs := 1; f_init(); - f_start_hnbs(); f_vty_set_sccp_max_optional_data(HNBGWVTY, 0); @@ -992,7 +993,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 }, @@ -1250,7 +1250,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; @@ -1288,7 +1287,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; @@ -1330,7 +1328,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; @@ -1381,7 +1378,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; @@ -1408,7 +1404,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; @@ -1419,7 +1414,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; @@ -1446,7 +1440,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; @@ -1457,7 +1450,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; @@ -1626,7 +1618,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)); @@ -1690,7 +1681,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: 7 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged