BSC: reset handover related vty cfg after ho tests

Reset the handover related configuration to what is in osmo-bsc.cfg
after running handover tests.

Change-Id: I8ca6909dec633f0c1f26b5e72a7cfc1931c0ec54
This commit is contained in:
Oliver Smith 2022-10-27 14:44:04 +02:00 committed by osmith
parent 99e00b480d
commit 39f530751f
1 changed files with 38 additions and 26 deletions

View File

@ -883,12 +883,24 @@ private function f_ctrs_bsc_expect(charstring countername, integer val := 1) run
}
friend function f_shutdown_helper() runs on test_CT {
friend function f_shutdown_helper(boolean ho := false) runs on test_CT {
/* Run the subscr and conn leak test only when the VTY is initialized */
if (BSCVTY.checkstate("Mapped") and mp_verify_talloc_count) {
f_verify_talloc_count(BSCVTY, {"struct bsc_subscr", "struct gsm_subscriber_connection"});
}
/* Reset handover related configuration */
if (ho) {
f_bts_0_cfg(BSCVTY,
{"no neighbors",
"neighbor-list mode manual-si5",
"neighbor-list add arfcn 100",
"neighbor-list add arfcn 200",
"si5 neighbor-list add arfcn 10",
"si5 neighbor-list add arfcn 20",
"handover algorithm 1"});
}
all component.stop;
setverdict(pass);
mtc.stop;
@ -5672,7 +5684,7 @@ testcase TC_ho_int() runs on test_CT {
f_ctrs_bts_add(1, "incoming_intra_bsc_ho:attempted");
f_ctrs_bts_add(1, "incoming_intra_bsc_ho:completed");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
function f_tc_ho_int_a5(OCT1 encr_alg, charstring enc_a5 := "0 1 3") runs on test_CT {
@ -5701,7 +5713,7 @@ function f_tc_ho_int_a5(OCT1 encr_alg, charstring enc_a5 := "0 1 3") runs on tes
f_ctrs_bts_add(1, "incoming_intra_bsc_ho:completed");
f_ctrs_bsc_and_bts_verify();
f_vty_encryption_a5_reset();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
testcase TC_ho_int_a5_0() runs on test_CT {
@ -5824,7 +5836,7 @@ testcase TC_ho_int_radio_link_failure() runs on test_CT {
f_ctrs_bts_add(1, "incoming_intra_bsc_ho:attempted");
f_ctrs_bts_add(1, "incoming_intra_bsc_ho:stopped");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* Expecting MGCP to DLCX the endpoint's two connections: towards BTS and towards MSC */
@ -5958,7 +5970,7 @@ testcase TC_ho_out_of_this_bsc() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:attempted");
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:completed");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_mo_l3_transceive(RSL_DCHAN_PT rsl := RSL,
@ -6042,7 +6054,7 @@ testcase TC_ho_out_fail_no_msc_response() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:attempted");
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:timeout");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* BSC asks for inter-BSC HO, receives BSSMAP Handover Command, but MS reports
@ -6124,7 +6136,7 @@ testcase TC_ho_out_fail_rr_ho_failure() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:attempted");
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:failed");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* BSC asks for inter-BSC-out HO, receives BSSMAP Handover Command, but then no reply is received about HO outcome
@ -6225,7 +6237,7 @@ testcase TC_ho_out_fail_no_result_after_ho_cmd() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:attempted");
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:timeout");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_ho_into_this_bsc(charstring id, template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := omit) runs on MSC_ConnHdlr {
@ -6431,7 +6443,7 @@ function f_tc_ho_into_this_bsc_main(TestHdlrParams pars, charstring vty_a5_cfg :
testcase TC_ho_into_this_bsc() runs on test_CT {
var TestHdlrParams pars := f_gen_test_hdlr_pars();
f_tc_ho_into_this_bsc_main(pars);
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
function f_tc_ho_into_this_bsc_a5(TestHdlrEncrParams encr, charstring vty_a5_cfg := VTY_A5_DEFAULT,
@ -6440,7 +6452,7 @@ function f_tc_ho_into_this_bsc_a5(TestHdlrEncrParams encr, charstring vty_a5_cfg
pars.encr := encr;
pars.expect_ho_fail := expect_fail;
f_tc_ho_into_this_bsc_main(pars, vty_a5_cfg);
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
testcase TC_ho_into_this_bsc_a5_0() runs on test_CT {
@ -6485,7 +6497,7 @@ testcase TC_ho_into_this_bsc_tla_v6() runs on test_CT {
var TestHdlrParams pars := f_gen_test_hdlr_pars();
pars.host_aoip_tla := "::6";
f_tc_ho_into_this_bsc_main(pars);
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* Similar to TC_ho_into_this_bsc, but when in SRVCC, HO Req contains "Old BSS
@ -6502,7 +6514,7 @@ testcase TC_srvcc_eutran_to_geran() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "srvcc:attempted");
f_ctrs_bsc_and_bts_add(0, "srvcc:completed");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* Same as TC_srvcc_eutran_to_geran, but enables ciphering on the target channel. */
@ -6516,7 +6528,7 @@ testcase TC_srvcc_eutran_to_geran_a5_3() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "srvcc:attempted");
f_ctrs_bsc_and_bts_add(0, "srvcc:completed");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* Same as TC_srvcc_eutran_to_geran, but test explicitly forbiding fast return
@ -6697,7 +6709,7 @@ testcase TC_ho_in_fail_msc_clears() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:attempted");
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:stopped");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_tc_ho_in_fail_msc_clears_after_ho_detect(charstring id) runs on MSC_ConnHdlr {
@ -6788,7 +6800,7 @@ testcase TC_ho_in_fail_msc_clears_after_ho_detect() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:attempted");
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:stopped");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* The new BSS's lchan times out before the MSC decides that handover failed. */
@ -6878,7 +6890,7 @@ testcase TC_ho_in_fail_no_detect() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:attempted");
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:error");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* Same as f_tc_ho_in_fail_no_detect, but MSC fails to send a Clear Command */
@ -6960,7 +6972,7 @@ testcase TC_ho_in_fail_no_detect2() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:attempted");
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:error");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* An incoming inter-BSC HO can either issue the Handover Request message attached to the initial SCCP N-Connect (as in
@ -6970,7 +6982,7 @@ testcase TC_ho_into_this_bsc_sccp_cr_without_bssap() runs on test_CT {
var TestHdlrParams pars := f_gen_test_hdlr_pars();
pars.inter_bsc_ho_in__ho_req_in_initial_sccp_cr := false;
f_tc_ho_into_this_bsc_main(pars);
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
type record of charstring Commands;
@ -7204,7 +7216,7 @@ testcase TC_ho_neighbor_config_1() runs on test_CT {
f_ctrs_bts_add(1, "incoming_intra_bsc_ho:failed");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_tc_ho_neighbor_config_2(charstring id) runs on MSC_ConnHdlr {
@ -7257,7 +7269,7 @@ testcase TC_ho_neighbor_config_2() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "handover:error");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_tc_ho_neighbor_config_3(charstring id) runs on MSC_ConnHdlr {
@ -7309,7 +7321,7 @@ testcase TC_ho_neighbor_config_3() runs on test_CT {
f_ctrs_bts_add(2, "incoming_intra_bsc_ho:failed");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_tc_ho_neighbor_config_4(charstring id) runs on MSC_ConnHdlr {
@ -7366,7 +7378,7 @@ testcase TC_ho_neighbor_config_4() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:timeout");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_tc_ho_neighbor_config_5(charstring id) runs on MSC_ConnHdlr {
@ -7409,7 +7421,7 @@ testcase TC_ho_neighbor_config_5() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:timeout");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_tc_ho_neighbor_config_6(charstring id) runs on MSC_ConnHdlr {
@ -7451,7 +7463,7 @@ testcase TC_ho_neighbor_config_6() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "handover:error");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_tc_ho_neighbor_config_7(charstring id) runs on MSC_ConnHdlr {
@ -7508,7 +7520,7 @@ testcase TC_ho_neighbor_config_7() runs on test_CT {
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:timeout");
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
/* OS#3041: Open and close N connections in a normal fashion, and expect no
@ -10367,7 +10379,7 @@ testcase TC_ho_during_lcs_loc_req() runs on test_CT {
f_sleep(1.0);
vc_conn := f_start_handler(refers(f_tc_ho_during_lcs_loc_req), pars);
vc_conn.done;
f_shutdown_helper();
f_shutdown_helper(ho := true);
}
private function f_tc_emerg_call_and_lcs_loc_req(charstring id) runs on MSC_ConnHdlr