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));